I attached the main.c of bootloader's firmware that I'm using, I attached some files of the PC software used to upload the .hex files to device. Based on the function send() on the MainForm.cs, it seems that the address to upload the file is passed to the bootloader, but I'm not sure. The main.c of the bootloader is here :https://drive.google.com/open?id=1eO6eczG5P7157F6S15QUCkr-SuDnnzJE and the MainForm.cs is here: https://drive.google.com/open?id=1XGAnLal9iqJ2-mK8zfNtrKydtiCYFvzu.
I made a dummy program, identically in Mikro C and MPLAB X with XC8, just to test, and I compared the .hex files generated by both tools. The program was:
- Code: Select all
void main(void) {
unsigned char teste;
while(1){
teste ^=teste;
}
}
I tried to upload it, again the Mikro C .hex file was uploaded without problem nd the MPLAB .hex file not. The PC software crashed again. But, this time, the bootloader does not stop functioning.
The comparison of the .hex files are attached. As can be seen they are very different.
I don't know which difference on them that is making the .hex file written in MPLABX not be uploaded or, if it is a code overwritten problem which is making the code in MPLABX overwrites the bootloader code.