Thanks for the comment Borys and for reading my newsletter! You are correct and I've updated both the wiring diagram and the udev rules command. Glad the tutorial got you up and running quickly, and thanks for your attention to detail and helping me fix any errors.
Why thank you, and thanks for reading! pico-w is a completely different beast, one that I haven’t played with yet. But let me help you by pointing you to the rp-hal project itself, there’s a GitHub issue filed about this and some experimental support in the works. I hope this is helpful to you: https://github.com/rp-rs/rp-hal/issues/376
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.
Thanks for the compliment and for reading my newsletter!
What version of probe-run was it trying to install without adding the explicit version? I just tried it here locally and cargo was installing v0.3.4, which works fine for me with no errors. If you can paste a snippet of what errors you're seeing here, that may be helpful for others reading.
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 sharing Ted, I haven't been able to try this under the latest Ubuntu yet. And you're very welcome - thanks for reading my tutorial and newsletter!
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
Hi Mark, thanks for the question. The good news is I've updated the guide because support for the Pico target (and all RP2040 micros) has now been upstreamed. So therefore, using the git main branch is no longer necessary. All you need to do instead is the following and it should work:
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
Thanks for the comment Borys and for reading my newsletter! You are correct and I've updated both the wiring diagram and the udev rules command. Glad the tutorial got you up and running quickly, and thanks for your attention to detail and helping me fix any errors.
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
Thanks for contributing to keeping this article relevant!
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.
Why thank you, and thanks for reading! pico-w is a completely different beast, one that I haven’t played with yet. But let me help you by pointing you to the rp-hal project itself, there’s a GitHub issue filed about this and some experimental support in the works. I hope this is helpful to you: https://github.com/rp-rs/rp-hal/issues/376
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.
Thanks for reading and for contributing back what you found out on Fedora.
Btw I’ve switched to using probe-rs instead of openocd and gdb for my latest community Rust project: https://github.com/Jim-Hodapp-Coaching/esp32-wroom-rp
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.
Thanks for the compliment and for reading my newsletter!
What version of probe-run was it trying to install without adding the explicit version? I just tried it here locally and cargo was installing v0.3.4, which works fine for me with no errors. If you can paste a snippet of what errors you're seeing here, that may be helpful for others reading.
using red wire for both ground and 5V is a very dangerous game haha
Indeed, but I didn’t have enough of each color wire to be consistent. So I made sure to do a power to ground short test before powering on. 😁
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 sharing Ted, I haven't been able to try this under the latest Ubuntu yet. And you're very welcome - thanks for reading my tutorial and newsletter!
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
Thanks for reading and for surfacing this bug in the article. I corrected the text with Pico A as the programmer/flasher Pico while B is the target.
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
Hi Mark, thanks for the question. The good news is I've updated the guide because support for the Pico target (and all RP2040 micros) has now been upstreamed. So therefore, using the git main branch is no longer necessary. All you need to do instead is the following and it should work:
$ cargo install probe-run
Thanks for reading!