Finding faults close to hardware.
WHAT MAKES IT DIFFICULT
Limited visibility No operating system to report errors Faults that reset the device Timing-dependent behaviour Problems only occurring in the field
WHAT TOOLS EXIST
Hardware debuggers, providing breakpoints and inspection Logic analysers, showing signals over time Oscilloscopes, showing electrical behaviour Serial output, the simplest and most used
WHAT TO ADD EARLY
A serial output channel.
WHY
It is the most useful diagnostic available, and difficult to add later.
WHAT TO TEST OFF-DEVICE
Logic, compiled and run on a development machine with hardware abstracted.
WHY
It is far faster, and enables automated testing.
WHAT THAT REQUIRES
Separating hardware access behind an interface.
WHAT TO TEST ON HARDWARE
Timing Peripheral behaviour Power consumption Environmental conditions
WHAT TO TEST DELIBERATELY
Power loss at every point Communication failure Invalid input Long uptime
WHY LONG UPTIME
Counter overflow and memory fragmentation appear only after extended running.
WHAT TO LOG IN THE FIELD
Enough to diagnose, within storage limits.