6.1 Debugging and testing
A method for debugging, debug probes and GDB, decoding hard faults, unit tests on the host with fakes and mocks, coverage, static analysis and CI, and…
Lessons
- Debugging embedded systems · JTAG and SWD, GDB, hard faults and a method for finding bugs.
- Testing and code coverage · Unit tests on the host, mocks, HIL, coverage and static analysis.
- Power profiling and measurement · Measuring microamps to amps and finding where the energy goes.
- Logic analyzers and oscilloscopes · Seeing what really happens on the wires: sample rates, decoding, triggers and what to look for.
Project: Heart-rate monitor watch
A wearable that has to work on a customer's wrist, where nobody can attach a debugger. You build the tools a firmware team relies on: crash diagnosis, tests that catch real bugs, battery maths and a protocol decoder.