Skip to content

Commit

Permalink
Add debug Mbed bootloader option to launch.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ATmobica committed Jan 24, 2022
1 parent 24bbc77 commit 30a8e28
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,66 @@
"quit"
],
"showDevDebugOutput": false // When set to true, displays output of GDB.
},

{
"name": "Debug Mbed bootloader",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/platform/mbed/bootloader",
"executable": "./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-bootloader.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"servertype": "openocd",
"openocdPath": "${env:OPENOCD_PATH/bin}",
"searchDir": [
"${workspaceRoot}/config/mbed/scripts",
"${env:OPENOCD_PATH}/scripts"
],
"configFiles": ["${input:mbedTarget}.tcl"],
"overrideLaunchCommands": [
"-enable-pretty-printing",
"monitor program {./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-bootloader.hex}",
"monitor reset run",
"monitor sleep 200",
"monitor psoc6 reset_halt sysresetreq"
],
"numberOfProcessors": 2,
"targetProcessor": 1, // Set to 0 for the CM0+, set to 1 for the CM4
"overrideRestartCommands": [
"monitor reset init",
"monitor reset run",
"monitor sleep 200",
"monitor psoc6 reset_halt sysresetreq"
],
"runToMain": true, // if true, program will halt at main. Not used for a restart
"showDevDebugOutput": false // When set to true, displays output of GDB.
},

{
"name": "Debug Mbed bootloader [remote]",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/platform/mbed/bootloader",
"executable": "./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-bootloader.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required
"servertype": "external",
"gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4
"overrideLaunchCommands": [
"-enable-pretty-printing",
"monitor reset halt",
"load ./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-bootloader.hex",
"monitor reset run",
"monitor sleep 200",
"monitor psoc6 reset_halt sysresetreq"
],
"overrideRestartCommands": [
"monitor reset init",
"monitor reset run",
"monitor sleep 200",
"monitor psoc6 reset_halt sysresetreq"
],
"runToMain": true, // if true, program will halt at main. Not used for a restart
"showDevDebugOutput": false // When set to true, displays output of GDB.
}
],
"inputs": [
Expand Down

0 comments on commit 30a8e28

Please sign in to comment.