A Picoprobe is a Raspberry Pi RP2040-based Serial Wire Debug (SWD) adaptor. You can make one from a Raspberry Pi Pico — hence the name — or almost any third-party RP2040-based board. Use it to connect your RP2040-based application board to your personal computer for debugging through gdb
, directly or via an IDE such as Microsoft Visual Studio Code.
This code originally supported only the Pico. It now supports three more boards, each of which provides a STEMMA QT connector/Qwiic for easy cabling to the application board under test. These connectors are intended for use with I²C devices, but here we’re using their pins for GPIO and power.
The code also uses the WS2812 RGB LED on those boards that have one as an SWD activity indicator.
If your chosen board is not one of those so far supported by the Picoprobe code, you should be able to use it with just a few small code changes.
To build the code for your own Picoprobe with VSCode:
- Open the
<YOUR_GIT_DIRECTORY>/picoprobe
in VSCode. - Select the
CmakeLists.txt
file. - Look for the line
set(PICO_BOARD "pico")
. - Replace
"pico"
with the name of your board, eg.set(PICO_BOARD "adafruit_feather_rp2040")
- You must use the board’s name as defined by the Pico SDK.
To build the code for your own Picoprobe at the command line:
- Run
cd <YOUR_GIT_DIRECTORY>/picoprobe
. - Run
export PICO_BOARD=<YOUR_BOARD_NAME>
.- You must use the board’s name as defined by the Pico SDK.
- Run
cmake -S . -B build/
. - Run
cmake --build build
.
To install the application:
- Once built, your
.uf2
file will be located atbuild/picoprobe_<YOUR_BOARD_NAME>.uf2
. - Hold down the BOOTSEL or equivalent button on your Picoprobe board and connect it to your your computer.
- Release the button.
- Copy your
.uf2
file over to theRPI-RP2
drive that will appear on your computer’s desktop or via its file system.
For more information on connecting your Picoprobe to your application board and running debug sessions, please see Getting started with Raspberry Pi Pico, Appendix A.