Sequence of Operations Leading to Debugging

Given that the requirements for debugging are met, the following actions will be performed when the MPLAB® REAL ICE™ In-Circuit Emulator is set as the hardware tool for your MPLAB X IDE project (File > Project Properties > Hardware Tool category > Real ICE > SN XXXXXX) and Debug > Debug Project is selected.


Program Application Code

The application code is programmed into the device’s memory via the In-Circuit Serial Programming™ (ICSP™) protocol, as described in "Emulator Operation".


Program Debug Exec

The small Debug Executive program is loaded into the high program memory of the target device. Because 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 datasheet for details.

To determine the amount of program memory that must be reserved, see the MPLAB X IDE Start Page, Learn & Discover tab, Users Guide & Release Notes > Reserved Resources, and select your device.


Enable Debug Features

Special “in-circuit debug” registers in the target device are enabled by MPLAB X IDE. These allow the debug executive to be activated by the emulator.

To determine the registers that must be reserved for debug, see the MPLAB X IDE Start Page, Learn & Discover tab, Users Guide & Release Notes > Reserved Resources, and select your device.


Debug Run Program

The target device is run in Debug mode.

© 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.