---
agent:
  instructions: "Use this search API to find relevant content across this site (products with prices and stock, collections, guides, articles, courses, help and pages) with keywords or natural-language queries, instead of crawling individual pages. Replace {query} with your URL-encoded query. Results are returned in Markdown."
  endpoint: "https://piaustralia.com.au/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Using the Raspberry Pi Debug Probe

What the Debug Probe does, how to wire it to a Pico for debugging and a serial console, how to use it from VS Code or OpenOCD and GDB, and how to update its firmware.

## What it does

The Debug Probe is a small USB gadget that does two separate jobs at once:

- **SWD debugging.** It talks to a microcontroller's Serial Wire Debug port, so you can load programs, pause them, step through code and read variables. It follows the CMSIS-DAP standard, so OpenOCD and other CMSIS-DAP tools recognise it.
- **USB to serial (UART) bridge.** It gives your computer a serial port wired to the target's TX and RX pins, handy for reading `printf` output or a boot console.

Your computer sees a standard USB serial port (no driver needed, even on Windows) plus the debug interface. It works with Windows, macOS and Linux, its signals run at **3.3 V**, and its firmware is open source.

It does **not** power the board you're debugging. Give the target its own power, usually a second USB cable.

## The ports and cables

The probe has two 3-pin JST-SH sockets:

| Port | Job | Pins |
|---|---|---|
| **D** | SWD debug | SC (clock), GND, SD (data) |
| **U** | UART serial | TX, GND, RX |

In the box are a USB cable and three debug leads: JST-SH to JST-SH, JST-SH to 0.1-inch female header, and JST-SH to 0.1-inch male header. On the header leads the colours are:

| Colour | Signal |
|---|---|
| Orange | TX or SC (out of the probe) |
| Black | GND |
| Yellow | RX or SD (into the probe, or both ways for SD) |

If the target has its own power supply, connect **GND first** (or switch the target off) before the signal wires, so a difference in voltage between the two can't do damage.

## Wiring to a Pico

**SWD.** The Pico H, Pico WH and Pico 2 with headers have a small 3-pin JST socket labelled DEBUG on the bottom edge. Plug the JST-to-JST lead between that and the probe's **D** port.

The plain Pico, Pico W and Pico 2 have three solder pads there instead (SWCLK, GND, SWDIO). Solder a 3-pin header on, then use the female-header lead on the **D** port:

| Pico pad | Probe wire |
|---|---|
| SWCLK | SC (orange) |
| GND | GND (black) |
| SWDIO | SD (yellow) |

**UART.** Use the male-header lead on the **U** port and cross the data lines over, so each side's transmit goes to the other's receive:

| Probe | Pico |
|---|---|
| RX (yellow) | GP0 / UART0 TX, pin 1 |
| TX (orange) | GP1 / UART0 RX, pin 2 |
| GND (black) | GND, pin 3 |

GP0 and GP1 are the pins the Pico C/C++ SDK sends its serial output to by default.

## Debugging from VS Code

The easiest route is Raspberry Pi's Pico extension for VS Code. It installs and configures the SDK, compilers, OpenOCD and GDB itself, so there's nothing to set up by hand.

1. Wire the probe, power the Pico and plug the probe into your computer.
2. Open your project and click the Pico icon in the sidebar.
3. Choose **Debug Project**, or press **F5**. If asked for a debugger, pick **Pico Debug (Cortex-Debug)**.

The extension loads your program over SWD, stops at the start of `main()`, and waits. From there you have the usual Continue (F5), Step Over (F10), breakpoints and variable views.

## Debugging with OpenOCD and GDB

If you'd rather use the command line, you need Raspberry Pi's build of OpenOCD (binaries are in the Pico SDK tools repository on GitHub, or build it from `github.com/raspberrypi/openocd`). Build your program as a **Debug** build so GDB has symbols, and use the `.elf` file, not the `.uf2`.

To flash a program and run it:

```
sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program blink.elf verify reset exit"
```

For a Pico 2 or anything else built on the RP2350, swap in `target/rp2350.cfg`.

To debug, start OpenOCD as a server (the same command without the `program` part), then in a second terminal:

```
gdb blink.elf
(gdb) target remote localhost:3333
(gdb) monitor reset init
(gdb) load
(gdb) continue
```

On a Linux machine that isn't a Raspberry Pi, use `gdb-multiarch`; on macOS or Windows, use `arm-none-eabi-gdb` from Arm's toolchain.

## Using it as a serial console

Open the probe's serial port at **115200** baud.

- **Linux and Raspberry Pi OS:** `sudo apt install minicom`, then `minicom -b 115200 -o -D /dev/ttyACM0`. Leave with Ctrl-A, then X.
- **macOS:** `brew install minicom`, then point it at the probe's `/dev/cu.usbmodem…` or `/dev/tty.usbmodem…` device.
- **Windows:** find the probe's COM port in Device Manager, then open it in PuTTY with connection type Serial and speed 115200.

The UART lead isn't limited to a Pico: it'll talk to any 3.3 V serial device, such as a Raspberry Pi's boot console.

## Updating its firmware

Check which version you have (on Linux):

```
lsusb -v -d 2e8a:000c | grep bcdDevice
```

Version 2.3.1, for example, reports `bcdDevice 2.31`. Ignore the "FW Version" line OpenOCD prints: that's the CMSIS-DAP protocol version, not the probe's firmware.

To update:

1. Download `debugprobe.uf2` from the latest release at `github.com/raspberrypi/debugprobe/releases`.
2. Pinch the case to unclip its top.
3. Hold the **BOOTSEL** button inside and plug the probe into USB. A drive called **RPI-RP2** appears.
4. Copy `debugprobe.uf2` onto it. The drive disappears and the probe restarts on the new firmware.

## No Debug Probe? Use a second Pico

The same firmware runs on an ordinary Pico (`debugprobe_on_pico.uf2`) or Pico 2 (`debugprobe_on_pico2.uf2`), from the same releases page. Wire the probe Pico's GND to the target's GND, GP2 to SWCLK and GP3 to SWDIO; for serial, GP4 goes to the target's GP1 and GP5 to its GP0.

## Parts in this guide

- [Raspberry Pi Debug Probe](https://piaustralia.com.au/products/raspberry-pi-debug-probe.md)
- [Raspberry Pi Pico WH](https://piaustralia.com.au/products/raspberry-pi-pico-wh.md)
- [Pico Break Away Headers Kit](https://piaustralia.com.au/products/pico-break-away-headers-kit.md)
- [PicoProbe PCB kit](https://piaustralia.com.au/products/picoprobe-pcb-kit.md)

Written by Pi Australia from Raspberry Pi's Debug Probe documentation, Getting started with Raspberry Pi Pico-series, The debugprobe firmware on GitHub, Raspberry Pi Pico VS Code extension.
