|
@@ -2,31 +2,68 @@
|
|
|
"version": "0.2.0",
|
|
|
"configurations": [
|
|
|
{
|
|
|
- "name": "Pico Debug",
|
|
|
- "cwd": "${workspaceRoot}",
|
|
|
- "executable": "${command:cmake.launchTargetPath}",
|
|
|
+ "name": "Pico Debug (Cortex-Debug)",
|
|
|
+ "cwd": "${userHome}/.pico-sdk/openocd/0.12.0+dev/scripts",
|
|
|
+ "executable": "${command:raspberry-pi-pico.launchTargetPath}",
|
|
|
"request": "launch",
|
|
|
"type": "cortex-debug",
|
|
|
"servertype": "openocd",
|
|
|
- // This may need to be "arm-none-eabi-gdb" for some previous builds
|
|
|
- "gdbPath" : "arm-none-eabi-gdb",
|
|
|
- //"gdbPath" : "gdb-multiarch",
|
|
|
- "device": "RP2040",
|
|
|
+ "serverpath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe",
|
|
|
+ "gdbPath": "${command:raspberry-pi-pico.getGDBPath}",
|
|
|
+ "device": "${command:raspberry-pi-pico.getChipUppercase}",
|
|
|
"configFiles": [
|
|
|
- // This may need to be "interface/picoprobe.cfg" for some previous builds
|
|
|
"interface/cmsis-dap.cfg",
|
|
|
- //"interface/picoprobe.cfg",
|
|
|
- "target/rp2040.cfg"
|
|
|
+ "target/${command:raspberry-pi-pico.getTarget}.cfg"
|
|
|
],
|
|
|
- "svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
|
|
|
+ "svdFile": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd",
|
|
|
"runToEntryPoint": "main",
|
|
|
- // Work around for stopping at main on restart
|
|
|
+ // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
|
|
|
+ // Also works fine for flash binaries
|
|
|
+ "overrideLaunchCommands": [
|
|
|
+ "monitor reset init",
|
|
|
+ "load \"${command:raspberry-pi-pico.launchTargetPath}\""
|
|
|
+ ],
|
|
|
+ "openOCDLaunchCommands": [
|
|
|
+ "adapter speed 5000"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "Pico Debug (Cortex-Debug with external OpenOCD)",
|
|
|
+ "cwd": "${workspaceRoot}",
|
|
|
+ "executable": "${command:raspberry-pi-pico.launchTargetPath}",
|
|
|
+ "request": "launch",
|
|
|
+ "type": "cortex-debug",
|
|
|
+ "servertype": "external",
|
|
|
+ "gdbTarget": "localhost:3333",
|
|
|
+ "gdbPath": "${command:raspberry-pi-pico.getGDBPath}",
|
|
|
+ "device": "${command:raspberry-pi-pico.getChipUppercase}",
|
|
|
+ "svdFile": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd",
|
|
|
+ "runToEntryPoint": "main",
|
|
|
+ // Give restart the same functionality as runToEntryPoint - main
|
|
|
"postRestartCommands": [
|
|
|
"break main",
|
|
|
"continue"
|
|
|
- ],
|
|
|
- "searchDir": ["${workspaceFolder}/../openocd/tcl/"],
|
|
|
- "openOCDLaunchCommands": ["adapter speed 5000"]
|
|
|
- }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "Pico Debug (C++ Debugger)",
|
|
|
+ "type": "cppdbg",
|
|
|
+ "request": "launch",
|
|
|
+ "cwd": "${workspaceRoot}",
|
|
|
+ "program": "${command:raspberry-pi-pico.launchTargetPath}",
|
|
|
+ "MIMode": "gdb",
|
|
|
+ "miDebuggerPath": "${command:raspberry-pi-pico.getGDBPath}",
|
|
|
+ "miDebuggerServerAddress": "localhost:3333",
|
|
|
+ "debugServerPath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe",
|
|
|
+ "debugServerArgs": "-f interface/cmsis-dap.cfg -f target/${command:raspberry-pi-pico.getTarget}.cfg -c \"adapter speed 5000\"",
|
|
|
+ "serverStarted": "Listening on port .* for gdb connections",
|
|
|
+ "filterStderr": true,
|
|
|
+ "hardwareBreakpoints": {
|
|
|
+ "require": true,
|
|
|
+ "limit": 4
|
|
|
+ },
|
|
|
+ "preLaunchTask": "Flash",
|
|
|
+ "svdPath": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd"
|
|
|
+ },
|
|
|
]
|
|
|
}
|