Hi all, Lately I'm playing with an ATMEGA162 and AVRGCC / WinAVR. Does anyone know where I can find a C code fragment for writing to the Flash ROM? I just thought I'd ask before writing it myself. thanks, Al
Atmega AVRs - C code for self-programming Flash
Started by ●December 29, 2004
Reply by ●December 29, 20042004-12-29
Al Borowski wrote:> Hi all, > > Lately I'm playing with an ATMEGA162 and AVRGCC / WinAVR. Does anyone > know where I can find a C code fragment for writing to the Flash ROM? I > just thought I'd ask before writing it myself.There are the application notes with source code on this as I'm sure you've already read. As good as they are sometimes, perhaps you'll have some luck with the AVR butterfly source code. There is a boot loader and the main application. They use IAR's compiler, I believe. (There exists a port for GCC somewhere on the net, but porting between IAR and GCC isn't too hard.) Perhaps it's a good starting point? Brett> > thanks, > > Al
Reply by ●December 29, 20042004-12-29
On Wed, 29 Dec 2004 15:04:56 +1000, Al Borowski <al.borowski@EraseThis.gmail.com> wrote:>Lately I'm playing with an ATMEGA162 and AVRGCC / WinAVR. Does anyone >know where I can find a C code fragment for writing to the Flash ROM? I >just thought I'd ask before writing it myself.I use MegaLoad, its made for ICCAVR (i just compile with the ICCAVR demo , ad megaload is small enough for that) , but there should be a working port for AVRGCC. Have a look here (Authors page) , get the package with the PC .exe file there http://www.microsyl.com/megaload/megaload.html Talk about the GCC port (German ....) http://www.mikrocontroller.net/forum/read-2-46637.html The GCC Port http://www.mikrocontroller.net/attachment.php/46795/Megaload-winavr.zip Rgds Carsten
Reply by ●December 29, 20042004-12-29
Al Borowski wrote:> Lately I'm playing with an ATMEGA162 and AVRGCC / WinAVR. Does anyone > know where I can find a C code fragment for writing to the Flash ROM? I > just thought I'd ask before writing it myself.Maybe a look at the AVRGGC Header files boot.h and pgmspace.h helps a little bit. Additionally, the www.avrfreaks.com forum is very helpful. Regards, -- Bernhard Roessmann Don't Fear The Penguins!
Reply by ●December 31, 20042004-12-31