®
MPLAB
ICD 3 In-Circuit Debugger User's Guide
The debug executive runs just like an application in program memory. It uses some
locations on the stack for its temporary variables. If the device does not run, for
whatever reason, such as no oscillator, a faulty power supply connection, shorts on the
target board, etc., then the debug executive cannot communicate to the MPLAB ICD 3
in-circuit debugger and MPLAB IDE will issue an error message.
Another way to get a breakpoint is to press the MPLAB IDE's Halt button (the "pause"
symbol to the right of the Run arrow). This toggles the PGC and PGD lines so that the
in-circuit debug mechanism of the target device switches the Program Counter from the
user's code in program memory to the debug executive. Again, the target application
program is effectively halted, and MPLAB IDE uses the debugger communications with
the debug executive to interrogate the state of the target device.
2.8
PROGRAMMING WITH THE DEBUGGER
Use the MPLAB ICD 3 in-circuit debugger as a programmer to program an actual (non
-ICE/-ICD) device, i.e., a device not on a header board. Select "MPLAB ICD 3" from
Programmer>Select Programmer and compile/assemble your application code with
the "Build Configuration" list box on the MPLAB IDE toolbar set to "Release". Also, it
may be set by selecting Project>Build Configuration>Release.
All debug features are turned off or removed when the debugger is used as a
programmer. When using the Programmer>Program selection to program a device,
MPLAB IDE will disable the in-circuit debug registers so the MPLAB ICD 3 in-circuit
debugger will program only the target application code and the Configuration bits (and
EEPROM data, if available and selected) into the target device. The debug executive
will not be loaded. As a programmer, the debugger can only toggle the MCLR line to
reset and start the target. A breakpoint cannot be set, and register contents cannot be
seen or altered.
The MPLAB ICD 3 in-circuit debugger system programs the target using ICSP. V
PGC and PGD lines should be connected as described previously. No clock is required
while programming, and all modes of the processor can be programmed, including
code protect, Watchdog Timer enabled and table read protect.
2.9
RESOURCES USED BY THE DEBUGGER
For a complete list of resources used by the debugger for your device, please see the
on-line help file in MPLAB IDE for the MPLAB ICD 3 in-circuit debugger.
DS51766A-page 20
,
PP
© 2008 Microchip Technology Inc.
Need help?
Do you have a question about the MPLAB ICD 3 and is the answer not in the manual?