Bootloader Not Generating Reset Code
I don't like auto code generation so I'm doing this the hard way. It's the first time I've used XC8 for a bootloader. The "Linking PIC18 Bootloaders and Applications" presentation seems to be out of date.
In my bootloader I have
#define APP_START 0x1000 // application offset
asm("GOTO " ___mkstr(APP_START+0x8));
asm("GOTO " ___mkstr(APP_START+0x18));
And, at the end of the bootloader
// Jump to application
asm("GOTO " ___mkstr(APP_START));
I have reserved 0-fff for the bootloader in the Linker settings.
In the application I have set the CODEOFFSET to 0x1000
Looking at the .map and .lst files for both projects, all of the interrupt relocating looks good, but there is no code to handle the reset vector at 0, nor at APP_START in the application.
E.g., in the bootloader .lst
50 psect intcode
51 000008 EF04 F008 goto 4104 ;#
53 psect intcodelo
54 000018 EF0C F008 goto 4120 ;#
There is an entry for the reset_vec section in the .map, just no code anywhere.
What am i doing wrong?
post edited by crosland - 2019/10/18 05:16:19