C compiler for AVRmega

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

I have the STK500 and have been playing with it to get the LEDs to flash.
Now, I'm ready to start doing some real programming and I would prefer to
program in C.

I've used the Imagecraft compiler for the HC11 in the past and thought very
highly of it. I've been contemplating buying the Imagecraft compiler for the
AVR series but I've seen good comments regarding the GNU compiler.

What are the trade-offs between the two? Is there a GUI for the GNU
compiler? Does it work with AVR Studio?



Re: C compiler for AVRmega
On Sat, 6 Sep 2003 19:55:57 -0400, "Douglas Rhodes"

Quoted text here. Click to load it

There's a GUI'd version of gcc called WinAVR. See links at

That's about all I know about it, though.

I've been using the ImageCraft AVR compiler for a while and I've been
pretty happy with it.

One nice benny with the latest release is that a license for the "tiny"
version of the Salvo RTOS is included. See http://www.pumpkininc.com /

Rich Webb   Norfolk, VA

Re: C compiler for AVRmega
Quoted text here. Click to load it
Yes it does. Real source-level debugging (im using the JTAG-ICE).
After configuring the make-file it works perfectly for me.

Greetings Klaus
Quoted text here. Click to load it

Re: C compiler for AVRmega
I work with WinAVR  - sort of GCC for Atmel AVR. There is a lot of libraries
for GCC in Internet.
The only requirement to GNU is the possibility to run 'make.exe' from inside
the editor. It may be, for example,  Crimson or UltraEdit. Some of my
coworkers use even MS Visual C studio. I really don't need AVRStudio for
that, but I saw application notes saying, that you can also use it.

Quoted text here. Click to load it

Re: C compiler for AVRmega
Quoted text here. Click to load it

I used the GNU WinAVR to port a scheduler to an AVR Mega323.  Generally I
found it to be very good.  Below are my comments.    If you want to play
around with the compiler you can download the makefile and source files for
the scheduler from http:\www.FreeRTOS.org.

+ As far as I can see AVR Studio 4 does not have the same facility to easily
compile from within the GUI (unlike previous versions).  This is not really
a problem as you probably have your own preferred GUI/build environment
anyway.  Or alternatively you can just use a command line version of make.

+ I used WinAVR to compile HEX files which downloaded via AVR Studio with no
problems at all.

+ I also used the simulator in WinAVR for basic debugging (I'm without ICE).
This required the use of a utility to convert the output into an COFF
format.  The utility version included with the latest WinAVR seems to work,
I don't recommend using any other version as I found they just truncated my
source files to 0 bytes.

+ The COFF conversion raised a few warning messages about certain variables
not having a type in the symbol table.  Looking though these they seemed to
be innocuous but annoying all the same.

+ Barring my last point below, the AVR Studio simulator worked really nicely
with the produced COFF file - even when debugging the RT scheduler context
switches and interrupts.

+ All the source files had to be in the same directory for the simulator to
be able to find them - without this I could only debug assembler.  This is
apparently because I was not using the newer extended COFF format which has
full path names (?).  I ended up using batch files to copy source files from
there true location into a single directory before compilation.

Hope this helps.  The zip file on the web site contains two batch files,
buildcoff and buildhex.  WinAVR comes with a sample makefile from which ELF,
COFF and HEX files can be created.  The zip files use the sample makefile
with practically no modification.



Re: C compiler for AVRmega

Quoted text here. Click to load it

As others mentioned, WinAVR exists. In terms of comparison, keep in mind that
the ImageCraft ICCAVR includes extra such as:
1 - free license to Salvo tiny RTOS (http://www.pumpkininc.com )
2 - AppBuilder for generating peripheral initialization code
3 - Code Browser for function breakdown
4 - builtin ISP support

Good luck in deciding.

// richard

Re: C compiler for AVRmega
Does the Imagecraft compiler work with AVRStudio?


Quoted text here. Click to load it

Re: C compiler for AVRmega

Quoted text here. Click to load it

Of course, we were the 2nd compiler (after IAR) that offers source level
debugging w/ AVR Studio. You just open the .COF file.
// richard

Re: C compiler for AVRmega
Yes. I use the ImageCraft compiler and AVRStudio 4.07 with a JTAG ICE. The
source level debugging works quite well.

Llew Griffiths

Llew Griffiths & Associates Pty Limited
We've slightly trimmed the long signature. Click to see the full one.
Re: C compiler for AVRmega
Quoted text here. Click to load it

WinAVR 20030913 also contains two different ISP packages, avrdude and
uisp. avrdude can be configured by the user to add custom hardware or
a new AVR processor without having to rebuild the software.

And other OSes that work with WinAVR:

    AvrX is a Real-Time Multitasking Kernel.

EtherNut - Nut/OS
    Ethernut is an Open Source Hardware and Software Project for
    Embedded Ethernet Devices. It contains Nut/OS which is an
    simple RTOS for the ATmega128, which provides a minimum of
services to run
    Nut/Net, the TCP/IP stack.

    TinyOS is a component-based runtime environment designed to
    support for deeply embedded systems which require concurrency
    operations while constrained by minimal hardware resources.

    Contiki is an Internet-enabled operating system and desktop
    for a number of smallish systems.

And as Richard said, good luck in deciding.

Site Timeline