Page 1 of 1

mikroBootloader What does the "Select MCU" do

Posted: 08 Oct 2012 00:22
by rhamer
I am writing my own front end to communicate with the example PIC bootloader code.

It all looks pretty straight forward, but one thing I notice on the mikroBootloader is the MCU selection which toggles between PIC16 & PIC18.

Can you tell me what difference it makes when choosing one MCU over another?

I have watched the file transfer and it seems to send exactly the same sequence regardless of what MCU is selected.

Given the bootloader is just streaming the HEX file serially, why does it even care what MCU is on the receiving end?

Regards

Rohan

Re: mikroBootloader What does the "Select MCU" do

Posted: 09 Oct 2012 15:25
by janko.kaljevic
Hello,

the switch between PIC16 or PIC18 is necessary because there are some difference between them in memory organization.
For example addresses of the interrupt vectors and start address of the program memory.

Best regards.

Re: mikroBootloader What does the "Select MCU" do

Posted: 09 Oct 2012 16:25
by rhamer
I understand that there are differences in the actual MCU, but from what I can see that is all taken care of at compile time.

When I look at the hex output file it contains intel hex encoded data that has the target address built in to the encoding.

All the boot loader appears to do is decode the intel hex into raw hex, addressed as defined by each intel hex record, then stream it out to the boot loader code running on the pic.

It seems to make no difference at all whether pic16 or pic18 is selected in the mikroBootloader application.

In fact to prove this I have successfully written my own front end to talk to the mikroe sample boot loader code running on a pic18 and it works fine.

So it appears that the pic16 or pic 18 option does nothing, as the boot loader it's self does not appear to manipulate the compiled hex file, other than to decode the intel hex format. And pass it on. Can you confirm this is the case?

Regards

Rohan

Re: mikroBootloader What does the "Select MCU" do

Posted: 10 Oct 2012 17:03
by janko.kaljevic
Hello,

Bootloader application will make exact image of the microcontroller's flash, according to loaded hex file.
After this it will just transfer byte per byte this content to controller.

Bootloader application will block hex files which are large enough to over write bootloader.
So if you choose PIC16F in drop down menu it will just ignore the code above 8k.
Small codes will work.

Best regards.