I am compiling using the XC8 V2.1 compiler (C99 mode) in Windows 10 for a PIC18F46J50 chip. I am using the new interrupt declaration standard supported by XC8 V2.x as follows:
void __interrupt(high_priority) SYS_InterruptHigh(void)
{...}
void __interrupt(low_priority) SYS_InterruptLow(void)
{...}
The code compiles and runs only no interrupts are serviced. I am unable to put breakpoints in the interrupt code (they show as "broken breakpoints") so apparently the compiler has "optimized" this code out of existence. I have enabled prioritized interrupts (IPEN=1) and enabled interrupts in my initialization code. Have done this hundreds of times in previous projects, but not using the latest 2.x compiler. Got to be something simple wrong here!
My PSECT usage shows there is nothing located at the interrupt vector addresses (0x0008, 0x0018):
Psect | Contents | Memory Range | Size
------------|-----------------------------|------------------|--------------
init | Initialization code | 0000h - 0003h | 4 bytes
text79 | Program and library code | A326h - A32Bh | 6 bytes
Thx!