[En-Nut-Discussion] Fwd: RE: Reprogramming

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Jan 25 15:25:45 CET 2010

Hi Peter,

normaly you would write some kind of bootloader which will stay resident
in the bootloader area of you AVR which are the last few pages of flash.
You can define the size of this bootloader area by setting the fuse bits

There are several application notes for different types of bootloaders.
At least you can use eboot.

> From what I can gather, I can use the eboot code from the egnite
>  website and flash it into lower flash. Then flash my code normally,
>  but disabling the flash erase first. Once done, the bootloader is in
>  lower flash and my code is in upper flash.  I cannot figure how to do

I don't understand why you want you bootloader in the lower flash. By
enabling the bootloader with the fuse bits, the bootloader will be
executed always first and has to decide if it loads a new application or
jumps into the existing code.

So you can easily use an I/O pin or a value in the eeprom to check if
you want to upgrade you application.

> 1. Write a resident loader and the needed functionality to receive the
>  new software, and write it (somehow) into flash memory.  

That's exactly what you'll have to do. Write it into the AVR bootloader
section. Write your own code or reuse eboot.




Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 

More information about the En-Nut-Discussion mailing list