I have a bootloader to PIC18F4550 that was written using Mikro C for PIC and I have two firmware applications, one was written using Mikro C for PIC and the other using MPLAB X with XC8 compiler.
With the bootloader installed, I can upload the application written in Mikro C without problem, but, with the same bootloader installed, when I try to upload the application written in MPLABX I can't. I load untill 100% but in the end it crashes . I thought that upload the applicatoin in hex it would not be a problem and would be independant of the tool used.
The version of the bootloader that I'm using is this that I found in this site:
Some one has any idea of why it is happening ?
I don't know if it is at the top or at the bottom of memory. Based on the following code, I guess it is on the bottom:
const unsigned long BOOTLOADER_SIZE = 8000;//7432;
const unsigned long BOOTLOADER_START = (( __FLASH_SIZE - BOOTLOADER_SIZE) / _FLASH_ERASE) * _FLASH_ERASE;
This says, basically, that the start of bootloader begins at memory region given by the flash memory size minus the bootloader size. So, I don't know why, it divided and multiplied by the size of flash erase block. The size of the bootloader is already given too.
I did nothing to the XC8 app to ensure it does not overlap, I just compiled it. How can I do ensure it does not overlap ?