User manual
MPLAB
®
REAL ICE
™
In-Circuit Emulator User’s Guide
DS51616B-page 48 © 2008 Microchip Technology Inc.
4.13 DEBUGGING CODE USING NATIVE TRACE
The trace function can be used to collect information on variables and code and store
it in a buffer while the code is executing.
In this section, Native trace will be used. For more information about tracing in general
using the MPLAB REAL ICE in-circuit emulator, see Chapter 7. “Debug for 8- and
16-Bit Devices”.
4.13.1 Logging a Variable Value
To log a variable value:
1. Select Project>Build Options>Project, Trace tab. Check “Enable Trace” and
uncheck “Disable Trace Macros”. Then select the type of trace, i.e., “Native
Trace” for devices with built-in ICE support. Click OK.
FIGURE 4-19: BUILD OPTIONS DIALOG – NATIVE TRACE
Note 1: Trace operation requires 16-bit C compiler v2.04 and above.
2: Real-time data capture triggers (from the previous section) cannot be
used at the same time as Native trace.