Live Debugging with Raspberry Pi Pico

Following the instructions in "Getting started with Raspberry Pi Pico" [1] I was able to set up a "picoprobe", which is a Pico running picoprobe firmware, and connect it to the debug ports on a Pico running Mecrisp Stellaris Forth. The set up looks a little funny because my second breakout board hadn't arrived yet, so I just attached some terminal blocks directly onto the picoprobe, but it works.

picoprobe connected to Pico running Mecrisp

Then, continuing to follow the instructions, I was able to build the rp2040 branch of openocd, connect openocd to the picoprobe, and attach a gdb-arm session to it.

When GDB connects to openocd, then automatically the system is halted at its current point of execution. I am able to continue execution of Mecrisp using the "continue" command, and halt it again with "Ctrl-C". When halted, the "i r" command allows me to view the registers, and "disas $pc,+40" allows me to view the instructions at the current location specified by the Program Counter.

Because I tied together the UART lines, I can still interact with the Forth system in the normal way over sterm.

Now that I can debug a live system, I was planning to study my ARM manual [2] again and learn more about the different registers and such like.

[1]

Getting started with Raspberry Pi Pico

[2]

ARMv6-M Architecture Reference Manual

Proxied content from gemini://gem.librehacker.com/gemlog/tech/20220331-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/tech/20220331-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.