AESDme
AESDme
AESDme
Introduction
Rule of Thumb: Write good, bug-free code from
start if you could
Testing/Debugging embedded software is more
difficult than application software
Post-shipment application problems are more
tolerable than embedded (real-time or life-critical)
software
Bugs/Errors
Main types
1.Syntax error
2.Logic error
causes unexpected results or operation but not
failure.
Cannot be checked by the compilers, as the
program is syntactically valid.
Logic errors are usually the hardest to debug
3.Runtime error
A Runtime Error (Exception) is a problem that arise
when the program is executed.
DEBUGGING TECHNIQUES
1.
2.
3.
DEBUGGING TECHNIQUES
Basic Technique
Fig 10.1
Capabilities of Simulators:
Easier to test assembly code (for startup software and interrupt routines) in
simulator
Easier to test for portability since simulator takes same Map as the target
Other parts, e.g., timers and built-in peripherals, can be tested in the
corresponding simulated versions in the simulated microprocessor architecture
What simulators cant help:
Assert macro that runs on the target are useful for spotting
problems:
1) disabling interrupts and spin in infinite loop
effectively stopping the system
2) turn on some pattern of LEDs or blinking device
3) write special code memory for logic analyzer to read
4) write location of the instruction that cause problem to
specific memory for logic analyzer to read
5) execute an illegal op or other to stop the system e.g.,
using in-circuit emulators
Thank you