[En-Nut-Discussion] Fwd: RE: Reprogramming
Allister G. Mannion
Allister at amannion.com
Mon Jan 25 16:32:45 CET 2010
Hi Ole,
I have a similar requirement (might be the same as Peter's) where I want
to keep the eboot code as part of my 'firmware'. At the moment I load
(flash) it as a standalone, then flash my code (without the erase cycle)
which always gets executed first. The reason I want the 'eboot' code
there is so I can jump to it to tftp a new version of my firmware.
This seems to work great, but it's a bit messy on the initial install.
I'd like to include the eboot code as part of my firmware (with some
sort of 'absolute' directive so it gets flashed at the top of core) so
when initially installing I don't have to do the double flash mentioned
above.
Does this make sense? The requirement is (in normal circumstances) to be
able to upgrade the firmware using tftp/bootp over the net.
Regards,
Allister
On Mon, 2010-01-25 at 15:25 +0100, Ole Reinhardt wrote:
> 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
> accordingly.
>
> 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.
>
> Bye,
>
> Ole
>
Allister Mannion
ΠΟωaττ - saving more than you think
+41 79 7591554
www.nowatt.com
More information about the En-Nut-Discussion
mailing list