Libstock
It is currently 24 Oct 2014 14:29

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 08 Oct 2012 00:22 
Offline

Joined: 20 Mar 2012 23:02
Posts: 39
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


Top
 Profile  
 
PostPosted: 09 Oct 2012 15:25 
Offline
User avatar

Joined: 16 Jun 2011 13:48
Posts: 3565
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.


Top
 Profile  
 
PostPosted: 09 Oct 2012 16:25 
Offline

Joined: 20 Mar 2012 23:02
Posts: 39
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


Top
 Profile  
 
PostPosted: 10 Oct 2012 17:03 
Offline
User avatar

Joined: 16 Jun 2011 13:48
Posts: 3565
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group