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.

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.