Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 92 additions & 56 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,93 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Tests Locally",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/tests/build/bin/libDaisy_gtest",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/tests/build/bin",
"environment": [],
"externalConsole": false,
"logging": {
"engineLogging": false
},
"preLaunchTask": "build-libDaisy-tests",
"osx": {
"MIMode": "lldb",
},
"windows": {
"MIMode": "gdb",
}
},
{
"name": "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}/examples/SDMMC_HelloWorld/build/SDMMC_HelloWorld.elf",
"executable": "${workspaceRoot}/examples/uart/Dma_Receive/build/Dma_Receive.elf",
"interface": "swd",
"openOCDLaunchCommands": [
"init",
"reset init",
"gdb_breakpoint_override hard"
],
"preRestartCommands": [
"load",
"enable breakpoint",
"monitor reset"
],
"request": "launch",
"runToEntryPoint": "true",
"servertype": "openocd",
"showDevDebugOutput": "none",
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Launch Tests Locally",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/tests/build/bin/libDaisy_gtest",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/tests/build/bin",
"environment": [],
"externalConsole": false,
"logging": {
"engineLogging": false
},
"preLaunchTask": "build-libDaisy-tests",
"osx": {
"MIMode": "lldb",
},
"windows": {
"MIMode": "gdb",
}
},
{
"name": "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}/examples/SDMMC_HelloWorld/build/SDMMC_HelloWorld.elf",
"executable": "${workspaceRoot}/examples/uart/Dma_Receive/build/Dma_Receive.elf",
"interface": "swd",
"openOCDLaunchCommands": [
"init",
"reset init",
"gdb_breakpoint_override hard"
],
"preRestartCommands": [
"load",
"enable breakpoint",
"monitor reset"
],
"request": "launch",
"runToEntryPoint": "true",
"servertype": "openocd",
"showDevDebugOutput": "none",
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
},
{
"name": "Debug (J-Link)",
"cwd": "${workspaceRoot}",
"device": "STM32H750IB",
"executable": "${workspaceRoot}/examples/WavPlayer/build/WavPlayer.elf",
"interface": "swd",
"osx": {
"armToolchainPath": "/Applications/ArmGNUToolchain/12.3.rel1/arm-none-eabi/bin",
"serverpath": "/Applications/SEGGER/JLink/JLinkGDBServerCLExe"
},
// "preLaunchTask": "Build Project",
"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"
}
},
]
}
201 changes: 107 additions & 94 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,108 @@
{
"cortex-debug.enableTelemetry": false,
"files.associations": {
"*.tcc": "cpp",
"unordered_map": "cpp",
"fstream": "cpp",
"istream": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"random": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"new": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"typeinfo": "cpp",
"complex": "cpp",
"bitset": "cpp",
"cinttypes": "cpp",
"ctime": "cpp",
"iomanip": "cpp",
"iostream": "cpp",
"any": "cpp",
"chrono": "cpp",
"condition_variable": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_set": "cpp",
"ratio": "cpp",
"regex": "cpp",
"shared_mutex": "cpp",
"variant": "cpp"
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "googletest.failed",
"settings": {
"foreground": "#f00"
}
},
{
"scope": "googletest.passed",
"settings": {
"foreground": "#0f0"
}
},
{
"scope": "googletest.run",
"settings": {
"foreground": "#0f0"
}
}
]
},
"testMate.cpp.test.executables": "tests/build/bin/*",
"cmake.sourceDirectory": [
"${workspaceFolder}",
"${workspaceFolder}/tests",
],
"cmake.buildDirectory": "${sourceDirectory}/build",
}
"cortex-debug.enableTelemetry": false,
"files.associations": {
"*.tcc": "cpp",
"unordered_map": "cpp",
"fstream": "cpp",
"istream": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"random": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"new": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"typeinfo": "cpp",
"complex": "cpp",
"bitset": "cpp",
"cinttypes": "cpp",
"ctime": "cpp",
"iomanip": "cpp",
"iostream": "cpp",
"any": "cpp",
"chrono": "cpp",
"condition_variable": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_set": "cpp",
"ratio": "cpp",
"regex": "cpp",
"shared_mutex": "cpp",
"variant": "cpp",
"__bit_reference": "cpp",
"__config": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__node_handle": "cpp",
"__tree": "cpp",
"compare": "cpp",
"__memory": "cpp",
"filesystem": "cpp",
"ios": "cpp",
"locale": "cpp",
"mutex": "cpp",
"__split_buffer": "cpp"
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "googletest.failed",
"settings": {
"foreground": "#f00"
}
},
{
"scope": "googletest.passed",
"settings": {
"foreground": "#0f0"
}
},
{
"scope": "googletest.run",
"settings": {
"foreground": "#0f0"
}
}
]
},
"testMate.cpp.test.executables": "tests/build/bin/*",
"cmake.sourceDirectory": [
"${workspaceFolder}",
"${workspaceFolder}/tests",
],
"cmake.buildDirectory": "${sourceDirectory}/build",
}
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ add_library(daisy STATIC
${MODULE_DIR}/hid/usb_host.cpp
${MODULE_DIR}/hid/usb_midi.cpp
${MODULE_DIR}/hid/usb.cpp
${MODULE_DIR}/hid/wavplayer.cpp
${MODULE_DIR}/per/adc.cpp
${MODULE_DIR}/per/dac.cpp
${MODULE_DIR}/per/gpio.cpp
Expand Down Expand Up @@ -115,6 +114,11 @@ target_link_libraries(daisy PUBLIC
FatFs
)

# There is a abstract `IReader` interface that allows that can be swappped out
# for other i/o, but libDaisy assumes FatFS will always be present.
# It may make sense for this to move to better facillitate testing, etc.
add_compile_definitions(FILEIO_ENABLE_FATFS_READER)

target_compile_options(daisy PRIVATE
-Wall

Expand All @@ -126,13 +130,15 @@ target_compile_options(daisy PRIVATE
$<$<CXX_COMPILER_ID:GNU>:-Wno-missing-attributes>
)


set_target_properties(daisy PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED
C_STANDARD 11
C_STANDARD_REQUIRED
)


# Don't add examples if we're being included in another project
if(PROJECT_IS_TOP_LEVEL)
add_subdirectory(examples EXCLUDE_FROM_ALL)
Expand Down
Loading
Loading