
200/317
7 - Debugger and PROM Programmer Tutorial for ST72251
07-emu12.bmp
When we press Continue, the program runs at full speed until the next breakpoint, if any.
During this time, we are blind to what happens in memory. To compensate for this, we have a
tool called the trace recorder.
Select the toolbox Windows/Trace option. The window that opens shows all the memory ac-
cess cycles. Double-click on one of the lines shown, then on the single left-arrow at the top of
the window. We see the highlighted line moving up, and in the corresponding source window,
the corresponding line highlighted.
Then remove all the breakpoints, and press Run. The program now runs continuously, and if
eight LEDs are connected to port A, we see the unlit LED moving from one position to the next
one each half second. To return control to the debugger, press the Stop button on the toolbox.
The application must be stopped to close the debugger.
7.3.3.6 Watching the contents of the stack
Another piece of information we can get from the debugger is the contents of the return stack.
This is useful if we stop somewhere in a deeply nested subroutine, and want to know where it
was called from. As an example, we shall put a breakpoint at the deepest point of this small
program, for example at the first instruction of the
Delay500
subroutine. Press Run, and wait
for the program to stop. Choosing Window/Stack in the toolbox, the following window shows
up:
07-emu13.bmp