Debugging applications on the PIC® MCU requires the use of several dedicated MCU resources. Among the resource required for debugging are:
- Two dedicated I/O pins to connect to the debugger.
- Dedicated on-board debug circuitry built into the MCU.
On small pin-count MCUs, all I/O pins may be needed for the application, leaving no pins available for debugging. In addition, since debugging is only done in the development phase and not in production, it may be economically unfeasible for smaller MCUs to have comprehensively dedicated debug circuitry on devices used in mass production.
Debug Headers
Debug headers enable debugging on MCUs that do not have on-board debug circuitry. Many of these debug-limited MCUs come in low pin count packages. Debug headers contain a special version of the target chip, including both the debug circuitry and dedicated debugging pins. By placing it on the target hardware, an engineer will be able to use a standard Microchip programmer/debugger to debug the application code.
When debug headers are in use, the target board "sees" the original target MCU with all the I/O available. The debugger "sees" a target chip with the additional dedicated I/O pins for debugging.
The Project Properties window informs you if a debug header is required for running a debug session with the chosen MCU.
For more details on Debug headers and related Processor Extension Paks, see Processor Extension Paks and Debug Headers Specification.
Emulation Headers
Emulation headers provide enhanced debugging options for MCUs. Like Debug headers, an Emulation header replaces the target MCU with a special version of the MCU. This new MCU performs as the original MCU but includes enhanced debugging features. Many of the MCUs with Emulation header options already have debug circuitry capable of basic debugging on-chip. For a full description of Emulation headers and related Emulation Extension Paks, please see Emulator Extension Paks and Emulation Headers User's Guide.