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 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 First In First Out (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 the Project Properties dialog, REAL ICE for Categories, and Trace and Profiling for Option categories. Here you may set:

  • Data Collection 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 22 MB. Execution will not halt when this external buffer is full.

See also Trace Configuration Options.

X_PP_32BitProfiling.gif
Figure 1: PIC32 Instruction Trace Options
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.