Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[submodule "DaisySP"]
path = DaisySP
url = https://github.com/electro-smith/DaisySP
url = https://github.com/daisyaudio/DaisySP
branch = master
[submodule "stmlib"]
path = stmlib
url = https://github.com/pichenettes/stmlib
[submodule "libDaisy"]
path = libDaisy
url = https://github.com/electro-smith/libDaisy
url = https://github.com/daisyaudio/libDaisy
60 changes: 37 additions & 23 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,42 @@
{
"name": "Daisy",
"includePath": [
"${workspaceFolder}/libdaisy/src",
"${workspaceFolder}/libdaisy/src/sys",
"${workspaceFolder}/libdaisy/src/usbd",
"${workspaceFolder}/libdaisy/Drivers/CMSIS/Include",
"${workspaceFolder}/libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include",
"${workspaceFolder}/libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc",
"${workspaceFolder}/libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy",
"${workspaceFolder}/libdaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
"${workspaceFolder}/libdaisy/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc",
"${workspaceFolder}/libdaisy/Middlewares/Third_Party/FatFs/src",
"${workspaceFolder}/libdaisy",
"d:/work/programming/dsp/Eigen/eigen-3.3.8",
"${workspaceFolder}/libdaisy/Drivers/CMSIS/DSP/Include",
"${workspaceFolder}/DaisySP",
"${workspaceFolder}/DaisySP/examples/fastconv",
"${workspaceFolder}/libdaisy/src/hid",
"D:/WORK/PROGRAMMING/DSP/_DAISY/DAISYEXAMPLES/DAISYSP/EXAMPLES/FASTCONV",
"${workspaceFolder}/DaisySP/tests/fastconv",
"${workspaceFolder}/DaisySP/tests/util",
"${workspaceFolder}/DaisySP/modules",
"${workspaceFolder}/libDaisy",
"${workspaceFolder}/libDaisy/src",
"${workspaceFolder}/libDaisy/src/sys",
"${workspaceFolder}/libDaisy/src/usbd",
"${workspaceFolder}/libDaisy/src/usbh",
"${workspaceFolder}/libDaisy/Drivers/CMSIS_5/CMSIS/Core/Include",
"${workspaceFolder}/libDaisy/Drivers/CMSIS-DSP/Include",
"${workspaceFolder}/libDaisy/Drivers/CMSIS-Device/ST/STM32H7xx/Include",
"${workspaceFolder}/libDaisy/Drivers/STM32H7xx_HAL_Driver/Inc",
"${workspaceFolder}/libDaisy/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy",
"${workspaceFolder}/libDaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
"${workspaceFolder}/libDaisy/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc",
"${workspaceFolder}/libDaisy/Middlewares/Patched/ST/STM32_USB_Device_Library/Class/CDC/Inc",
"${workspaceFolder}/libDaisy/Middlewares/ST/STM32_USB_Host_Library/Core/Inc",
"${workspaceFolder}/libDaisy/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc",
"${workspaceFolder}/libDaisy/Middlewares/ST/STM32_USB_Host_Library/Class/MIDI/Inc",
"${workspaceFolder}/libDaisy/Middlewares/Third_Party/FatFs/src",
"${workspaceFolder}/DaisySP/Source",
"${workspaceFolder}/DaisySP/tests/util"
"${workspaceFolder}/DaisySP/Source/Control",
"${workspaceFolder}/DaisySP/Source/Drums",
"${workspaceFolder}/DaisySP/Source/Dynamics",
"${workspaceFolder}/DaisySP/Source/Effects",
"${workspaceFolder}/DaisySP/Source/Filters",
"${workspaceFolder}/DaisySP/Source/Noise",
"${workspaceFolder}/DaisySP/Source/PhysicalModeling",
"${workspaceFolder}/DaisySP/Source/Sampling",
"${workspaceFolder}/DaisySP/Source/Synthesis",
"${workspaceFolder}/DaisySP/Source/Utility",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Control",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Dynamics",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Effects",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Filters",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/PhysicalModeling",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Synthesis",
"${workspaceFolder}/DaisySP/DaisySP-LGPL/Source/Utility"
],
"defines": [
"CORE_CM7",
Expand All @@ -34,9 +48,9 @@
"flash_layout",
"HSE_VALUE=16000000",
"USE_HAL_DRIVER",
"USE_FULL_LL_DRIVER"
"USE_FULL_LL_DRIVER",
"USE_DAISYSP_LGPL"
],
"windowsSdkVersion": "",
"compilerPath": "C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\9 2020-q2-update\\bin\\arm-none-eabi-g++.exe",
"cStandard": "gnu11",
"cppStandard": "gnu++14",
Expand Down
73 changes: 73 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"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": "${fileDirname}/build/${fileDirnameBasename}.elf",
"interface": "swd",
"name": "Debug Blink",
"openOCDLaunchCommands": [
"init",
"reset init",
"gdb_breakpoint_override hard"
],
"preLaunchTask": "Build",
"preRestartCommands": [
"load",
"enable breakpoint",
"monitor reset"
],
"request": "launch",
"runToEntryPoint": "main",
"servertype": "openocd",
"showDevDebugOutput": "both",
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
},
{
"name": "Debug (J-Link)",
"cwd": "${workspaceRoot}",
"device": "STM32H750IB",
"executable": "${fileDirname}/build/${fileDirnameBasename}.elf",
"interface": "swd",
"osx": {
"armToolchainPath": "/Applications/ArmGNUToolchain/12.3.rel1/arm-none-eabi/bin",
"serverpath": "/Applications/SEGGER/JLink/JLinkGDBServerCLExe"
},
"preLaunchTask": "Build",
"request": "launch",
"rttConfig": {
"address": "auto",
"decoders": [
{
"port": 0.000000,
"type": "console"
}
],
"enabled": true
},
"runToEntryPoint": "main",
"serialNumber": "",
"servertype": "jlink",
"svdFile": "${workspaceFolder}/.vscode/STM32H750x.svd",
"type": "cortex-debug",
"liveWatch": {
"enabled": true,
"samplesPerSecond": 4
},
"windows": {
"armToolchainPath": "${workspaceFolder}/tools/cortex_m_gcc13_win/bin",
"serverpath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL.exe"
}
},
],
"version": "0.2.0"
}
55 changes: 53 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,60 @@
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"label": "Build",
"type": "shell",
"command": "make all"
"command": "make",
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Clean",
"type": "shell",
"command": "make clean",
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": []
},
{
"label": "Program (DFU)",
"type": "shell",
"command": "make program-dfu",
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": []
},
{
"label": "Program (Debug Probe)",
"type": "shell",
"command": "make program",
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": []
},
{
"label": "Re-Build",
"type": "shell",
"command": "make clean && make",
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
}
}
]
}
45 changes: 33 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

<!--CI Badges-->
<p align="center">
<a href="https://github.com/electro-smith/libDaisy/actions/workflows/build.yml">
<img src="https://github.com/electro-smith/libDaisy/workflows/Build/badge.svg">
<a href="https://github.com/daisyaudio/libDaisy/actions/workflows/build.yml">
<img src="https://github.com/daisyaudio/libDaisy/workflows/Build/badge.svg">
</a>
<a href="https://github.com/electro-smith/libDaisy/actions/workflows/style.yml">
<img src="https://github.com/electro-smith/libDaisy/workflows/Style/badge.svg">
<a href="https://github.com/daisyaudio/libDaisy/actions/workflows/style.yml">
<img src="https://github.com/daisyaudio/libDaisy/workflows/Style/badge.svg">
</a>
<a href="https://daisy.audio/software/">
<img src="https://github.com/electro-smith/libDaisy/workflows/Documentation/badge.svg">
<img src="https://github.com/daisyaudio/libDaisy/workflows/Documentation/badge.svg">
</a>
</p>

Expand All @@ -22,7 +22,7 @@
<a href="https://discord.gg/ByHBnMtQTR">
<img src="https://img.shields.io/badge/join-us%20on%20discord-gray.svg?longCache=true&logo=discord&colorB=purple">
</a>
<a href="https://forum.electro-smith.com/">
<a href="https://community.daisy.audio/">
<img src="https://img.shields.io/badge/chat-daisy%20forum-orange">
</a>
</p>
Expand All @@ -48,13 +48,13 @@ First off, there are a few ways to clone and initialize the repo (with its submo
You can do either of the following:

```sh
git clone --recursive https://github.com/electro-smith/DaisyExamples
git clone --recursive https://github.com/daisyaudio/DaisyExamples
```

or

```sh
git clone https://github.com/electro-smith/DaisyExamples
git clone https://github.com/daisyaudio/DaisyExamples
git submodule update --init
```

Expand All @@ -75,7 +75,7 @@ This is the same as going to each library's directory and running `make`.
This may take a few minutes depending on your computer's hardware. But should have the following output when finished:

```sh
$ ./ci/build_libs.sh
$ ./ci/build_libs.sh
building libDaisy . . .
rm -fR build
arm-none-eabi-ar: creating build/libdaisy.a
Expand All @@ -93,8 +93,8 @@ However, this may also take a few minutes. An individual example can be compiled

```sh
cd seed/Blink
$ make
arm-none-eabi-g++ -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -I../../libdaisy -I../../libdaisy/src/ -I../../libdaisy/src/usbd -I../../libdaisy/Drivers/CMSIS/Include/ -I../../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libdaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libdaisy/core/ -I../../DaisySP -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/Blink.d"
$ make
arm-none-eabi-g++ -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -I../../libdaisy -I../../libdaisy/src/ -I../../libdaisy/src/usbd -I../../libdaisy/Drivers/CMSIS/Include/ -I../../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libdaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libdaisy/core/ -I../../DaisySP -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/Blink.d"
-fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables -std=gnu++14 -Wa,-a,-ad,-alms=build/Blink.lst Blink.cpp -o build/Blink.o
arm-none-eabi-g++ build/system_stm32h7xx.o build/startup_stm32h750xx.o build/Blink.o -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../../libdaisy/core/STM32H750IB_flash.lds -L../../libdaisy/build -L ../../DaisySP/build -ldaisy -lc -lm -lnosys -ldaisysp -Wl,-Map=build/Blink.map,--cref -Wl,--gc-sections -o build/Blink.elf
arm-none-eabi-size build/Blink.elf
Expand All @@ -106,7 +106,7 @@ arm-none-eabi-objcopy -O binary -S build/Blink.elf build/Blink.bin

### Flashing an example to the Daisy

The example can be programmed via the [Daisy Web Programmer](https://electro-smith.github.io/Programmer/)
The example can be programmed via the [Daisy Web Programmer](https://flash.daisy.audio/)
Or the example can the be programmed on the commandline:

```sh
Expand All @@ -116,6 +116,27 @@ make program-dfu
make program
```

### Using VS Code

If you're using VS Code, there are some tasks configured to run the above commands from the editor without having to open a terminal.

First, open the DaisyExamples repo as the workspace to have access to the commands.

Once you have the workspace open, you can open the source .cpp file, or Makefile for any of the included examples and build it with the "Terminal->Run Build Task" command (CMD/CTRL + SHIFT + B).
This will compile the example you currently have selected.

With the same selected file, you can press F5 or "Run->Start Debugging" to start debugging with an ST-Link debug probe.

There is a second debug configuration available for using Segger J-Link debug probes.
You can select the debug configuration from the Run and Debug panel in VS Code.

In addition to those two commands, you can open the command pallet (CMD/CTRL + P), and type: "task " to see the list of commands that include:

- Clean: removes the build folder for the selected example (runs: `make clean`)
- Program (DFU): programs the example over USB DFU (runs: `make program-dfu`)
- Program (Debug Probe): programs the example over a debug probe like an ST-Link (runs: `make program`)
- Re-Build: cleans, and recompiles the program (useful if you edited header files that may not trigger any change without a full rebuild) (runs: `make clean && make`)

## Updating the submodules

To pull everything for the repo and submodules:
Expand Down
2 changes: 1 addition & 1 deletion ci/build_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Example(object):
def __init__(self, name, ogdir):
self.name = name
self.description = "no desc available yet"
self.url = 'https://raw.githubusercontent.com/electro-smith/'
self.url = 'https://raw.githubusercontent.com/daisyaudio/'
self.platform = ogdir.replace(os.path.sep, '_')
self.url += 'DaisyExamples/master/' + ogdir.replace(os.path.sep, '/') + '/' + self.name + '/README.md'
self.apath = os.path.abspath('/'.join((ogdir, name)))
Expand Down
Loading