debugging in vscode 🎉 (#1942)

This commit is contained in:
Matthew Kennedy 2020-11-11 17:36:15 -08:00 committed by GitHub
parent bb8650179c
commit 07d6b8e1b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 99 additions and 3 deletions

2
.gitignore vendored
View File

@ -14,7 +14,7 @@ doxygen/
/.idea
workspace.xml
java_console_binary
.vscode
.vscode/.*
*.cmp
*.net
err.txt

3
.gitmodules vendored
View File

@ -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

7
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"recommendations": [
"marus25.cortex-debug",
"Gruntfuggly.todo-tree",
"ms-vscode.cpptools"
]
}

30
.vscode/launch.json vendored
View File

@ -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
}
]
}

59
.vscode/tasks.json vendored Normal file
View File

@ -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
}
}
]
}

@ -0,0 +1 @@
Subproject commit e5db2387d9c48359c9c5229a5bb436cf2ed5381f