5.6.2 How Instruction Trace Works
PIC32 instruction trace uses a MIPS32 iFlowtrace™ mechanism, which is a non-intrusive hardware instruction trace. You can use this trace to capture every instruction executed by the device. The trace data is sent from the device using the pins TRCLK and TRD3:0 to the emulator. The emulator streams this data to a trace buffer on the PC that acts like a rolling FIFO.
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 Project Properties>ICE4>Trace and Profiling. Here you may set:
- Data selection – enable/disable trace and select the type of trace.
- Data file path and name – the location of trace file.
- Data file maximum size – the size of trace file.
- Data Buffer maximum size – the size of the trace buffer.
The maximum off-chip (PC) trace buffer size is 22MB. Execution will not halt when this external buffer is full.
See also Trace and Profiling.