Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenOCD Unable to Connect to debugprobe #126

Closed
NikitaiDev opened this issue Mar 13, 2024 · 5 comments
Closed

OpenOCD Unable to Connect to debugprobe #126

NikitaiDev opened this issue Mar 13, 2024 · 5 comments

Comments

@NikitaiDev
Copy link

          @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 #41 (comment)

@NikitaiDev
Copy link
Author

Hello, I'm encountering the same issue with the Pico Probe (posted by @HyperNiki in #41 (comment)). 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:

  • cmake -DDEBUG_ON_PICO=ON ..
  • Connection cables
  • Power
  • Different power supply
  • Power pico over vbus and vsys
  • Different versions of Ubuntu
  • Build branch picoprobe
    I would be very grateful for any help

@zouming74
Copy link

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
Copy link

peardox commented Oct 4, 2024

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
Copy link

LunaTMT commented Oct 4, 2024

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
Copy link
Contributor

P33M commented Nov 7, 2024

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

@P33M P33M closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants