launch.json 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. "debuggerArgs": ["-ex", "set debug-file-directory /debug"],
  14. "device": "${command:raspberry-pi-pico.getChipUppercase}",
  15. "configFiles": [
  16. "interface/cmsis-dap.cfg",
  17. "target/${command:raspberry-pi-pico.getTarget}.cfg"
  18. ],
  19. "svdFile": "${userHome}/.pico-sdk/sdk/2.3.1/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd",
  20. "runToEntryPoint": "main",
  21. // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
  22. // Also works fine for flash binaries
  23. "overrideLaunchCommands": [
  24. "monitor reset init",
  25. "load \"${command:raspberry-pi-pico.launchTargetPath}\""
  26. ],
  27. "openOCDLaunchCommands": [
  28. "adapter speed 5000"
  29. ]
  30. },
  31. {
  32. "name": "Pico Debug (Cortex-Debug with external OpenOCD)",
  33. "cwd": "${workspaceRoot}",
  34. "executable": "${command:raspberry-pi-pico.launchTargetPath}",
  35. "request": "launch",
  36. "type": "cortex-debug",
  37. "servertype": "external",
  38. "gdbTarget": "localhost:3333",
  39. "gdbPath": "${command:raspberry-pi-pico.getGDBPath}",
  40. "debuggerArgs": ["-ex", "set debug-file-directory /debug"],
  41. "device": "${command:raspberry-pi-pico.getChipUppercase}",
  42. "svdFile": "${userHome}/.pico-sdk/sdk/2.3.1/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd",
  43. "runToEntryPoint": "main",
  44. // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
  45. // Also works fine for flash binaries
  46. "overrideLaunchCommands": [
  47. "monitor reset init",
  48. "load \"${command:raspberry-pi-pico.launchTargetPath}\""
  49. ]
  50. }
  51. ]
  52. }