Debugging & Testing
JTAG, SWD, GDB, scopes, logic analyzers and HIL. Finding and preventing bugs: JTAG/SWD debug interfaces, GDB and HardFault analysis, oscilloscopes and logic analyzers, and unit, integration and hardware-in-the-loop testing.
- JTAG & SWD Debug Interfaces — JTAG and SWD connect your PC's debugger to the chip for flashing, breakpoints and live inspection. Learn JTAG signals and the TAP state machine, boundary scan and daisy chains, ARM Serial Wire Debug (2 pins) and its packet format, the CoreSight debug architecture (DAP, AP, breakpoints, watchpoints, SWO/ITM, ETM trace), debug probes and connectors, and how to secure the debug port in production.
- GDB Debugging & HardFault Analysis — Systematic debugging separates professionals from beginners. Learn GDB for embedded (breakpoints, conditional breakpoints, watchpoints, backtraces, memory examination, register views), debugging optimised code, Cortex-M fault exceptions (HardFault, MemManage, BusFault, UsageFault), decoding CFSR/HFSR/MMFAR/BFAR, recovering the faulting PC from the stacked frame, and post-mortem crash logging in the field.
- Oscilloscopes, Logic Analyzers & Bench Tools — Some bugs live in electrons, not code. Learn to use oscilloscopes (bandwidth, sample rate, rise time, triggering, probes and grounding), logic analyzers (sample rate, protocol decoding, timing measurements), multimeters, bench supplies with current limit, and techniques like GPIO timing markers — with rules of thumb to choose and trust your instruments.
- Testing Embedded Software: Unit, Integration & HIL — Firmware that can't be tested can't be trusted. Learn the test pyramid for embedded, unit testing C on the host (Unity, CppUTest, GoogleTest), test doubles (fakes, stubs, mocks) for hardware, test-driven development, code coverage, static analysis, hardware-in-the-loop (HIL) and continuous integration, and how testing maps to safety standards.