Raspberry Pi Debug Probe: a plug-and-play debug kit for $12

Ever since we launched Raspberry Pi Pico, and our RP2040 microcontroller, in January 2021, people have been using one Pico to debug programs running on another. Inspired by this trend, today we’re launching the Raspberry Pi Debug Probe, a complete debug hardware solution for Arm-based microcontrollers, powered by RP2040, and priced at just $12.

The Raspberry Pi Debug Probe provides:

  • A USB to Serial Wire Debug (SWD) bridge
  • A generic USB serial adapter
  • Cables to connect to a host computer, and to the debug target

While it has been designed with Raspberry Pi Pico, and other RP2040-based targets, in mind, the Raspberry Pi Debug Probe can be used to debug any Arm-based microcontroller that provides an SWD port with 3V3 I/O.

Bug hunting

If you’re anything like me, you enjoy writing computer programs, but hate tracking down the resulting bugs. But bug hunting is a necessary evil, and if you want to hunt bugs, sooner or later you’re going to need a debugger. While most debuggers offer a common set of basic capabilities (single stepping, breakpoints, inspection of variables and memory), these capabilities are provided in different ways depending on your choice of language and operating environment.

Perhaps you’re using a high-level interpreted programming language, like Python, where debug capabilities are built directly into the runtime environment. Or perhaps you’re using a low-level compiled programming language, like C, but your program is running under an operating system, like Linux; here, a debugger like gdb, often running on the same machine, can interact with your program as it runs, to provide these same capabilities.

But what if your C program is running directly on the processor, without an operating system (this is often referred to as bare metal operation)? What if you’re writing an operating system? In this case, you’ll need a way to access the debug capabilities built into the processor itself. And that’s where a debug probe comes in.

What is a debug probe?

All modern Arm-based microcontrollers, including RP2040, implement Arm’s CoreSight debug architecture. Each processor core, like the Cortex-M0+ used in RP2040, provides an Access Port (AP) which can be used to single step, set breakpoints, observe the values of processor registers, and access memory and peripherals via the processor’s bus interface.

The microcontroller itself provides a Debug Port (DP), which is connected externally to pins on the package, and internally to each AP in the system. RP2040 exposes its DP via a low-pin-count Serial Wire Debug (SWD) port: by talking the SWD protocol over this port, a host computer can control each core’s AP, in order to debug a program running on the core.

A debug probe provides a bridge between USB and the SWD protocol. While not strictly required if the host computer is a Raspberry Pi (you can wire up the target’s SWD port directly to the GPIO header on a Raspberry Pi), it’s much more convenient to connect via USB. And if you’re using a PC or Mac, USB is your only option.

Schematic diagram showing  Raspberry Pi Debug Probe acting as a bridge between host USB protocol and target SWD protocol
A debug probe provides a bridge between USB and the SWD protocol, allowing a host to access the target’s debug port

The Raspberry Pi Debug Probe exposes the SWD signals on a three-pin JST connector, conforming to the Raspberry Pi Debug Connector Specification. We provide adapter cables to connect without soldering to breadboard, and to the debug connector on Raspberry Pi Pico H and WH.

Arm has helpfully standardised the protocol used to communicate over USB between a host computer and a debug probe. The Raspberry Pi Debug Probe conforms to this CMSIS-DAP standard, and so will work out of the box with many existing debug software platforms, including our favourite, OpenOCD.

Serial communication

We often want to establish a serial console connection between a microcontroller target and a host computer. This provides a simple way to interact with software running on the target, and to retrieve logging and other diagnostic data. If the host computer is a Raspberry Pi, then you can use one of the UART peripherals exposed via the GPIO header. But if you’re using a PC or Mac, it’s very unlikely that you have access to a built-in serial port.

The Raspberry Pi Debug Probe functions as a USB serial adapter, over the same USB connection as the SWD bridge. It exposes the UART signals on a second three-pin JST connector, again conforming to the Raspberry Pi Debug Connector Specification.

For users who do not require debug functionality, the Raspberry Pi Debug Probe’s low price makes it a cost-effective alternative to other USB serial adapters. It has largely replaced the once-ubiquitous FTDI cable as our adapter of choice here at Pi Towers.

Credits

The Raspberry Pi Debug Probe project was driven by James Adams, who originated the concept and designed the hardware. Jonathan Bell wrote the software, taking inspiration from the DapperMime project. John Cowan-Hughes designed the plastics, and the rather neat packaging mechanics. Jack Willis did the packaging artwork. Rose Nott led on supply chain. Alasdair Allan and Andrew Scheller worked on the documentation.

47 comments

aBUGSworstnightmare avatar

Quite a nice addition to the RP2040 product series.

Ashley Whittaker avatar

♥️

Ricardo Bánffy avatar

Would love to see a tutorial on how to use it to reverse engineer the bootloader of, say, a popular set-top-box in order to turn it into a small computer.

At least while bigger RPis are still made of unobtanium. ;-)

David avatar

I’m a little confused – what does this offer over using a Pi Pico as a debugger?

Alasdair Allan avatar

Using another Pico along with Picoprobe is a great solution, but it takes a lot of wiring and fiddling around. This is plug-and-play for folks that like their debugging wrapped in a neat package.

Cipulot avatar

Nice addition, tho myself and others are a bit disappointed in seeing this still uses micro usb instead of USB-C.

Alasdair Allan avatar

USB C is more expensive to put on the board, it’s a small increase, but we prefer to keep the BoM cost down and sell the product at a more accessible price.

Edward Crutchley avatar

You can’t be serious? That’s more of a reason NOT to buy! I have to keep buying decent micro USB cables? It’s already near impossible to find the generation before. Try finding a good mini USB in a store, it’s IMPOSSIBLE! People want current generation connectors, or at least the one shipping on most nonproprietary phones.

AndrewS avatar

Look at the photo towards the bottom of the article… it comes with a USB cable, you don’t have to go out and buy a new one :)

Matthew avatar

I don’t understand… they include micro USB cable but want to keep BOM cost down so they use micro USB, Why not use a USB-C and omit the cable? Every phone has it, every home has few of them now too… Otherwise, neat product!

JBeale avatar

I guess it varies by location; for me there’s certainly no shortage of micro-USB cables available on Amazon, and I don’t see them as more expensive than USB-C. I also already have far more of them than I do USB-C cables. Maybe I’m more a trailing-edge-of-tech guy; I do not replace my phone every year.

wiebel avatar

I have to agree with everyone saying microUSB is not the way to go. Seriously microUSB is the worst connector out there, period. Even miniUSB would be preferable. I would definitely grab one as soon as it has USB-C.

AndrewS avatar

Just be thankful the world has moved on from these https://www.cablestogo.com/learning/connector-guides/centronics#centronics36
;-)

Wayland avatar

I agree, I paid more for the USB cable than I did for the Pico.

KC avatar

How much more expensive are we talking? From a cursory glance it looks like we’re talking pennies. It’s a shame, even if you had to bump it up to $13 it would’ve been better than using a legacy port that is all but extinct at this point.

Anders avatar

I’m only guessing but there might be an prior deal to supply the obsolete connectors done a long time ago for a certain quantity and that quantity has got to be used up.

Alasdair Allan avatar

While USB C is now becoming more common, you shouldn’t really take your personal experience as the baseline. The majority of people are still living in a mostly pre-USB C world. This will start to change in the next year or two, but for now micro USB is a lot more common than you seem to be assuming.

Zhahai avatar

I have accumulated literally scores of small devices (speakers, lights, toys, fans, tiny quadcopters) which use micro-USB, and I have LOTS of cables. I have only about 4 devices which use USB-C (smartphone, headphones, etc). I think that micro-USB is not going away soon, for cheaper devices. If I were ever to need more, cables are very available. And it’s supposed to support about twice as many insertions as mini-USB (in theory).

42Bastian avatar

I wonder, what is more expensive? The connector or the electronics?

Glaskows avatar

Won’t you require another usb cable just to power the other Pico? it would have been pretty easy to expose some 5/3.3V/GND rail(s) to avoid the second USB cable altogether.

James Adams avatar

Yes. It’s a deliberate design choice to reduce complexity / potential for problems. USB can only source so much current and downstream widgets may need more than can be provided.

USBGuy avatar

USB has been able to safely deliver over 100W-240W of power for a couple of years for a few nickels. 18W has been common with only two restored since USB3 (not C) came around.

Your designers really need. To update their turn-of-the-century ideas of USB. It’s hard to find USB devices that ARENT C in many homes and certainly I’m hobbyist homes.

Yeah,. There’s lightning. Good luck with that certification and royalty.

aBUGSworstnightmare avatar

Connectors used are 1.0mm pitch 3-pin JST ‘SH’ connector, either BM03B-SRSS-TB (top entry) or SM03B-SRSS-TB (side entry). Picoprobe comes with a set of wires but will spares be available as well?

Alasdair Allan avatar

The nice thing is that these connectors are available off the shelf from folks like DigiKey.

Leon Heller avatar

Just ordered one.

Ashley Whittaker avatar

Have fuuuuuuuun

Robert Meagher avatar

I couldn’t resist buying one myself. 😊

Juozas avatar

Please 🙏 stop using old generations of usb :(
Im always want to buy original products, but especially talking about Rpi pico products I need to buy alternatives who has usb-c port

James Hughes avatar

Hmm, I have a box load of microUSB, and hardly any USB C. My laptop is USB C and is a PITA when I need to connect anything. Methinks that the older generation is not quite dead yet. And don’t forget, the DebugProbe comes with a USB cable…

Per Westermark avatar

Are you sure the word “need” means what you think it does?
That word tends to be used when the word “like” should have been used. Your life will not end for having to use a micro-USB connector.

Alasdair Allan avatar

You can pick up a USB C to micro USB cable on Amazon and elsewhere fairly easily?

ExploWare avatar

I would think it is even conflicting with legislation.
The USB-C is there to power the device as well, right? I don’t think you will be allowed to sell this into the EU from end 2024. Why go through the hassle of requiring yourselves to have a redesign of the board with this knowledge at hand.

Liz Upton avatar

Thank you for your concern: you’ll be pleased to learn that Raspberry Pi is not a mobile device for the purposes of that legislation; and that we include cables with the Debug Probe, so even if you’re that unicorn of an engineer who doesn’t have a house festooned with the things already, you won’t have any difficulty sourcing one.

Wayland avatar

USB A and USB B are proper connectors. Everything after those before USB C are varying degrees of terrible. They nailed it with USB C. Hopefully that’s the last one. I expect it to be as popular as USB A.

Joe avatar

This may be a stupid question? For everyone that is wanting the USB C connector, what would keep them from disordering the USB connector that is on the board and replace with the USB C connector in its place.

Gavin McIntosh avatar

Was expecting this, eventually. One of these will be going in the box of debuggers.
Might even replace most of those other ones. Probably got more Mini B connectors on those than Micro B, only have one has a USB-C. Cables I have boxes of, no big deal, plus Micro B to USB-C adapters etc

Tom avatar

+1 for micro-USB hate. Not only is it obsolete, but as others have said it’s worse than mini-USB and I kind of wish they would bring back mini-USB for devices that don’t need USB3 speed or USB-PD power. I have no idea why the USB-IF ever invented micro-USB, it should never have made it into the world, offers no advantages whatsoever over mini-USB as far as I’m concerned, and is extremely flimsy. The number of pieces of kit that must have gone to landfill purely because the micro-USB fell off is an environmental crime, tbh.

Alasdair Allan avatar

I’ve heard this a lot, and yet I’ve been doing embedded things with microcontrollers for twenty years and literally never had a micro USB connector snap off in my entire career. I do wonder what other people are doing to their boards to make it happen.

Mike McGregor avatar

Curious if this debugger can be used with the embedded Arm in the Xilinx Zynq FPGAs

Jeremy Chappell avatar

I really like how you packaged this with all the cables AND a case. It is very cool.

Colin Bate avatar

While I appreciate one can buy the Pico headers from DigiKey, it would be far more coinvent to purchase everything needed in one place (with a single delivery charge).
Are there plans for the excellent PiHut to provide these, ideally in packs of 5?

Alasdair Allan avatar

Sounds like a question for Pi Hut.

Nicko avatar

Can the firmware for the Debug Probe be used unmodified on a regular Pico to do the same thing (if one is willing to do the wiring)? I’m impatient and and still waiting for my Debug Probe to be delivered but I have spare Picos lying around.

Alasdair Allan avatar

The Debug Probe firmware is a modified version of the Pico Probe firmware which can be run on a normal Raspberry Pi Pico.

Chirs avatar

I really, really love you! The whole Raspberry team! It will be a great addition to my collection.
I ditched my i7 computer. I prefer to work on a raspberry 400. It feels more eco.

Joseph Tannenbaum avatar

So far, I haven’t seen a good tutorial on how to use this on windows. Is there a good tutorial out there?

Joseph Tannenbaum avatar

Would be nice if the pictures would show connecting to one of the older pico’s with pins. Which wire goes where??

Comments are closed