raspberrypi / debugprobe

791 stars 212 forks source link

OpenOCD Unable to Connect to debugprobe #126

Closed NikitaiDev closed 6 days ago

NikitaiDev commented 8 months ago
          @fpaterra , Hello, I'm encountering the same issue with the Pico Probe. Have you had any success in resolving it? I attempted to address it by installing various versions of openoсd that align with the picoprobe versions (mostly around the same date), but unfortunately, the error persisted. The error message consistently appeared as 'DAP init failed' or 'Failed to connect multidrop rp2040.dap0,' along with the debugging information 'SWD ack not OK @ 0 JUNK' that you previously mentioned. I also made an effort to launch an older version of Ubuntu 18.04, installing both the old versions as well as new versions of openoсd and picoprobe in separate attempts, but I encountered the same error each time.

What's more, there were no such errors two months ago, and the debugger was launching successfully. It's puzzling how everything has changed now. I would be very grateful for any help

Originally posted by @HyperNiki in https://github.com/raspberrypi/debugprobe/issues/41#issuecomment-1994603827

NikitaiDev commented 8 months ago

Hello, I'm encountering the same issue with the Pico Probe (posted by @HyperNiki in https://github.com/raspberrypi/debugprobe/issues/41#issuecomment-1994603827). Have you had any success in resolving it? I attempted to address it by installing various versions of openoсd that align with the picoprobe versions (mostly around the same date), but unfortunately, the error persisted. The error message consistently appeared as 'DAP init failed' or 'Failed to connect multidrop rp2040.dap0,' along with the debugging information 'SWD ack not OK @ 0 JUNK' that you previously mentioned. I also made an effort to launch an older version of Ubuntu 18.04, installing both the old versions as well as new versions of openoсd and picoprobe in separate attempts, but I encountered the same error each time. openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" Output: Info : auto-selecting first available session transport "swd". To override use 'transport select '. Info : Hardware thread awareness created Info : Hardware thread awareness created adapter speed: 5000 kHz

Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E66058388342A130 Info : CMSIS-DAP: SWD 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 Info : DAP init failed

Output -d: Debug: 202 34 adi_v5_swd.c:698 swd_multidrop_select_target(): Failed to select core 0, retrying... Debug: 203 35 cmsis_dap.c:873 cmsis_dap_swd_read_process(): SWD ack not OK @ 0 JUNK Debug: 204 35 adi_v5_swd.c:698 swd_multidrop_select_target(): Failed to select core 0 Info : 205 35 arm_dap.c:333 handle_dap_init(): DAP init failed Debug: 206 35 command.c:590 run_command(): Command 'dap init' failed with error code -4 User : 207 35 command.c:654 command_run_line(): Debug: 208 35 command.c:590 run_command(): Command 'init' failed with error code -4 User : 209 35 command.c:654 command_run_line():

The error is repeated with different versions of openocd and picoprobe. I checked:

zouming74 commented 7 months ago

I encountered the same problem.After searching some materials to solve this ,I find out that maybe the jump wire is the main reason. You can read this blog DAP init failed.

Sadly,I still can't fix this problem.

peardox commented 1 month ago

I found that on some devices the swd header is the wrong way up - try switching them over at the dupont end (the pins that go to the outer edges of the JST, leave the ground alone)

Also connecting without the UART connection is worth a go - will until you want the UART of course

Possibly we need a switch pins symbol (going to experiment first)

LunaTMT commented 1 month ago

I've got the same problem

Error: 859 622 adi_v5_swd.c:323 swd_connect_multidrop(): Failed to connect multidrop rp2040.dap0 Debug: 860 622 command.c:528 exec_command(): Command 'dap init' failed with error code -400 User : 861 622 command.c:601 command_run_line(): Debug: 862 622 command.c:528 exec_command(): Command 'init' failed with error code -4 User : 863 622 command.c:601 command_run_line(): Debug: 864 622 breakpoints.c:328 breakpoint_remove_all_internal(): [rp2040.core0] Delete all breakpoints Debug: 865 622 breakpoints.c:328 breakpoint_remove_all_internal(): [rp2040.core1] Delete all breakpoints Debug: 866 622 target.c:2130 target_free_all_working_areas_restore(): freeing all working areas Debug: 867 622 breakpoints.c:328 breakpoint_remove_all_internal(): [rp2040.core1] Delete all breakpoints Debug: 868 622 target.c:2130 target_free_all_working_areas_restore(): freeing all working areas Debug: 869 623 cmsis_dap.c:1267 cmsis_dap_swd_switch_seq(): SWD-to-DORMANT

P33M commented 6 days ago

This is user error and not a bug. If you still have issues, please post on the Pico section of our forums.