|
| 1 | +{ |
| 2 | + "version": "0.2.0", |
| 3 | + "configurations": [ |
| 4 | + { |
| 5 | + "name": "Pico Debug (Cortex-Debug)", |
| 6 | + "cwd": "${userHome}/.pico-sdk/openocd/0.12.0+dev/scripts", |
| 7 | + "executable": "${command:raspberry-pi-pico.launchTargetPath}", |
| 8 | + "request": "launch", |
| 9 | + "type": "cortex-debug", |
| 10 | + "servertype": "openocd", |
| 11 | + "serverpath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe", |
| 12 | + "gdbPath": "${command:raspberry-pi-pico.getGDBPath}", |
| 13 | + "device": "${command:raspberry-pi-pico.getChipUppercase}", |
| 14 | + "configFiles": [ |
| 15 | + "interface/cmsis-dap.cfg", |
| 16 | + "target/${command:raspberry-pi-pico.getTarget}.cfg" |
| 17 | + ], |
| 18 | + "svdFile": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd", |
| 19 | + "runToEntryPoint": "main", |
| 20 | + // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected |
| 21 | + // Also works fine for flash binaries |
| 22 | + "overrideLaunchCommands": [ |
| 23 | + "monitor reset init", |
| 24 | + "load \"${command:raspberry-pi-pico.launchTargetPath}\"" |
| 25 | + ], |
| 26 | + "openOCDLaunchCommands": [ |
| 27 | + "adapter speed 5000" |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "name": "Pico Debug (Cortex-Debug with external OpenOCD)", |
| 32 | + "cwd": "${workspaceRoot}", |
| 33 | + "executable": "${command:raspberry-pi-pico.launchTargetPath}", |
| 34 | + "request": "launch", |
| 35 | + "type": "cortex-debug", |
| 36 | + "servertype": "external", |
| 37 | + "gdbTarget": "localhost:3333", |
| 38 | + "gdbPath": "${command:raspberry-pi-pico.getGDBPath}", |
| 39 | + "device": "${command:raspberry-pi-pico.getChipUppercase}", |
| 40 | + "svdFile": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd", |
| 41 | + "runToEntryPoint": "main", |
| 42 | + // Give restart the same functionality as runToEntryPoint - main |
| 43 | + "postRestartCommands": [ |
| 44 | + "break main", |
| 45 | + "continue" |
| 46 | + ] |
| 47 | + }, |
| 48 | + { |
| 49 | + "name": "Pico Debug (C++ Debugger)", |
| 50 | + "type": "cppdbg", |
| 51 | + "request": "launch", |
| 52 | + "cwd": "${workspaceRoot}", |
| 53 | + "program": "${command:raspberry-pi-pico.launchTargetPath}", |
| 54 | + "MIMode": "gdb", |
| 55 | + "miDebuggerPath": "${command:raspberry-pi-pico.getGDBPath}", |
| 56 | + "miDebuggerServerAddress": "localhost:3333", |
| 57 | + "debugServerPath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe", |
| 58 | + "debugServerArgs": "-f interface/cmsis-dap.cfg -f target/${command:raspberry-pi-pico.getTarget}.cfg -c \"adapter speed 5000\"", |
| 59 | + "serverStarted": "Listening on port .* for gdb connections", |
| 60 | + "filterStderr": true, |
| 61 | + "hardwareBreakpoints": { |
| 62 | + "require": true, |
| 63 | + "limit": 4 |
| 64 | + }, |
| 65 | + "preLaunchTask": "Flash", |
| 66 | + "svdPath": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd" |
| 67 | + }, |
| 68 | + ] |
| 69 | +} |
0 commit comments