Debug Host Tools¶
This guide describes the software tools you can run on your host workstation to debug Zephyr applications.
Zephyr’s west tool has built-in support for all of these in its debug
,
debugserver
, and attach
commands, provided your board hardware supports
them and your Zephyr board directory’s board.cmake
file declares that
support properly. See Building, Flashing and Debugging for more information on
these commands.
J-Link Debug Host Tools¶
Segger provides a suite of debug host tools for Linux, macOS, and Windows operating systems:
J-Link GDB Server: GDB remote debugging
J-Link Commander: Command-line control and flash programming
RTT Viewer: RTT terminal input and output
SystemView: Real-time event visualization and recording
These debug host tools are compatible with the following debug probes:
Check if your SoC is listed in J-Link Supported Devices.
Download and install the J-Link Software and Documentation Pack to get the J-Link GDB Server and Commander, and to install the associated USB device drivers. RTT Viewer and SystemView can be downloaded separately, but are not required.
Note that the J-Link GDB server does not yet support Zephyr RTOS-awareness.
OpenOCD Debug Host Tools¶
OpenOCD is a community open source project that provides GDB remote debugging and flash programming support for a wide range of SoCs. A fork that adds Zephyr RTOS-awareness is included in the Zephyr SDK; otherwise see Getting OpenOCD for options to download OpenOCD from official repositories.
These debug host tools are compatible with the following debug probes:
Check if your SoC is listed in OpenOCD Supported Devices.
Note
On Linux, openocd is available though the Zephyr SDK. Windows users should use the following steps to install openocd:
Download openocd for Windows from here: OpenOCD Windows
Copy bin and share dirs to
C:\Program Files\OpenOCD\
Add
C:\Program Files\OpenOCD\bin
to ‘Path’
pyOCD Debug Host Tools¶
pyOCD is an open source project from Arm that provides GDB remote debugging and flash programming support for Arm Cortex-M SoCs. It is distributed on PyPi and installed when you complete the Get Zephyr and install Python dependencies step in the Getting Started Guide. pyOCD includes support for Zephyr RTOS-awareness.
These debug host tools are compatible with the following debug probes:
Check if your SoC is listed in pyOCD Supported Devices.