Debug probes and bench instruments

Tools for seeing inside a running chip and on the wires around it: JTAG, SWD, GDB, logic analysers and oscilloscopes.

Core

A debug probe between GDB and the chip, and what a logic analyser and an oscilloscope show GDB talks through a tool such as OpenOCD to a debug probe, which connects to the target chip over SWD or JTAG, giving breakpoints, single-stepping and memory inspection. A logic analyser records many digital lines and decodes protocols such as I²C and SPI; an oscilloscope shows the analog shape of a few signals, revealing ringing, slow edges and noise. Seeing inside the running chip Your computer GDB OpenOCD or similar Debug probe Target chip SWD or JTAG GDB gets breakpoints, single-stepping and memory inspection on the target chip. SWD needs just two signals, clock and data. JTAG (IEEE 1149.1) was created for board testing. Logic analyser Records many digital lines Decodes protocols such as I²C and SPI Oscilloscope Analog shape of a few signals ringing slow edge noise Reveals what a logic analyser hides
GDB reaches the chip through a tool such as OpenOCD, a debug probe and SWD or JTAG; a logic analyser decodes many digital lines, and an oscilloscope shows the analog detail they hide.

Key points

  1. JTAG (IEEE 1149.1) was created for board testing and is widely used for debugging; Arm's Serial Wire Debug (SWD) provides debug access with just two signals, clock and data.12
  2. Open-source tools such as OpenOCD connect a debug probe to GDB, giving breakpoints, single-stepping and memory inspection on the target chip.3
  3. A logic analyser records many digital lines and decodes protocols such as I²C and SPI; an oscilloscope shows the analog shape of a few signals, revealing ringing, slow edges and noise that a logic analyser hides.45

Sources

  1. IEEE 1149.1-2013: Standard for Test Access Port and Boundary-Scan Architecture · IEEE · Standard
  2. Arm Debug Interface Architecture Specification ADIv5.0 to ADIv5.2 (IHI 0031E) · Arm · Standard
  3. OpenOCD User's Guide · OpenOCD project · Project docs
  4. sigrok: Protocol decoders · sigrok project · Project docs
  5. Logic Analyzer vs Oscilloscope · Keysight Technologies · Vendor page