Hi,
I use Ubuntu with VisualStudioCode to develop for RP2040.
All works fine, now I want try to debug code using another pi-pico as debugprobe where I have installed debugprobe_on_pico.uf2 and I have made the connection with the second pi-pico.
With console commad lsusb I can view the debugprobe Bus 001 Device 009: ID 2e8a:000c Raspberry Pi Debugprobe on Pico (CMSIS-DAP)
I have downaloded the rules files (an copied to /etx/udev/rules.d): 60-openocd.rules, 99-openocd.rules, 99-picotool.rules
I can start openocd from command line with command :
./openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
and debug with command
gdb-multiarch blink.elf
But in VSC I can't. Seems that start openocd start fine (in the gdb-server console i view this message)
Thank's in advance for the help
Fabio
I use Ubuntu with VisualStudioCode to develop for RP2040.
All works fine, now I want try to debug code using another pi-pico as debugprobe where I have installed debugprobe_on_pico.uf2 and I have made the connection with the second pi-pico.
With console commad lsusb I can view the debugprobe Bus 001 Device 009: ID 2e8a:000c Raspberry Pi Debugprobe on Pico (CMSIS-DAP)
I have downaloded the rules files (an copied to /etx/udev/rules.d): 60-openocd.rules, 99-openocd.rules, 99-picotool.rules
I can start openocd from command line with command :
./openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
and debug with command
gdb-multiarch blink.elf
But in VSC I can't. Seems that start openocd start fine (in the gdb-server console i view this message)
but is immediately terminated (in the DEBUG CONSOLE I view this message)[2025-02-22T15:01:51.487Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /home/fabio/Documenti/pico/blink -f /home/fabio/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f interface/cmsis-dap.cfg -f target/rp2040.cfg
[2025-02-22T15:01:53.676Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
For launch.json I have used the master file launch-probe-swd.json downloaded from pico example repositoryCortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from objdump-multiarch --syms -C -h -w /home/fabio/Documenti/pico/blink/build/blink.elf
Reading symbols from nm-multiarch --defined-only -S -l -C -p /home/fabio/Documenti/pico/blink/build/blink.elf
Launching GDB: gdb-multiarch -q --interpreter=mi2
IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
Launching gdb-server: openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /home/fabio/Documenti/pico/blink -f /home/fabio/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f interface/cmsis-dap.cfg -f target/rp2040.cfg
Please check TERMINAL tab (gdb-server) for output from openocd
Finished reading symbols from objdump: Time: 46 ms
Failed to launch OpenOCD GDB Server: Error: spawn openocd ENOENT
Thank's in advance for the help
Fabio
Statistics: Posted by crovy — Sat Feb 22, 2025 3:37 pm — Replies 0 — Views 47