User manual
EEP and Emulation Header User’s Guide
DS50002243A-page 14 2014 Microchip Technology Inc.
2.3 REAL TIME HARDWARE INSTRUCTION TRACE
Real Time Hardware Instruction Trace is a real-time dump of the program execution
stream that can be captured and analyzed.
The functionality that is provided includes:
• full instruction execution information up to 32 MHz
• trace through Reset conditions
• trace buffer with optional stall
2.3.1 How Trace Works
Emulation header trace is similar to PIC32 instruction trace, which is a non-intrusive
hardware instruction trace. You can use trace to capture every instruction executed by
the device. The trace data is output from the device (using the pins TRCLK,
TRDAT[6:0], and TRSTALL) to the emulator. The emulator streams this data to a trace
buffer, that acts like a rolling first-in/first-out (FIFO) buffer, on the PC.
The amount of trace data is limited only by the size of the trace buffer. This buffer can
fill quickly even when set to the maximum size, so it is wise to determine exactly what
you need to capture.
Enable and set trace options in the Project Properties dialog in the following menu
selections:
Categories – “REAL ICE”
Option categories – “Trace and Profiling”
From there, you can set:
“Data selection” – enable/disable trace and select the type of trace.
“Data file path and name” – location of trace file
“Data file maximum size” – size of trace file
“Data Buffer maximum size” – size of the trace buffer
MPLAB X IDE will announce when the trace buffer has overflowed.
Note: Execution will not halt when this external buffer is full.
Note: This feature is only supported on the MPLAB REAL ICE in-circuit emulator.