-
Notifications
You must be signed in to change notification settings - Fork 93
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
Not able to run Openocd for rp2040 on rpi5 #93
Comments
I've not tried it myself yet, but does raspberrypi/pico-setup#28 help? |
I will have to try and get back to you |
Now I have got this issue: sudo openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.12.0-g4d87f6d (2023-12-23-23:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
WARNING: Unknown type of the host SoC. Expect JTAG/SWD clock slower than requested.
Warn : TMS/SWDIO moved to GPIO 8 (pin 24). Check the wiring please!
adapter speed: 5000 kHz
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 5000 kHz
Error: Failed to connect multidrop rp2040.dap0
Keeping the following warning in mind: Warn : TMS/SWDIO moved to GPIO 8 (pin 24). Check the wiring please! SWCLK -> GPIO25 |
@lurch any updates on this. As I need this info to create some CI/CD Setups |
I'm afraid you'll have to wait until all the RPi engineers are back from holiday in the New Year. |
Oh yeah Happy new year! |
i got it working fairly easily on my pi5:
all it needs now, is to drop that into the interface folder and name it well, and maybe change the pins to match the other examples |
Ok I get now. My config was using the old rpi interface. Need to switch to Linuxgpiod adapter |
I think this info needs a released documentation somewhere from rpi team. |
Few questions:
|
the pi5 has 5 gpio controllers the debug port on the pi5 is on another, and a simple 3 pin JST-SH cable could link a pi5 directly to the pico with no fuss
i'm not sure where the speed would be set |
FYI this works on older Pis:
|
ah good catch, so we could just use gpiod on every model |
I guess "adapter_speed xxxx" sets of the adapter speed in xxxx KHz. Currently as nothing is given it is setting to 100KHz by default. |
at the end, its just calling a speed function within a function pointer table
and the linuxgpiod driver lacks a speed function
while the bcm2835 one does have one edit: while linuxgpiod doesnt delay, so its actually ignoring the speed and going full tilt? |
Took a while to figure it out... Had to read the configure script to realize that there is no enable switch for linuxgpiod but it's looking for an environment variable. So here's what I did to run it on a pi5 with bookworm. Hope it helps someone:
Note: when you tried the existing raspberrypi-swd.cfg before, you may have noticed a message regarding a pinout change from GPIO24 to GPIO8. However, my attempt to use this pin in the above file failed with "error requesting gpio line swdio"
|
Hi @g3grau, Thanks for the detailed explanation! I have documented the above below as well: |
This works perfectly for me |
CMIIW, newer kernel |
Upstream have added support for Pi 5 (raspberrypi5-gpiod.cfg) but picked up the legacy gpiochip 4. Downstream has diverged with the release of RP2350, but the gpiod changes should be orthogonal. |
Once https://review.openocd.org/c/openocd/+/8363 goes in, then I can look at rebasing downstream. |
I am stuck with the following screen state on rpi5:
The text was updated successfully, but these errors were encountered: