Checking the consistency of a lock step process while debugging a microcontroller
code is in progress. A method provides a production microcontroller to execute
an instruction code and provides the result of the instruction code to an ICE.
The ICE, independent from the production microcontroller and simultaneously, executes
the same instruction code and produces a result. The ICE compares the result of
its computation and the result received from the production microcontroller. The
ICE issues a "lock step error" when the result of the comparison is a mismatch.
A trace buffer residing in the host device provides the location of the line of
code causing the mismatch. After identifying the line of code causing the mismatch
the user debugs the erroneous line of code. The debugging process resumes on the
next line of code in the microcontroller code under test.