Datasheet
Emulator User’s Guide for MPLAB X IDE
DS52085A-page 56 2013 Microchip Technology Inc.
There are three trace methods available at this time (see Section 6.3.3 “Types of
Trace”). The methods can be found on the Project Properties dialog, REAL ICE Cate-
gory, Trace Options Category page. The choices include Native Trace (utilizes
PGC/PGD communication lines), SPI Trace, and I/O Port Trace. Not every method is
available on every part; i.e., the options are device specific. The Instrumented Trace
library supports C and assembly projects on PIC18F MCU devices, but only C projects
on 16-bit devices.
FIGURE 6-2: BUILD OPTIONS TRACE TAB – NATIVE TRACE SELECTION
The trace and log information transmitted is identical regardless of the trace method
used. For TRACE(), a single value in the range of 64-127 is sent. A label generated
using this number is automatically inserted into the code, so MPLAB IDE can identify
in the trace buffer the location that sent the value. For LOG(), a two-byte header is sent
followed by the value of the variable being logged. The first byte indicates the variable
type and is a value between 0 and 63. The second byte indicates the location which
sent the variable. Here, the location is represented by a value between 0 and 127. (See
Section 6.3.9 “More on Trace/Log ID Numbers”.)
Interrupts are disabled during every TRACE() and LOG() call. This is to ensure that
trace or log statements at an interrupt level do not interfere with a trace or log statement
that may already be in progress at the application level. A similar argument holds for
protecting statements within a low priority interrupt from being corrupted by those from
a high priority interrupt.