launch.json 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.2.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.2.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd",
  41. "runToEntryPoint": "main",
  42. // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
  43. // Also works fine for flash binaries
  44. "overrideLaunchCommands": [
  45. "monitor reset init",
  46. "load \"${command:raspberry-pi-pico.launchTargetPath}\""
  47. ]
  48. },
  49. ]
  50. }