At the time of writing this the openocd version I compiled was "Open On-Chip Debugger 0.11.0-g228ede4". With this version I the config files were moved into the tcl subfolder. Therefore the updated openocd command looks like this:
Great article. Everything worked for me up until the "cargo install probe-run". Seems like its trying to hit a new version, but "cargo install probe-run --version 0.3.3" worked for me.
I ran into a few errors when trying to install probe-run in Ubuntu 22.04, for anyone else seeing this from this issue https://github.com/knurling-rs/probe-run/issues/289 it looks like you need to remove the old versions of libusb. Thanks for the tutorial!
Thanks for the article Jim, one thing that is confusing is that in the text you correctly state to connect Pico B to the microUSB cable from the host, but in the photo in the article (both Fig 1 and Fig 2) you have the microUSB cable plugged into Pico A. This lead to some head scratching. Will try this out as soon as I run out to microCenter to get a second Pico. Cheers
Hey,
Great tutorial Jim. I got it working quickly. Some notes from me during going through your tutorial:
Wiring - the image is correct but description might have errors:
>2. Connect Pico B VSYS (Pin 39) to Pico A VSYS (Pin 3) // I think it's 39 not 3 (3 - is GND)
>3. Connect Pico B UART0_TX (Pin 1) to Pico A UART1_RX (Pin 6) // err 1 go to 7 (7 - is TX)
>4. Connect Pico B UART0_RX (Pin 2) to Pico A UART1_TX (Pin 7) // err 2 go to 6 (6 - is RX)
udev rules (on Ubuntu). I dont know why but:
>sudo udevadm control --reload-rules
didn't work
However i did
sudo udevadm trigger
and it worked after that
Thanks for the guide,
Cheers
Great article! Had an issue on M1 Mac with Mac OS 13.3.1 where openocd couldn't find the pico running the picoprobe firmware.
I was able to fix this by applying the simple config changes mentioned here: https://github.com/raspberrypi/openocd/issues/80
Great stuff, but how about an example that works with the pico-W, too?
The onboard LED control is no longer on GPIO 25, but is controlled by the pico-W wifi chip.
thx for the great blog.
I followed the steps on my fedora 36. I would like to share which things I had to do differently in order to get it running:
Toolchain
============
Fedora has no gdb-multiarch package. But according to following resource https://copr.fedorainfracloud.org/coprs/perex/raspberry-pi-pico/ gdb-multiarch is no longer necessary.
>> sudo dnf install git arm-none-eabi-gcc-cs
Not sure whether arm-none-eabi-gcc-cs is really necessary. But I installed it anyway.
To build openocd I installed the following packages:
>> sudo dnf install gcc gcc-c++ automake autoconf texinfo libtool libftdi-devel libusb-devel
The configure step was less verbose in my case:
>> ./configure --enable-picoprobe
Loading the App onto the Target with gdb
=====================================
At the time of writing this the openocd version I compiled was "Open On-Chip Debugger 0.11.0-g228ede4". With this version I the config files were moved into the tcl subfolder. Therefore the updated openocd command looks like this:
>> src/openocd -f tcl/interface/picoprobe.cfg -f tcl/target/rp2040.cfg -s tcl
As already explained above I did not need the multiarch gdb therefore the command I used was the following:
>> gdb -q -ex "target extended-remote :3333" target/thumbv6m-none-eabi/debug/rp2040-project-template
All other instructions worked for me as described.
Great article. Everything worked for me up until the "cargo install probe-run". Seems like its trying to hit a new version, but "cargo install probe-run --version 0.3.3" worked for me.
using red wire for both ground and 5V is a very dangerous game haha
I ran into a few errors when trying to install probe-run in Ubuntu 22.04, for anyone else seeing this from this issue https://github.com/knurling-rs/probe-run/issues/289 it looks like you need to remove the old versions of libusb. Thanks for the tutorial!
Thanks for the article Jim, one thing that is confusing is that in the text you correctly state to connect Pico B to the microUSB cable from the host, but in the photo in the article (both Fig 1 and Fig 2) you have the microUSB cable plugged into Pico A. This lead to some head scratching. Will try this out as soon as I run out to microCenter to get a second Pico. Cheers
I'm getting the following error when running the command: cargo install --git https://github.com/rp-rs/probe-run --branch main
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> src\cli.rs:83:5
|
83 | defmt_decoder::log::init_logger(verbose >= 1, move |metadata| {
| _____^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^_------------__-
| | |
| | expected 3 arguments
84 | | if defmt_decoder::log::is_defmt_frame(metadata) {
85 | | true // We want to display *all* defmt frames.
86 | | } else {
... |
98 | | }
99 | | });
| |_____- supplied 2 arguments
|
note: function defined here
--> C:\Users\mdannenb\.cargo\git\checkouts\defmt-7f5b74b4e6ff55d4\e64138f\decoder\src\log\mod.rs:125:8
|
125 | pub fn init_logger(
| ^^^^^^^^^^^
For more information about this error, try `rustc --explain E0061`.
error: failed to compile `probe-run v0.2.5 (https://github.com/rp-rs/probe-run?branch=main#4bb1991f)`, intermediate artifacts can be found at `C:\Users\x\AppData\Local\Temp\cargo-install2hHMt8`
Caused by:
could not compile `probe-run` due to previous error