News: 1677061925

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Raspberry Pi Foundation launches $12 USB Debug Probe

(2023/02/22)


The Raspberry Pi Foundation has a new gadget: a cheap, easy USB probe for debugging bare-metal code on a Pi Pico… but it should work with several other devices too.

The [1]Debug Probe is a device to help debug bare-metal software on the Raspberry Pi Pico. The Pico is the Foundation's [2]$4 single-board computer for microcontroller type roles . In embedded computers like this, there's often no display output, and in typical use, no operating system – both of which make it tricky to monitor what it's doing, or more to the point, work out why it's not doing it.

A common way to peer into the memory of an embedded Arm device and work out what it's doing is Arm's [3]SWD interface, or Single Wire Debug – [4]broadly , Arm's three-wire version of the traditional four- or five-wire [5]JTAG interface.

[6]

However, to use those SWD signals, you need a device to read and translate them into something another computer can read and interpret, using software such as the FOSS [7]OpenOCD or [8]pyOCD . (In this context, OCD stands for On-Chip Debugger.) This device is called a [9]debug probe .

[10]

Conveniently, a Raspberry Pi's GPIO interface can talk SWD over a few of its [11]pins [PDF]. This means you can use one Pi to debug another Pi. That even includes the Pi Pico using some special firmware called [12]Picoprobe . This is rather cheaper than a dedicated hardware debug probe. The snag is that you'll still need to wire up some circuits, as this [13]blogpost describes.

Even if it's versatile – for instance, you can also use SWD to [14]upload software into a [15]Pi Pico from another Pi – it's not that easy, and if you want to use a bigger, faster computer, such as a PC or Mac, you then need to interface your Pi-based probe to that.

[16]The Balthazar laptop: An all-European RISC-V Free Hardware computer

[17]Don't expect a Raspberry Pi 5 in 2023, says Raspboss Eben Upton

[18]Raspberry Pi hires former spy gadget-maker who baked devices into surveillance ops

[19]This tiny Intel Xeon-toting PC board can take your Raspberry Pi any day

Which is the selling point of the new [20]Pi Debug Probe . You plug one end into your Pi Pico, and the other end into a free USB port, and you're ready to go. It's a very low-end offering, but it should do the job – and it's $12. For comparison, a professional tool such as a Segger [21]J-Link comes in at between $500 to $1000, and even an open-source hardware device such as an [22]ORBtrace Mini – for instance from this [23]store – is around ten times the price.

Better still, the Pi Debug Probe should be able to talk to any embedded device with an Arm Cortex M series and an SWD interface, such as [24]the Arm-powered Arduino Due , or the 32-bit variants of the [25]Teensy development boards. These are popular for tasks like equipping vintage keyboards with a USB interface. ®

Get our [26]Tech Resources



[1] https://www.raspberrypi.com/news/raspberry-pi-debug-probe-a-plug-and-play-debug-kit-for-12/

[2] https://www.theregister.com/2021/01/21/pi_pico/

[3] https://community.silabs.com/s/article/serial-wire-debug-swd-x?language=en_US

[4] https://learn.sparkfun.com/tutorials/arm-programming/jtag-and-swd

[5] https://www.xjtag.com/about-jtag/what-is-jtag/

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Y-X11fuv@p7weRs4ppjcnQAAAQI&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[7] https://openocd.org/pages/about.html

[8] https://pyocd.io/

[9] https://pyocd.io/docs/debug_probes.html

[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Y-X11fuv@p7weRs4ppjcnQAAAQI&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[11] https://datasheets.raspberrypi.com/debug/debug-connector-specification.pdf

[12] https://github.com/raspberrypi/picoprobe

[13] https://mcuoneclipse.com/2022/09/17/picoprobe-using-the-raspberry-pi-pico-as-debug-probe/

[14] https://www.electronicshub.org/programming-raspberry-pi-pico-with-swd/

[15] https://www.theregister.com/2023/01/10/raspberry_pi_camera_module_3/

[16] https://www.theregister.com/2023/02/09/balthazar_free_hardware_laptop/

[17] https://www.theregister.com/2022/12/21/no_rpi_5_2023/

[18] https://www.theregister.com/2022/12/09/rpi_maker_in_residence_police/

[19] https://www.theregister.com/2022/08/16/intel_asus_singleboard/

[20] https://www.raspberrypi.com/products/debug-probe/

[21] https://www.segger.com/products/debug-probes/j-link/

[22] https://orbcode.org/orbtrace-mini/

[23] https://store.zyp.no/category/development-tools

[24] https://www.theregister.com/2012/10/23/arduino_board_upgraded_with_arm_chip/

[25] https://www.pjrc.com/teensy/

[26] https://whitepapers.theregister.com/



I'm into SOFTWARE!