5

I am trying to debug a Raspberry Pi Pico with the debug probe and am following the Raspberry Pi Debug Probe tutorial.

When I try and upload my first program to the pico I get the following error.

$  sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program blink.elf verify reset exit"

Open On-Chip Debugger 0.12.0-g4257276 (2023-01-27-10:19)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : Hardware thread awareness created
Info : Hardware thread awareness created
adapter speed: 5000 kHz

Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6616407E32D4229
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 5000 kHz
Error: Failed to connect multidrop rp2040.dap0
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
Edwin Shepherd
  • 211
  • 3
  • 9

2 Answers2

4

Your output indicates that your computer successfully connected to the debugger but not the pico. Check that the Pi Pico is:

  • Powered
  • Is actually connected

I had an issue where the case overhangs the connectors too much and with just my fingers I am able to get the JST connector to appear to be secure however it's not making contact. Removing the debugger from its case and plugging in the JST connector again fixes the problem.

Edwin Shepherd
  • 211
  • 3
  • 9
0

I had the same issue, in my case the Picoprob was the one to blame (the GPIO most likely). The computer could see the Picoprob fine but the pin from the Picoprobe were damaged somehow.

I just dropped the debugger UF2 file into a brand new pico and I manage to debug first try after that.

MatsK
  • 2,882
  • 3
  • 17
  • 22
Drone
  • 1