diff --git a/.gitignore b/.gitignore index b0eaa0c043..4955471b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ doxygen/ /.idea workspace.xml java_console_binary -.vscode +.vscode/.* *.cmp *.net err.txt diff --git a/.gitmodules b/.gitmodules index 44a4af1c1c..7b62e9a260 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,3 +15,6 @@ [submodule "hardware/InteractiveHtmlBom"] path = hardware/InteractiveHtmlBom url = https://github.com/openscopeproject/InteractiveHtmlBom.git +[submodule "firmware/ext/cmsis-svd"] + path = firmware/ext/cmsis-svd + url = https://github.com/posborne/cmsis-svd diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..51e530ec51 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "marus25.cortex-debug", + "Gruntfuggly.todo-tree", + "ms-vscode.cpptools" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 843e28df74..375a6017cc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "(gdb) Launch", + "name": "Debug Unit Tests", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/unit_tests/build/rusefi_test", @@ -23,6 +23,32 @@ "ignoreFailures": true } ] - } + }, + { + "name": "Debug F40x", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceFolder}", + "executable": "${workspaceRoot}/firmware/build/rusefi.elf", + "device": "STM32F407V", + "v1": false, + "svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F405.svd", + "servertype": "openocd", + "configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"], + "runToMain": true + }, + { + "name": "Debug F42x", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceFolder}", + "executable": "${workspaceRoot}/firmware/build/rusefi.elf", + "device": "STM32F429Z", + "v1": false, + "svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F427.svd", + "servertype": "openocd", + "configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"], + "runToMain": true + } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..1d85349c8f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,59 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build Firmware (Frankenso/default)", + "type": "shell", + "command": "make -j12", + "options": { + "cwd": "${workspaceRoot}/firmware" + }, + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Firmware (Proteus F4)", + "type": "shell", + "command": "make -j12 PROJECT_BOARD=proteus", + "options": { + "cwd": "${workspaceRoot}/firmware" + }, + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Firmware (microRusEfi F4)", + "type": "shell", + "command": "make -j12 PROJECT_BOARD=microrusefi", + "options": { + "cwd": "${workspaceRoot}/firmware" + }, + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Unit Tests", + "type": "shell", + "command": "make -j12", + "options": { + "cwd": "${workspaceRoot}/unit_tests" + }, + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/firmware/ext/cmsis-svd b/firmware/ext/cmsis-svd new file mode 160000 index 0000000000..e5db2387d9 --- /dev/null +++ b/firmware/ext/cmsis-svd @@ -0,0 +1 @@ +Subproject commit e5db2387d9c48359c9c5229a5bb436cf2ed5381f