|
1 |
| - { |
| 1 | +{ |
2 | 2 | "version": "0.1.0",
|
3 | 3 | "configurations": [
|
4 | 4 | {
|
5 | 5 | "name": "Debug - Openocd docker Remote",
|
6 |
| - "type":"cortex-debug", |
7 |
| - "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin", |
| 6 | + "type": "cortex-debug", |
8 | 7 | "cwd": "${workspaceRoot}",
|
9 | 8 | "executable": "${command:cmake.launchTargetPath}",
|
10 | 9 | "request": "launch",
|
11 | 10 | "servertype": "external",
|
12 |
| - // This may need to be arm-none-eabi-gdb depending on your system |
13 |
| - "gdbPath" : "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb", |
| 11 | + "gdbPath": "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb", |
14 | 12 | // Connect to an already running OpenOCD instance
|
15 | 13 | "gdbTarget": "host.docker.internal:3333",
|
16 | 14 | "svdFile": "${workspaceRoot}/nrf52.svd",
|
17 |
| - "runToMain": true, |
| 15 | + "runToEntryPoint": "main", |
18 | 16 | // Work around for stopping at main on restart
|
19 | 17 | "postRestartCommands": [
|
20 | 18 | "break main",
|
|
23 | 21 | },
|
24 | 22 | {
|
25 | 23 | "name": "Debug - Openocd Local",
|
26 |
| - "type":"cortex-debug", |
27 |
| - "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin", |
| 24 | + "type": "cortex-debug", |
28 | 25 | "cwd": "${workspaceRoot}",
|
29 | 26 | "executable": "${command:cmake.launchTargetPath}",
|
30 | 27 | "request": "launch",
|
31 | 28 | "servertype": "openocd",
|
32 |
| - // This may need to be arm-none-eabi-gdb depending on your system |
33 |
| - "gdbPath" : "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb", |
| 29 | + "gdbPath": "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb", |
34 | 30 | // Connect to an already running OpenOCD instance
|
35 | 31 | "gdbTarget": "localhost:3333",
|
36 | 32 | "svdFile": "${workspaceRoot}/nrf52.svd",
|
37 |
| - "runToMain": true, |
| 33 | + "runToEntryPoint": "main", |
38 | 34 | // Work around for stopping at main on restart
|
39 | 35 | "postRestartCommands": [
|
40 | 36 | "break main",
|
|
51 | 47 | "showDevDebugOutput": false,
|
52 | 48 | "servertype": "openocd",
|
53 | 49 | "runToMain": true,
|
| 50 | + // Work around for stopping at main on restart |
| 51 | + "postRestartCommands": [ |
| 52 | + "break main", |
| 53 | + "continue" |
| 54 | + ], |
54 | 55 | // Only use armToolchainPath if your arm-none-eabi-gdb is not in your path (some GCC packages does not contain arm-none-eabi-gdb)
|
55 | 56 | "armToolchainPath": "${workspaceRoot}/../gcc-arm-none-eabi-10.3-2021.10/bin",
|
56 | 57 | "svdFile": "${workspaceRoot}/nrf52.svd",
|
57 | 58 | "configFiles": [
|
58 | 59 | "interface/stlink.cfg",
|
59 | 60 | "target/nrf52.cfg"
|
60 | 61 | ],
|
61 |
| - } |
62 |
| - |
| 62 | + }, |
| 63 | + { |
| 64 | + "name": "Debug - Openocd Devcontainer", |
| 65 | + "type": "cortex-debug", |
| 66 | + "cwd": "${workspaceRoot}", |
| 67 | + "executable": "${command:cmake.launchTargetPath}", |
| 68 | + "request": "launch", |
| 69 | + "servertype": "external", |
| 70 | + // FIXME: This is hardcoded. I have no idea how to use the values set in build.sh here |
| 71 | + "gdbPath": "/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb", |
| 72 | + // Connect to an already running OpenOCD instance |
| 73 | + "gdbTarget": "host.docker.internal:3333", |
| 74 | + "svdFile": "${workspaceRoot}/nrf52.svd", |
| 75 | + "runToEntryPoint": "main", |
| 76 | + // Work around for stopping at main on restart |
| 77 | + "postRestartCommands": [ |
| 78 | + "break main", |
| 79 | + "continue" |
| 80 | + ] |
| 81 | + }, |
63 | 82 | ]
|
64 | 83 | }
|
0 commit comments