AVR Compiler Recommendations

May 09, 2006 49 Replies

We've picked an AVR for a small task in a project, haven't used one before.



I'm looking for any and all recommendations for and/or against the C compilers available from various sources. We'll be using Atmel's Debug Wire debugger.



All input appreciated.


Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://c-faq.com/ comp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html

I'm using the AVR compiler for my project and it is ok. But some times it behaves very odd , like you just do some changes in data section and you will start getting errors from Mr. compiler. Of course it does not happen all the time except sometimes, anyhow I would still recommend to use this complier. There is another very powerful compiler from Keil

formatting link
] and yet another popular compiler from CodeVision [
formatting link
] with cute IDE. To me choosing a compile is very personal choice though the benefits you can get from AVR compiler are very strong. Yeah you can find very active forums here
formatting link
] to discuss any problem during your project development.

Regards, ali

Try WinAVR, it's cool and free

formatting link

Regards GM

Jack, our compiler is fully functional for 45 days, and 4K code limited for non-commercial use afterward so it's easy for you to do evaluation. We have different versions for different needs. Please feel free to contact me if you have any questions.

I agree with Richard. The Imagecraft compiler does its job and is easy to use. And its good value for money and the support is good.

Meindert (no attachments with ImageCraft, just a happy user for some years now).

Oops just noticed that i didn't mention the name of complier in my previous post. I would vote for winAvr

formatting link

What benefits does it have over winavr gcc and what is the cost? We use atmel for alot of stuff, mainly ATMEGA8L chips.

The winavr gcc setup is the best. Alot of people have mentioned problems with older versions that are now gone so make sure to get the latest version. Just make sure to turn on optimisation... for some reason it defaults to off. My code size reduce to 20% with no noticable speed drop o_O

The benefits of ImageCraft's compiler compared to winavr are ease of use, especially for relative newbies, although for more experienced developers, some of the "ease of use" features are actually a hindrance. The cost (prices on ImageCraft website, or from Richard) is pretty negligible for professional users. ImageCraft are also renowned for the quality of their support (like avr-gcc, your questions are answered by the people who wrote the compiler - without fighting through support 'bots checking your licensing and your tool versions). However, it can't compete with avr-gcc on compiler features or optimisation.

winavr gives you a pretty complete development kit "out of the box", as does ImageCraft. ImageCraft's is more integrated, which can be a good thing or a bad thing depending on your tastes.

One big difference in the compilers is how they deal with data in flash. Avr-gcc uses standards-compliant but ugly "progmem" macros, while ImageCraft's compiler abuses the "const" keyword. This means that ImageCraft's compiler, for the most part, does what people expect and intend - but fails on some perfectly legitimate code (such as casting to const).

I use avr-gcc myself for most newer projects (actually, I use msp430's more than avr - also supported by both gcc and ImageCraft), but I've a couple of older projects with ImageCraft, and I'd recommend both of them, depending on the user. Both are free to download and try out with real code.

I can remommend the Pascal compiler from ELab:

formatting link
The programmer is included in the set and a quick replying forum is also there.

Rene

Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net

And it compiles C?

;)

Grant Edwards grante Yow! I feel... JUGULAR... at visi.com

No. It doesn't. Pascal has its advantages for sparse programmers, who only spend a few days a month programming.

Rene

Agreed. I've used Pascal for embedded systems work, and in many respects I think it's better than C.

I was just pointing out that the OP had specifically requested recommendations for a C compiler.

Grant Edwards grante Yow! Here I am at the flea at market but nobody is buying visi.com my urine sample bottles...

I used WinAVR (GCC port) for my first AVR project at work. It worked well, with no compiler bugs found. A bit awkward storing ascii strings in FLASH though. I was impressed with WinAVR and you can't beat the price.

Eventually we had a serious need for agressive optimizations in order to cram as many features as possible into the AVR. We chose IAR C compiler. It was pricey at about $2000. Worth every penny. Code was crunched down by roughly 30%. The IAR environment, integration with Atmel ICE MKII, and ease of use (EE was a snap!) was top notch.

Only drawback is IAR has an iron fist regarding protecting their property. Required a dongle, and took a week to get the code to enable the dongle. The alternative to a dongle is to tie the compiler to a hard drive serial number. If hard drive crashed, you'd be in bad shape. Loose the dongle and you're hin bad shape. Can't resell IAR due to license restrictions.

Given all the alternatives, I'd pick IAR in a heartbeat.

In article , Jack Klein writes

Have a look at the IAR compiler. They do various and an eval version. You also get C++

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

In article , dungaree writes

or node lock or floating license just like any serious compiler.

or 24 hours for the rest of us. However it does come with a 30 quick start key so you don't even need to be online for a month to register.

that can be done and is by many compilers. That is node locking

Not at all. IAR are quite helpful in this case.

Nope. Wrong again. You put in an insurance claim the same as you would if you loose a PC, company car or any other hardware.

Are you sure? I have seen IAR compilers moved from one company to another.

Given that virtually all compilers have protection it is not really an issue so you need to look at the other aspects to decide.

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Rowley CrossWorks is now available for the AVR. I haven't tried it, but their MSP430 tools are excellent.

Leon

Nonsense. Rowley and GCC are both "serious compilers".

Huh? That's the first time I've ever heard anybody claim that.

Guaranteed support.

Grant Edwards grante Yow! UH-OH!! We're out at of AUTOMOBILE PARTS and visi.com RUBBER GOODS!

Apparently CrossWorks for ARM uses GCC. Not the case for AVR, however.

CrossWorks for AVR does use LibUsb-WIN32 (which has an LGPL license) to communicate with the JTAGICE-MkII. Rowley provides a link to download the source for all GPL tools on their web site

formatting link

Regards, -=Dave

Change is inevitable, progress is not.

:-) It is amazing waht you don't know you don't know.

Exactly. that is why you buy tools.

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required