Search code examples
vscode-extensionsvscode-debuggervscode-tasksraspberry-pi-pico

Configuring OpenOCD debug on VSCODE with the Raspberry Pico as a target using the Debug-Probe - No working solution found


I have been pulling my hair out trying to configure VSCode on MacOS to support the above mention configuration. The debugging works on the command line: I started the OpenOCD server in a separate terminal window like this:

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"

Which starts fine and recognises the debug probe.

In a terminal window within VSCode I select the PICO examples build/blink directory and I start the debugger:

arm-none-eabi-gdb blink.elf

and I can happily set breakpoints etc. So the basic setup works, and the targets built by VSCode are proper.

However, to get visual debugging within the GUI fails. I have tried various variations of 'launch.json', 'settings.json' and 'tasks.json' but none seem to work.

The variations I found on the various sites are all similar, but none of them are functional. I also tried variations of json files in the 'ide/vscode' as distributed but no succes..

I am using VSCode Version on MacOS Monterey 12.6.7: 1.79.2 (Universal) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:58:52.392Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 21.6.0

Does anybody have this working on a system similar to mine? If so, what are the settings in the json files.

I did install OpenOCD for MacOS (chipcode-nl.picoprobe-mac) as well, but that does not seems to be very functional. As I explained above, the basis setup for OpenOCD from the command line works...


Solution

  • Install "Cortex-debug" is the answer. Thanks to hcheung