Who needs a debug probe, if you have printf()? If doing serious development, you most likely want a hardware debug probe. We at the HSLU IET use different hardware, boards and kits, and for many of the classroom equipment it is very useful to have the debug probe embedded on the target board: less cables, easier to use. For this we have developed a new Open Source Hardware (OSHW) debug probe in KiCad which can used in different ways: as external debug probe, integrated and soldered on top of the target board, or fully integrated and embedded into a custom design.

Outline
We already use the NXP MCU-Link debug probe in our projects. Dario Scheuber in his project (PAIND) assignment used it as starting point to create a new and improved debug interface:

The goal was to make it open, smaller and versatile:
- Open Source Hardware design with KiCad
- Binary firmware compatibility with MCU-Link (NXP LinkServer, CMSIS-DAP, ARM DAPLink)
- Dual-Layer design for lower costs
- USB-C connector instead of Micro-USB
- USB-C connector usable to debug the LPC55S69
- 3D printable enclosure
- 30% smaller than the original MCU-Link
- Firmware/boot push button instead of jumper
- Micro connector for UART connection instead of pin header
- Supports only 3.3V targets (no level shifters)
- Standalone version as external debug probe
- On-Board version: Solder external debug probe on your custom board (castellated pins)
- Embedded version: copy-paste into your custom board KiCad design
- BOM with assembly costs: ~$12/piece for 100 units (e.g. PCBWay)
All the design files are available on GitHub.
USB-C with SWD Debug Signals
The USB-C connector is used as host connection for debugging the target, as well for the VCOM provided by the debug probe firmware. The probe firmware update can be triggered by pressing the bootloader button, but if you want to debug the LPC55S69, this can be done through the USB-C connector: that way, no debug header is required on the board:

Standalone or On-Board
The board can be used as standalone (external) debug probe:

Because it has castellated pins, the PCB can be mounted optionally on the target board, with provided KiCad schematic symbol, footprint and 3D model:


Embedded and Integrated Version
In addition, there is a KiCad schematic and layout your can copy-paste and integrate into your own board design. It includes the SWD debug header (if needed). Without it, it only requires a PCB space of 20×38 mm:

Using it is very simple with KiCad: Import the schematic with File > Insert Schematic Sheet Content:

For the layout, use File > Append Board in the PCB editor:

3D Printed Enclosure
To protect the circuit, Dario created a 3D printed snap-fit enclosure:


Firmware
As the hardware is compatible with the NXP MCU-Link debug probe, you can load the same firmware: press the bootloader/firmware button, power the board and run the NXP LinkServer firmware update script.
Summary
We have now a very versatile debug probe which we can use either standalone, soldered on a board with the castellated pins, or fully embedded into a design with KiCad. Compared to the original NXP MCU-Link, the size is 30% smaller. With the current MCU package, there is no need to use a different firmware. To reduce the size further, a different LPC MCU package would be possible, but this would require a firmware change.
Many thanks to Dario Scheuber for his work in this project!
Happy debugging 🙂
Links
- Project on GitHub: https://github.com/ErichStyger/McuLink-Mini
- NXP MCU-Link: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcu-link-debug-probe:MCU-LINK
- NXP LinkServer: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/linkserver-for-microcontrollers:LINKERSERVER
- MCU-Link with Cortex-Debug and LinkServer
- LinkServer for Microcontrollers
An excellent project.
Top marks, too, for M. Scheuber here.
LikeLike
Thanks, I’ll pass that to Dario.
LikeLike
Have you tried ORBTrace mini?
LikeLike
I’m aware of it, but have not personally used it. I would say the hardware is great, it is far beyond of what we need and can use on our kits, both from the power budget and price point.
LikeLike
Great project Erich and Dario! With the right firmware (and host software) I am guessing this could also support RISC-V :-)
LikeLike
Yes, this is not limited to ARM cores.
LikeLike
Can i use to debug stm32 mcus?
LikeLike
Yes, you can debug any ARM Cortex-M with it. Just make sure your debug server of choice (e.g. OpenOCD, or OpenOCD, or others) supports your device.
LikeLike
Pingback: The versatile OSHW Mini MCU-Link debug probe #Embedded #Development #Debug « Adafruit Industries – Makers, hackers, artists, designers and engineers!