Browse Source

added all new files to repository

main
stephenhensley 2 years ago
parent
commit
1418af4f67
  1. 1
      .gitignore
  2. 6
      .gitmodules
  3. 104836
      .vscode/STM32H750x.svd
  4. 42
      .vscode/c_cpp_properties.json
  5. 69
      .vscode/launch.json
  6. 70
      .vscode/tasks.json
  7. 22
      Blink/Makefile
  8. 22
      Blink/main.cpp
  9. 22
      NewProject/Makefile
  10. 15
      NewProject/main.cpp
  11. 8
      README.md
  12. 24
      ci/build_libs.sh
  13. 1
      libs/DaisySP
  14. 1
      libs/libDaisy

1
.gitignore

@ -0,0 +1 @@
builld/

6
.gitmodules

@ -0,0 +1,6 @@
[submodule "libs/libDaisy"]
path = libs/libDaisy
url = https://github.com/electro-smith/libDaisy
[submodule "libs/DaisySP"]
path = libs/DaisySP
url = https://github.com/electro-smith/DaisySP

104836
.vscode/STM32H750x.svd

File diff suppressed because it is too large

42
.vscode/c_cpp_properties.json

@ -0,0 +1,42 @@
{
"configurations": [
{
"name": "Win32",
// Edit to match your development environment if necessary
"compilerPath": "C:/Program Files/DaisyToolchain/bin/arm-none-eabi-gcc.exe",
"includePath": [
"${workspaceFolder}/Blink/**",
"${workspaceFolder}/NewProject/**",
"${workspaceFolder}/libs/libDaisy//**",
"${workspaceFolder}/libs/DaisySP//**"
],
"intelliSenseMode": "gcc-x64",
"cStandard": "c11",
"cppStandard": "c++17",
"defines": [
"DEBUG=1",
"STM32H750xx"
],
"windowsSdkVersion": "10.0.17763.0"
},
{
"name": "Mac",
// Edit to match your development environment if necessary
"compilerPath": "/usr/bin/arm-none-eabi-gcc",
"includePath": [
"${workspaceFolder}/Blink/**",
"${workspaceFolder}/NewProject/**",
"${workspaceFolder}/libs/libDaisy//**",
"${workspaceFolder}/libs/DaisySP//**"
],
"intelliSenseMode": "gcc-x64",
"cStandard": "c11",
"cppStandard": "c++17",
"defines": [
"DEBUG=1",
"STM32H750xx"
]
}
],
"version": 4
}

69
.vscode/launch.json

@ -0,0 +1,69 @@
{
"configurations": [
{
"configFiles": [
"interface/stlink.cfg",
"target/stm32h7x.cfg"
],
"cwd": "${workspaceFolder}",
"debuggerArgs": [
"-d",
"${workspaceRoot}"
],
// Here's where you can put the path to the program you want to debug:
"executable": "${workspaceRoot}/Blink/build/Blink.elf",
"interface": "swd",
"name": "Debug Blink",
"openOCDLaunchCommands": [
"init",
"reset init",
"gdb_breakpoint_override hard"
],
"preLaunchTask": "Build Blink",
"preRestartCommands": [
"load",
"enable breakpoint",
"monitor reset"
],
"request": "launch",
"runToMain": true,
"servertype": "openocd",
"showDevDebugOutput": true,
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
},
{
"configFiles": [
"interface/stlink.cfg",
"target/stm32h7x.cfg"
],
"cwd": "${workspaceFolder}",
"debuggerArgs": [
"-d",
"${workspaceRoot}"
],
// Here's where you can put the path to the program you want to debug:
"executable": "${workspaceRoot}/NewProject/build/NewProject.elf",
"interface": "swd",
"name": "Debug NewProject",
"openOCDLaunchCommands": [
"init",
"reset init",
"gdb_breakpoint_override hard"
],
"preLaunchTask": "Build Blink",
"preRestartCommands": [
"load",
"enable breakpoint",
"monitor reset"
],
"request": "launch",
"runToMain": true,
"servertype": "openocd",
"showDevDebugOutput": true,
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
}
],
"version": "0.2.0"
}

70
.vscode/tasks.json

@ -0,0 +1,70 @@
{
"tasks": [
{
"label": "Build Libraries",
"command": "./ci/build_libs.sh",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
"type": "shell"
},
{
"label": "Build Blink",
"command": "make",
"options": {
"cwd": "${workspaceFolder}/Blink"
},
"problemMatcher": [],
"type": "shell"
},
{
"label": "Build NewProject",
"command": "make",
"options": {
"cwd": "${workspaceFolder}/NewProject"
},
"problemMatcher": [],
"type": "shell"
},
{
"label": "Build",
"dependsOn": [
"Build Blink",
"Build NewProject"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Clean Blink",
"command": "make clean",
"options": {
"cwd": "${workspaceFolder}/Blink"
},
"problemMatcher": [],
"type": "shell"
},
{
"label": "Clean NewProject",
"command": "make clean",
"options": {
"cwd": "${workspaceFolder}/NewProject"
},
"problemMatcher": [],
"type": "shell"
},
{
"label": "Clean",
"dependsOn": [
"Clean Blink",
"Clean NewProject"
],
"problemMatcher": [],
}
],
"version": "2.0.0"
}

22
Blink/Makefile

@ -0,0 +1,22 @@
# Project Name
TARGET = Blink
# Configure for debugging
# common configurations:
# use DEBUG = 1 and OPT = -Og for debugging
# or DEBUG = 0 and OPT = -O3 for performance
DEBUG = 0
OPT = -O3
# Sources
CPP_SOURCES = main.cpp
LIBDAISY_DIR = ../libs/libDaisy
DAISYSP_DIR = ../libs/DaisySP
# (optional) Includes FatFS source files within project.
#USE_FATFS = 1
# Core location, and generic Makefile.
SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
include $(SYSTEM_FILES_DIR)/Makefile

22
Blink/main.cpp

@ -0,0 +1,22 @@
/** Basic Daisy Blink Example
*
* This example blinks toggles the state of an LED every half a second.
*/
#include "daisy_seed.h"
using namespace daisy;
DaisySeed hw;
int main() {
hw.Init();
bool led_state = false;
while (1) {
/** Set the USR LED to the current state */
hw.SetLed(led_state);
/** Toggle the state from true/false, or vice versa */
led_state = !led_state;
/** Delay for the specified number of milliseconds */
System::Delay(500);
}
}

22
NewProject/Makefile

@ -0,0 +1,22 @@
# Project Name
TARGET = Blink
# Configure for debugging
# common configurations:
# use DEBUG = 1 and OPT = -Og for debugging
# or DEBUG = 0 and OPT = -O3 for performance
DEBUG = 0
OPT = -O3
# Sources
CPP_SOURCES = main.cpp
LIBDAISY_DIR = ../libs/libDaisy
DAISYSP_DIR = ../libs/DaisySP
# (optional) Includes FatFS source files within project.
#USE_FATFS = 1
# Core location, and generic Makefile.
SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
include $(SYSTEM_FILES_DIR)/Makefile

15
NewProject/main.cpp

@ -0,0 +1,15 @@
/** Basic Daisy Program
*
* This file is a blank starting point for a new project.
*/
#include "daisy_seed.h"
using namespace daisy;
DaisySeed hw;
int main() {
hw.Init();
while (1) {
}
}

8
README.md

@ -1,2 +1,10 @@
# DaisyBlinkProject
Basic Blink Project with all required libraries, etc.
Includes:
* libDaisy - hardware library for Daisy
* DaisySP - DSP library
* Blink - Basic example demonstrating a blink
* NewProject - an empty project, perfect for following along with the Guided Tutorial.

24
ci/build_libs.sh

@ -0,0 +1,24 @@
#!/bin/bash
START_DIR=$PWD
LIBDAISY_DIR=$PWD/libs/libDaisy
DAISYSP_DIR=$PWD/libs/DaisySP
echo "building libDaisy . . ."
cd "$LIBDAISY_DIR" ; make -s clean ; make -j -s
if [ $? -ne 0 ]
then
echo "Failed to compile libDaisy"
exit 1
fi
echo "done."
echo "building DaisySP . . ."
cd "$DAISYSP_DIR" ; make -s clean ; make -j -s
if [ $? -ne 0 ]
then
echo "Failed to compile DaisySP"
exit 1
fi
echo "done."

1
libs/DaisySP

@ -0,0 +1 @@
Subproject commit 03aae6ccd3f607456d4f61b214f06ab47348e1a3

1
libs/libDaisy

@ -0,0 +1 @@
Subproject commit 5f1d862c60c6966dda3fb8a71fceeb6aeec00e02
Loading…
Cancel
Save