EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

ATMEGA / AVR GCC - newbie questions

Started by DanD November 17, 2004
I want to re-port an existing ATMEGA project that I did some time back
(in asm) to 'C' and would like to use the AVR GCC compiler. Can anyone
give me some basic steps to getting started?

Thanks for any help.
On Wed, 17 Nov 2004 21:46:12 GMT, DanD <kg0mm@arrl.net> wrote:

>I want to re-port an existing ATMEGA project that I did some time back >(in asm) to 'C' and would like to use the AVR GCC compiler. Can anyone >give me some basic steps to getting started?
Since you are apparently on a Windoze host, look up WinAVR. It's a completely packaged avr-gcc development system, with example makefile, chip programming software, debugger, etc. Very easy to get up and running. About a 13 MB download HTH, -=Dave -- Change is inevitable, progress is not.
"DanD" <kg0mm@arrl.net> wrote in message
news:9chnp057586oh2ev05htg70f2lar4g07n6@4ax.com...
> I want to re-port an existing ATMEGA project that I did some time back > (in asm) to 'C' and would like to use the AVR GCC compiler. Can anyone > give me some basic steps to getting started? > > Thanks for any help.
I have good experiences with Imagecraft's ICCAVR and AVRStudio with Atmel's JTAGICE. The standard version of the compiler is only $199. They have a time limited fully functional demo version. Jeroen
On the following page click on Related Pages on the left and in the
expanded list click on Installing the GNU tools:

	http://www.nongnu.org/avr-libc/user-manual/

Those are the instructions I used to install the gnu tools on my Unix
box.  I downloaded the latest gcc and binutils from ftp.gnu.org.

Another link I have is:

	http://users.rcn.com/rneswold/avr

It seems a bit outdated though when you try compiling his sample
program.

Another link which may be useful:

	http://www.openavr.org/
If it's just a small project < 4K you can use the free IAR compiler for the
AVR. It's limited to 4K. You can download it for free from IAR.

It also works very well with AVR studio and the JTAG ICE 2...




"DanD" <kg0mm@arrl.net> wrote in message
news:9chnp057586oh2ev05htg70f2lar4g07n6@4ax.com...
>I want to re-port an existing ATMEGA project that I did some time back > (in asm) to 'C' and would like to use the AVR GCC compiler. Can anyone > give me some basic steps to getting started? > > Thanks for any help.
get winavr from http://sourceforge.net/projects/winavr www.avrfreaks.com go to avrgcc page get the tutorials for avrgcc and how to set it up. Also the academy pages Alex
Thanks to everyone for their valuable input. I'm leaning toward using
the WIN-AVR compiler in conjunction with Atmel's AVR 4 Studio and
JTAGICE-2. There is still some confusion on my part concerning the
JTAGICE and ISP. It seems that the JTAGICE is not capable of
programming the ATMEGA and that it still requires an AVRISP (or
similar device) for programming. If this is true, it sure make for a
cumbersome development interface. I'm more used to having only one
programming/debug interface - ala Motorola (Freescale), Cygnal
(SiliconLabs), etc. Any thoughts?

Thanks,
Dan

"DanD" <kg0mm@arrl.net> wrote in message
news:uoapp0180nnf47fpfmbho2ujigc59iivf9@4ax.com...
> Thanks to everyone for their valuable input. I'm leaning toward using > the WIN-AVR compiler in conjunction with Atmel's AVR 4 Studio and > JTAGICE-2. There is still some confusion on my part concerning the > JTAGICE and ISP. It seems that the JTAGICE is not capable of > programming the ATMEGA and that it still requires an AVRISP (or > similar device) for programming. If this is true, it sure make for a > cumbersome development interface. I'm more used to having only one > programming/debug interface - ala Motorola (Freescale), Cygnal > (SiliconLabs), etc. Any thoughts? > > Thanks, > Dan >
Definitely you can program ATMEGA using JTAGICE (if you mean the JTAGICE from Atmel). You can also buy inexpensive DUO programmer/emulator, which would allow you use both JTAG and ISP programming plus JTAG debug. It is about $50. Look for it on avrfreaks.com I use WinAVR in conjunction with Programmers Notepad, which is included into the package. You can also use e.g 'Crimson Editor', which allows to run 'make' from inside the editor. It seems more convenient than AVRStudio. Good luck.

"Alexander Baranov" <baranov@intech21.com> skrev i meddelandet
news:8a22$419cbb2a$44a55b44$4743@msgid.meganewsservers.com...
> > "DanD" <kg0mm@arrl.net> wrote in message > news:uoapp0180nnf47fpfmbho2ujigc59iivf9@4ax.com... > > Thanks to everyone for their valuable input. I'm leaning toward using > > the WIN-AVR compiler in conjunction with Atmel's AVR 4 Studio and > > JTAGICE-2. There is still some confusion on my part concerning the > > JTAGICE and ISP. It seems that the JTAGICE is not capable of > > programming the ATMEGA and that it still requires an AVRISP (or > > similar device) for programming. If this is true, it sure make for a > > cumbersome development interface. I'm more used to having only one > > programming/debug interface - ala Motorola (Freescale), Cygnal > > (SiliconLabs), etc. Any thoughts? > > > > Thanks, > > Dan > > > Definitely you can program ATMEGA using JTAGICE (if you mean the JTAGICE > from Atmel). You can also buy inexpensive DUO programmer/emulator, which > would allow you use both JTAG and ISP programming plus JTAG debug. It is > about $50. Look for it on avrfreaks.com > I use WinAVR in conjunction with Programmers Notepad, which is included
into
> the package. You can also use e.g 'Crimson Editor', which allows to run > 'make' from inside the editor. It seems more convenient than AVRStudio. > Good luck.
The JTAGICE Mk II supports programming through JTAG and Debugwire. It does not support ISP except to handle the Debugwire enable fuse bits. Since you cannot set/clear all fuse/lock bits through Debugwire, you have to switch between the JTAGICE Mk II and an ISP cable. This is annoying at best, and the AVR Studio development team has a fix to allow ISP on the JTAGICE Mk II very high on their priority list. The only ATmega parts affected by this is really the ATmega48/88/168. The rest have JTAG or lack OCD completely. -- Best Regards Ulf at atmel dot com These comments are intended to be my own opinion and they may, or may not be shared by my employer, Atmel Sweden.

The 2024 Embedded Online Conference