Atmega AVRs - C code for self-programming Flash
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Atmega AVRs - C code for self-programming Flash

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Al Borowski
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Atmega AVRs - C code for self-programming Flash Reply with quote

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
Back to top
Brett Foster
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Re: Atmega AVRs - C code for self-programming Flash Reply with quote

Al Borowski wrote:
Quote:
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

Quote:

thanks,

Al
Back to top
Carsten
Guest





Posted: Wed Dec 29, 2004 1:57 pm    Post subject: Re: Atmega AVRs - C code for self-programming Flash Reply with quote

On Wed, 29 Dec 2004 15:04:56 +1000, Al Borowski
<al.borowski@EraseThis.gmail.com> wrote:

Quote:
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
Back to top
Bernhard Roessmann
Guest





Posted: Thu Dec 30, 2004 1:34 am    Post subject: Re: Atmega AVRs - C code for self-programming Flash Reply with quote

Al Borowski wrote:
Quote:
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!
Back to top
Al Borowski
Guest





Posted: Fri Dec 31, 2004 7:56 am    Post subject: Re: Atmega AVRs - C code for self-programming Flash Reply with quote

Hi,

Thanks for the pointers everyone. I ended up just writing the thing from
scratch - it wasn't too hard, although I hate the AVRs programming
scheme :-)

Al
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB