[En-Nut-Discussion] Possibility to write bootloader that loads software from onboard flash?

Dusan Ferbas dferbas at etech.cz
Thu Dec 7 14:27:12 CET 2006


For 1 our customer we wrote a 2kB bootloader (BL) that cooperates 
with an application. Application loads its new image from a web page 
over http and calls BL API to store data. BL stores them into 
external SPI flash. After restart, BL burns new image into the 
program flash. You can have a new code running in a target within 15 
seconds (7 sec upload and burning into SPI included, other 7 sec for 
program flash burn and power up sice getTickCount() starts). BL is 
also able to get image with XMODEM over a serial port. This takes 
app. 10 seconds with XMODEM 1K.

This speed was sufficient. By using 2 internal SPI Flash buffers for 
writing, 1st 7 seconds can be reduced, because TCP is sending zero 
window packets to block incoming stream.

At 15:08 6.12.2006, Harald Kipp wrote:
>Erik,
>
>At 16:20 05.12.2006 +0100, you wrote:
>>Would it be possible to write a bootloader that loads software from 
>>the onboard flash memory?
>>Then perhaps also add a feature in the main software to upload new 
>>software to the onboard flash via thru http or ftp?
>
>It is possible. In fact this would be much better than
>directly programming the ATmega flash via TFTP. With
>unreliable connections the current bootloader may end
>up with a misprogrammed ATmega flash.
>
>
>
>>Perhaps someone already did this on the Ethernut v2.1 board?
>
>Not that I know of.
>
>Harald

Dusan  




More information about the En-Nut-Discussion mailing list