16 Comments
Dec 10, 2021Liked by Jim Hodapp

Hi Jim, rp-rs developer + maintainer here.

Thanks for the write-up, both for where things worked and where they didn't. We haven't had too much feedback on that, so it is most welcome!

Great to see a good step-by-step configuration options for OpenOCD - I haven't used it for debugging rp2040 but I know that a few have and had issues getting it set up correctly; we should really have some of this documentation as part of the project.

It's a bit late to help now (since you look to be done with this series) but I'd be interested in trying to work out why the probe / debug configuration from rp2040-app-template didn't work for you so that others don't have the same problems.

We spend most of our time in https://app.element.io/#/room/#rp-rs:matrix.org if you'd prefer a real-time group chat style conversation, or you could raise an issue on github on either rp2040-app-template or rp-hal - whichever works best for you.

This is an open invitation by the way - everyone is welcome in the matrix room, and issues / PRs for the repos most welcome.

Expand full comment

Hey! Thank you for this series of post.

I was just playing around with some RP2040 controllers, and ended up with a slightly simpler setup (IMO). Instead of using a separate controller for handling the debug, I've just set up debug logging via USB serial port. This requires a bit more boilerplate (handling the USB interrupt and such), but is much simpler from the hardware perspective: you need to just plug in a single Pico board in your USB, flash it and you can immediately see the debug output.

Here's my repo: https://github.com/eterevsky/rp2040-blink

Expand full comment
May 19, 2023Liked by Jim Hodapp

a quick heads up: "ext install rust-lang.rust" seems to be deprecated in favor of "rust-analyzer"?

Expand full comment
Jun 29, 2022Liked by Jim Hodapp

Thanks for the steps! I'm building my first project but finding that the target listed above does not generate Thumb2 assembly. I'm trying to implement a coroutine project that uses Thumb2. How can I get the compiler to generate Thumb2 on an armv6m target?

Expand full comment

I'm on Mac and I've got a small test project which compiles and runs, and can use breakpoints from VS and step through, but I can't seem to get any debug print output anywhere. I've checked my wiring and used test programs from the pico C++ SDK. They write just fine to the serial output. But using the rust project, I see no debug output whatsoever, anywhere. DEFMT_LOG is set to "debug". It doesn't matter if I use defmt::info! or debug! or println. The "output" section of VSCode stays empty as well as the debug console. VS "Terminal" only shows build tool output. I've got a "screen" session attached to the /dev/tty.usbXXX device, which shoud be the debug probe pico that is connected to my computer. Using the C++ examples, it shows the serial output. Running the rust examples shows nothing here. There is also no debug logging in gdb or openocd. What am I missing? Thanks!

Expand full comment