
Chapter 2 Basic Operations 2.8 Using the Tracer Effectively
59
2.8.4 Effective Trace Memory Usage 2
(Trace Full Break, Snapshot Trace)
Trace full break
1.
Trace memory has a ring buffer structure. This means that, once the trace memory is filled
with trace data, the existing trace data is overwritten by the new data, starting from the oldest
data.
2.
To preserve the trace results, trace operation can be stopped once the trace memory is full.
Trace full break setting:
Select Execute -> Trace Full Break from the menu bar.
Snapshot trace
1.
Trace memory is used to store the execution history. In addition to the execution history,
other data can be stored by specifying a snapshot event.
2.
The snapshot trace function writes specified data into trace memory when a condition is
satisfied. The following data can be written:
Data
Description
Register
All registers of the current bank
(PC, SP, PSW, AX, BC, DE, HL)
Up to five points in SFRs or memory can be traced.
SFR
Memory
Data
3.
4.
Before data is written into trace memory, the execution of the user program is stopped.
For the program below, the method of writing the register and SFRs (P0, P1) when address
0fd02h is accessed is shown.
Test program 1: Clearing RAM
Addr Data
0080 61D0
0082 16FFFC
0085 A100
0087 A304
0089 BB
008A 8BFD
008C 00
008D 00
008E FAFE
Mnemonic
SEL
MOVW
MOV
MOV
MOV
DBNZ
NOP
NOP
BR
RB0
HL,#0FCFFH
A,#0H
B,#4H
[HL+B],A
B,$89H
$8EH
Selects register bank 0.
Sets an initialization start address, minus 1.
Sets initialization data.
Sets the number of bytes to be initialized.
Initializes memory.
Determines termination.