Pioreactor / pioreactor

Hardware and software for accessible, extensible, and scalable bioreactors. Built on Raspberry Pi.
https://pioreactor.com
MIT License
101 stars 9 forks source link

Not able to load firmware over SWD on RPi 5 #448

Closed CamDavidsonPilon closed 10 months ago

CamDavidsonPilon commented 1 year ago

This just hangs:

$ sudo /bin/bash /usr/local/bin/load_rp2040.sh

+ openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg -c init -c 'reset halt' -c 'load_image /usr/local/bin/main.elf' -c 'resume 0x20000000' -c exit
Open On-Chip Debugger 0.11.0-g228ede4-dirty (2022-10-14-12:25)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 1001 kHz
CamDavidsonPilon commented 10 months ago

A solution: use the linuxgpiod interface, ex:

adapter driver linuxgpiod
adapter gpio swclk 25 -chip 4
adapter gpio swdio 24 -chip 4

with openocd 0.12.0 #464