Help with bootloaer ideas

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with bootloaer ideas

1,410 Views
M_ttferrari
Contributor III

Hi, I need somebody help me with some ideas to do something similar to a bootloader. In my system I have got a FPGA and a MCF5213. In FLASH memory of MCF5213 I have the FPGA configuration and the rest of the program. Well, it is working as I want.

Now I'm thinking in future software upgrades but I don't have any idea how I can do this. The FPGA handles a fiber optic interface, it is the only way that the MCF5213 have to interact with "the external world" so it'll be the way that I send the new s19 file.

My questions are:  

1. Once that I saved the new s19 into FLASH mem, how can I go to the new begin program? and when the power disappears Where does the MCF5213 start?

2. How do I select each program storaged in FLASH?

I hope this little system discribes what I'm trying to do... If not, I'll try to explain more that I want to do.

Thanks, best regards

Matt

Message Edited by M@ttferrari on 2009-10-26 05:40 PM
Message Edited by M@ttferrari on 2009-10-26 05:40 PM
Labels (1)
0 Kudos
Reply
2 Replies

749 Views
scifi
Senior Contributor I
If you want your system to survive power cuts during update process, you must have enough memory to hold two firmware images: the old one and the new one. You could partition your flash memory into 3 regions: a small boot program, the main firmware and the new uploaded image. The uploaded image should have a checksum. At startup, the boot program would check if there is a new uploaded image with correct checksum available. If so, it would copy it to main firmware area and invalidate the checksum. Otherwise, it would just start the main firmware.
0 Kudos
Reply

749 Views
mjbcswitzerland
Specialist V

Hi

 

There are 2 boot loader types described in the following 2 documents:

http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

http://www.utasker.com/docs/uTasker/uTaskerBoot_003.PDF

 

One uploads a new code to spare memory and swaps on reset; the other directly loads new code (after clearing space). Both have their advantages and disadvantages(SREC loaded requires 10k space on M5213 - swap loader 2k, but also space for new program in parallel in internal or external SPI FLASH).

 

Regards

 

Mark

 

www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."

Message Edited by mjbcswitzerland on 2009-10-31 11:26 PM
0 Kudos
Reply