Debug Probes

A debug probe is special hardware which allows you to control execution of a Zephyr application running on a separate board. Debug probes usually allow reading and writing registers and memory, and support breakpoint debugging of the Zephyr application on your host workstation using tools like GDB. They may also support other debug software and more advanced features such as tracing program execution. For details on the related host software supported by Zephyr, see Flash & Debug Host Tools.

Debug probes are usually connected to your host workstation via USB; they are sometimes also accessible via an IP network or other means. They usually connect to the device running Zephyr using the JTAG or SWD protocols. Debug probes are either separate hardware devices or circuitry integrated into the same board which runs Zephyr.

Many supported boards in Zephyr include a second microcontroller that serves as an onboard debug probe, usb-to-serial adapter, and sometimes a drag-and-drop flash programmer. This eliminates the need to purchase an external debug probe and provides a variety of debug host tool options.

Several hardware vendors have their own branded onboard debug probe implementations: NXP boards may use OpenSDA, LPC-Link2, or MCU-Link, probes depending on the microcontroller the debug probe firmware runs on. ST boards have the ST-LINK probe. Each onboard debug probe microcontroller can support one or more types of firmware that communicate with their respective debug host tools. For example, an OpenSDA microcontroller can be programmed with DAPLink firmware to communicate with pyOCD or OpenOCD debug host tools, or with J-Link firmware to communicate with J-Link debug host tools.

Debug Probes & Host Tools
Compatibility Chart

Host Tools

J-Link Debug

OpenOCD

pyOCD

NXP S32DS

NXP LinkServer

Debug Probes

J-Link External

LPC-Link2 CMSIS-DAP

LPC-Link2 J-Link

MCU-Link CMSIS-DAP

MCU-Link J-Link

NXP S32 Debug Probe

OpenSDA DAPLink

OpenSDA J-Link

ST-LINK/V2-1

some STM32 boards

Some supported boards in Zephyr do not include an onboard debug probe and therefore require an external debug probe. In addition, boards that do include an onboard debug probe often also have an SWD or JTAG header to enable the use of an external debug probe instead. One reason this may be useful is that the onboard debug probe may have limitations, such as lack of support for advanced debuggers or high-speed tracing. You may need to adjust jumpers to prevent the onboard debug probe from interfering with the external debug probe.

NXP Onboard Debug Probes

NXP boards may have one of several onboard debug probes. These probes include the MCU-Link Onboard Debug Probe, LPC-LINK2 Onboard Debug Probe and OpenSDA Onboard Debug Probe. Each of these probes is implemented as a secondary microcontroller present on the evaluation board. The specific debug probe type present on a given board can be determined based on the debug microcontroller SOC:

For example, the NXP FRDM-K64F board has an MK20 debug microcontroller, so this board uses the OpenSDA Onboard Debug Probe.

LPC-LINK2 Onboard Debug Probe

The LPC-LINK2 onboard debug probe uses an LPC4322 SOC. This probe supports the following firmwares:

This probe is programmed using the LPCScrypt host tools, which are installed with the LinkServer Debug Host Tools. NXP recommends using NXP’s MCUXpresso Installer to install the Linkserver tools.

LPC-LINK2 CMSIS DAP Onboard Debug Probe

The CMSIS-DAP debug probes allow debugging from any compatible toolchain, including IAR EWARM, Keil MDK, as well as NXP’s MCUXpresso IDE and MCUXpresso extension for VS Code. As well as providing debug probe functionality, the LPC-Link2 probes also provide:

  1. SWO trace end point: this virtual device is used by MCUXpresso to retrieve SWO trace data. See the MCUXpresso IDE documentation for more information.

  2. Virtual COM (VCOM) port / UART bridge connected to the target processor

  3. LPCSIO bridge that provides communication to I2C and SPI slave devices

This debug probe firmware is compatible with the following debug host tools:

The probe may be updated to use CMSIS-DAP firmware with the following steps:

  1. Make sure the LPCScrypt utility is present on your host machine. This can be done by installing LinkServer Debug Host Tools.

  2. Put the LPC-Link2 microcontroller into DFU boot mode by attaching the DFU jumper, then connecting to the USB debug port on the board. This jumper is connected to P2_6 on the LPC4322 SOC.

  3. Run the program_CMSIS script, found in the installed LPCScrypt scripts folder.

  4. Remove the DFU jumper and power cycle the board.

OpenSDA Onboard Debug Probe

The OpenSDA onboard debug probe is based on the NXP MK20 SOC. It features drag and drop programming supports, and supports the following debug firmwares:

NXP S32 Debug Probe

NXP S32 Debug Probe enables NXP S32 target system debugging via a standard debug port while connected to a developer’s workstation via USB or remotely via Ethernet.

NXP S32 Debug Probe is designed to work in conjunction with NXP S32 Design Studio (S32DS) and NXP Automotive microcontrollers and processors. Install the debug host tools as in indicated in NXP S32 Debug Probe Host Tools before you program the firmware.