launch.json 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.1.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.1.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. "name": "Pico Debug (C++ Debugger)",
  51. "type": "cppdbg",
  52. "request": "launch",
  53. "cwd": "${workspaceRoot}",
  54. "program": "${command:raspberry-pi-pico.launchTargetPath}",
  55. "MIMode": "gdb",
  56. "miDebuggerPath": "${command:raspberry-pi-pico.getGDBPath}",
  57. "miDebuggerServerAddress": "localhost:3333",
  58. "debugServerPath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe",
  59. "debugServerArgs": "-f interface/cmsis-dap.cfg -f target/${command:raspberry-pi-pico.getTarget}.cfg -c \"adapter speed 5000\"",
  60. "serverStarted": "Listening on port .* for gdb connections",
  61. "filterStderr": true,
  62. "hardwareBreakpoints": {
  63. "require": true,
  64. "limit": 4
  65. },
  66. "preLaunchTask": "Flash",
  67. "svdPath": "${userHome}/.pico-sdk/sdk/2.1.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChipUppercase}.svd"
  68. },
  69. ]
  70. }