The Pi Pico Eurocard Development Board uses a Seeed XIAO RP2040 as debugger. shabaz posted an adapted version of the PicoProbe firmware binary on his github. In this post, I take a step back and fork the source of the original project. Then I do a port to the XIAO. The same as what shabaz did, with the source code changes documented.
What changes are needed:
- because the xiao doesn't break out GP04 and GP05, the UART settings are moved to GP0 and GP1:
#define PICOPROBE_UART_TX 0
#define PICOPROBE_UART_RX 1
#define PICOPROBE_UART_INTERFACE uart0
- the board is set to XIAO
set(PICO_BOARD seeed_xiao_rp2040)
What do you get:
A debugger and a serial COM device. You can step through code, and at the same time, route UART (stdio) output to a COM port. When you use an IDE with monitor / terminal functionality (VS Code?), you can step through your firmware and watch any println() output. Exactly the same as what a PicoProbe and the Raspberry Pi Debug Probe do (they use the same firmware).
What's on the github repositiry?
Source code:
My fork has a xiao branch where these source code changes are done. It's the default branch when you clone my repo.
git clone --recursive https://github.com/jancumps/picoprobe.git
The project uses the same cmake mechanisms as the Pico examples. If you are able to build those (from command line or from an IDE), you'll be able to build this project from source. But that's not necessary:
Binary firmware:
I've pre-built the project, and used github's release functionality to host the binary. You can download it and copy it directly onto the XIAO.
Wiring
GP0 is the TX, GP1 the RX. All other pins are identical to the standard Picoprobe. This pin allocation matches the pico eurocard design.
Limitations
There's no LED activity. Shabaz uses the LED to show flash and debug activity on the XIAO's RGB LED. I have not implemented that (yet). The default PicoProbe firmware only entertains the LED when it's programmed as an OPENOCD_CUSTOM device. Im using the (default) DAB V2.
Use with the SDK 1.5 installer
The firmware works out-of-box with the Windows SDK 1.5 installer's Pico Debug (Cortex-Debug) debug profile. For more info on the installer, check scottiebabe 's post Raspberry Pi Pico Windows Installer .