User manual
MPLAB
®
REAL ICE
™
In-Circuit Emulator User’s Guide
DS51616B-page 24 © 2008 Microchip Technology Inc.
• The target device must have its configuration words programmed correctly:
- The oscillator Configuration bits should correspond to RC, XT, etc., depending
upon the target design.
- For some devices, the Watchdog Timer is enabled by default and needs to be
disabled.
- The target device must not have code protection enabled.
- The target device must not have table read protection enabled.
2.7.1 Sequence of Operations Leading to Debugging
Given that the Requirements For Debugging are met, these actions can be performed
when the MPLAB REAL ICE in-circuit emulator is set as the current debugger
(Debugger>Select Tool
):
• The application code is compiled/assembled with the “Build Configuration” list box
on the MPLAB IDE toolbar set to “Debug”. Also, it may be set by selecting
Project>Build Configuration>Debug
.
• When Debugger>Program
is selected, the application code is programmed into
the device’s memory via the ICSP protocol as described above.
• A small “debug executive” program is loaded into the high area of program
memory of the target device. Since the debug executive must reside in program
memory, the application program must not use this reserved space. Some devices
have special memory areas dedicated to the debug executive. Check your device
data sheet for details.
• Special “in-circuit debug” registers in the target device are enabled by MPLAB
IDE. These allow the debug executive to be activated by the emulator.
• The target device is held in Reset by keeping the V
PP/MCLR line low.