Unit content
On-target debugging and hardware instrumentation
Embedded failures can involve both software state and physical signals, so debugging often needs visibility into the running target as well as ordinary program output.
An on-chip debug interface such as JTAG or SWD can let a debugger halt the processor, inspect registers and memory, single-step instructions and use breakpoints or watchpoints without requiring the firmware to print every internal state.
A logic analyzer observes digital pins over time. It can reveal whether a UART frame, SPI clock or GPIO interrupt actually occurred with the expected timing even when the firmware's internal view is wrong.
An oscilloscope adds analog information such as voltage shape, rise time or noise that a digital logic analyzer intentionally discards.
Instrumentation can perturb timing. Halting the processor may stop some peripherals but not others, and heavy logging can make a race or deadline failure disappear.
Effective embedded debugging therefore combines internal execution evidence with measurements of the external hardware behavior the program is meant to control.