Skip to content

Commit

Permalink
Add vscode debug configuration as a template (#2109)
Browse files Browse the repository at this point in the history
  • Loading branch information
u-foka authored Apr 17, 2024
1 parent 990f63e commit bb1b703
Showing 1 changed file with 148 additions and 0 deletions.
148 changes: 148 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) JTAG probe",
"type": "cppdbg",
"request": "launch",
"miDebuggerPath": "arm-none-eabi-gdb",
"targetArchitecture": "arm",
"program": "${workspaceRoot}/build/firmware/baseband/baseband_adsbrx.elf",
"cwd": "${workspaceRoot}",
"setupCommands": [
// use logging for troubleshooting
//{"text": "set logging file ${workspaceRoot}/build/arm-none-eabi-gdb.log"},
//{"text": "set logging on"},
{
"text": "file '${workspaceRoot}/build/firmware/baseband/baseband_adsbrx.elf'"
},
{
"text": "target extended-remote /dev/ttyACM0"
},
{
"text": "monitor swdp_scan"
},
{
"text": "attach 1"
},
],
"launchCompleteCommand": "None",
"externalConsole": false,
},
{
"name": "(gdb) OpenOCD m4 baseband",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/firmware/baseband/baseband_sd_over_usb.elf",
"args": [],
"cwd": "${workspaceRoot}",
// "environment": [
// {
// "name": "PATH",
// "value": "${env:PATH}"
// }
// ],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb",
"targetArchitecture": "arm",
"debugServerPath": "openocd",
"debugServerArgs": "-f interface/ftdi/um232h.cfg -f target/lpc4350.cfg -c \"gdb_breakpoint_override hard\"",
"serverStarted": "Listening on port [0-9]+ for gdb connections",
"filterStderr": true,
"filterStdout": false,
"launchCompleteCommand": "None",
"postRemoteConnectCommands": [
{
"description": "Target Remote Device on Port 3333",
"text": "target extended-remote :3333",
"ignoreFailures": false
},
{
"description": "Respect Hardware Limitations",
"text": "set remote hardware-watchpoint-limit 2",
"ignoreFailures": false
},
{
"description": "Respect Hardware Limitations",
"text": "set remote hardware-breakpoint-limit 4",
"ignoreFailures": false
},
{
"description": "Shutdown GDB Server on GDB Detach",
"text": "monitor [target current] configure -event gdb-detach { shutdown }",
"ignoreFailures": false
},
],
"stopAtConnect": false,
"logging": {
"exceptions": true,
"engineLogging": false,
"moduleLoad": true,
"programOutput": true,
"trace": false,
"traceResponse": false
},
"useExtendedRemote": true
},
{
"name": "(gdb) OpenOCD m0 application",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/firmware/application/application.elf",
"args": [],
"cwd": "${workspaceRoot}",
// "environment": [
// {
// "name": "PATH",
// "value": "${env:PATH}"
// }
// ],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb",
"targetArchitecture": "arm",
"debugServerPath": "openocd",
"debugServerArgs": "-f interface/ftdi/um232h.cfg -f target/lpc4350.cfg -c \"gdb_breakpoint_override hard\"",
"serverStarted": "Listening on port [0-9]+ for gdb connections",
"filterStderr": true,
"filterStdout": false,
"launchCompleteCommand": "None",
"postRemoteConnectCommands": [
{
"description": "Target Remote Device on Port 3334",
"text": "target extended-remote :3334",
"ignoreFailures": false
},
{
"description": "Respect Hardware Limitations",
"text": "set remote hardware-watchpoint-limit 1",
"ignoreFailures": false
},
{
"description": "Respect Hardware Limitations",
"text": "set remote hardware-breakpoint-limit 2",
"ignoreFailures": false
},
{
"description": "Shutdown GDB Server on GDB Detach",
"text": "monitor [target current] configure -event gdb-detach { shutdown }",
"ignoreFailures": false
},
],
"stopAtConnect": false,
"logging": {
"exceptions": true,
"engineLogging": false,
"moduleLoad": true,
"programOutput": true,
"trace": false,
"traceResponse": false
},
"useExtendedRemote": true
},
]
}

0 comments on commit bb1b703

Please sign in to comment.