I've got the same trouble using MCC bootloader with a PIC18F87K22 (xc8 1.45, offset 0x800, two pritority interrupts).
I noticed that bootloader save its context from 0x02 to 0x13 that is used by my application variables as well.
I first tried to use "defaut,-0-14" as RAM ranges in linker Memory model. As it looked fine then I downloaded application using bootloader. But application failed.
So I thought than bootloader should not save context as application do it, so I tried :
asm ("PSECT intcode\n goto 0x808 ");
asm ("PSECT intcodelo\n goto 0x818 ");
Compilation was fine for bootloader alone as main project, I got :
0x008 GOTO 0x808
0x018 GOTO 0x818
Compilation was also fine for my application as main project with Conf:combined and with Conf:offset.
Combined application looks well working. I need to check downloading now.
I heared xc8 compiler could turn on or off context saving with Pro mode but not with Free Mode.
Is someone can confirm?
post edited by Phil_idee - 2018/04/04 09:30:24