User manual
EEP and Emulation Header User’s Guide
DS50002243A-page 28 2014 Microchip Technology Inc.
3.2.3 Header Limitations
See the “Limitations” section in your debug tool online Help file for details.
Additionally, the following silicon errata applies to this header:
Hardware Breakpoint Issue
When using this emulation header with C language or Assembly language code,
hardware breakpoints will not function past memory locations 0x3FF for the following
emulated devices:
• PIC16F1936, PIC16LF1936
• PIC16F1937, PIC16LF1937
Workarounds:
1. Software breakpoints for these four parts could be used (with the caveat that
software breakpoints do not offer the advanced capability of hardware
breakpoints).
2. Any function(s) that need to be debugged with hardware breakpoints could be
explicitly (and temporarily) located in the program memory area below 0x400
until the function is properly debugged.
In C language for the MPLAB XC8 C compiler, this can be done with the @
address construct as follows, which will locate function_1 at program
memory base address 0x200.
void function_1(void) @ 0x200
{
asm("NOP");
asm("NOP");
asm("NOP");
}
In assembly language for the MPASM assembler, this can be done with the CODE
directive as follows, which will locate function_1 at program memory base
address 0x200.
HW_BRKPT CODE 0x0200
function_1:
NOP
NOP
NOP
RETURN