PIC18F47K42 Booatloader Interrupt Vector Remap
I'm using PIC18F47K42 mc with MPLAB XIDE and XC8 compiler. I'm working on a bootloader.
I'm having a problem with interrupts not working (i.e. ISR not getting called) after program jumps from bootloader to application. According to the documentation and discussion forums, because PIC18 supports programming interrupt vector base address into the interrupt controller, remapping of interrupt vectors is basically done by changing the base interrupt vector. For the bootloader, the base interrupt vector is 0x08 and for the program application it is 0x3708. The linker options are also correctly specified and verified the .map file was properly updated to place the bootloader and program application in mutually exclusive areas in the flash.
When I run the application standalone (without bootloader) with the same IVT base address (0x3708), interrupts (i.e. timer interrupt) work fine. When I program the bootloader and application together, the timer interrupt works while in the bootloader but when program jumps to application, the interrupts don't work anymore. At the start of the application the interrupt controller and other components are initialized and the application IVT base address is written to the controller register.
Using the debugger, I placed a breakpoint in the bootloader timer ISR and it appears while in the application and timer interrupt fires off, program jumps to the bootloader ISR instead of the application ISR.
Any help is greatly appreciated