2024-03-23 05:45:45 -04:00
|
|
|
{
|
2021-07-25 16:12:34 -04:00
|
|
|
"version": "0.1.0",
|
|
|
|
"configurations": [
|
|
|
|
{
|
|
|
|
"name": "Debug - Openocd docker Remote",
|
2024-03-23 05:45:45 -04:00
|
|
|
"type": "cortex-debug",
|
2021-07-25 16:12:34 -04:00
|
|
|
"cwd": "${workspaceRoot}",
|
|
|
|
"executable": "${command:cmake.launchTargetPath}",
|
|
|
|
"request": "launch",
|
|
|
|
"servertype": "external",
|
2024-03-23 05:45:45 -04:00
|
|
|
"gdbPath": "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb",
|
2021-07-25 16:12:34 -04:00
|
|
|
// Connect to an already running OpenOCD instance
|
|
|
|
"gdbTarget": "host.docker.internal:3333",
|
|
|
|
"svdFile": "${workspaceRoot}/nrf52.svd",
|
2024-03-23 05:45:45 -04:00
|
|
|
"runToEntryPoint": "main",
|
2021-07-25 16:12:34 -04:00
|
|
|
// Work around for stopping at main on restart
|
|
|
|
"postRestartCommands": [
|
|
|
|
"break main",
|
|
|
|
"continue"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Debug - Openocd Local",
|
2024-03-23 05:45:45 -04:00
|
|
|
"type": "cortex-debug",
|
2021-07-25 16:12:34 -04:00
|
|
|
"cwd": "${workspaceRoot}",
|
|
|
|
"executable": "${command:cmake.launchTargetPath}",
|
|
|
|
"request": "launch",
|
|
|
|
"servertype": "openocd",
|
2024-03-23 05:45:45 -04:00
|
|
|
"gdbPath": "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb",
|
2021-07-25 16:12:34 -04:00
|
|
|
// Connect to an already running OpenOCD instance
|
|
|
|
"gdbTarget": "localhost:3333",
|
|
|
|
"svdFile": "${workspaceRoot}/nrf52.svd",
|
2024-03-23 05:45:45 -04:00
|
|
|
"runToEntryPoint": "main",
|
2021-07-25 16:12:34 -04:00
|
|
|
// Work around for stopping at main on restart
|
|
|
|
"postRestartCommands": [
|
|
|
|
"break main",
|
|
|
|
"continue"
|
|
|
|
]
|
2021-08-14 15:24:26 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cwd": "${workspaceRoot}",
|
|
|
|
// TODO: find better way to get latest build filename
|
|
|
|
"executable": "./build/src/pinetime-app-1.3.0.out",
|
|
|
|
"name": "Debug OpenOCD ST-LINK pinetime-app-1.3.0.out",
|
|
|
|
"request": "launch",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"showDevDebugOutput": false,
|
|
|
|
"servertype": "openocd",
|
|
|
|
"runToMain": true,
|
2024-03-23 05:45:45 -04:00
|
|
|
// Work around for stopping at main on restart
|
|
|
|
"postRestartCommands": [
|
|
|
|
"break main",
|
|
|
|
"continue"
|
|
|
|
],
|
2021-08-14 15:24:26 -04:00
|
|
|
// Only use armToolchainPath if your arm-none-eabi-gdb is not in your path (some GCC packages does not contain arm-none-eabi-gdb)
|
2022-06-26 16:14:35 -04:00
|
|
|
"armToolchainPath": "${workspaceRoot}/../gcc-arm-none-eabi-10.3-2021.10/bin",
|
2021-08-14 15:24:26 -04:00
|
|
|
"svdFile": "${workspaceRoot}/nrf52.svd",
|
|
|
|
"configFiles": [
|
|
|
|
"interface/stlink.cfg",
|
|
|
|
"target/nrf52.cfg"
|
|
|
|
],
|
2024-03-23 05:45:45 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Debug - Openocd Devcontainer",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"cwd": "${workspaceRoot}",
|
|
|
|
"executable": "${command:cmake.launchTargetPath}",
|
|
|
|
"request": "launch",
|
|
|
|
"servertype": "external",
|
|
|
|
// FIXME: This is hardcoded. I have no idea how to use the values set in build.sh here
|
|
|
|
"gdbPath": "/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb",
|
|
|
|
// Connect to an already running OpenOCD instance
|
|
|
|
"gdbTarget": "host.docker.internal:3333",
|
|
|
|
"svdFile": "${workspaceRoot}/nrf52.svd",
|
|
|
|
"runToEntryPoint": "main",
|
|
|
|
// Work around for stopping at main on restart
|
|
|
|
"postRestartCommands": [
|
|
|
|
"break main",
|
|
|
|
"continue"
|
|
|
|
]
|
|
|
|
},
|
2021-07-25 16:12:34 -04:00
|
|
|
]
|
2021-08-14 15:24:26 -04:00
|
|
|
}
|