Thursday, February 08, 2007

Choosing an AVR C compiler

This blog is lacking in pictures. I need to fix that. Unfortunately, for this post, C compilers don't make good photo material...

Choosing a C compiler should be a trivial matter, right? Hobby project? Limited budget? WinAVR or the GCC/AVR toolchain under linux are the sane choices.

Unfortunately, at work, I am using the world's most expensive C compiler (IAR) for my AVR work (its over $2000 for a full version; a "free" version is limited to 4K of code) and I am more familiar with it than the GCC/AVR toolchain.

A couple of other vendors offer 2K code limited "free" versions and aren't too pricey, but we are still talking about over $500.

Then, there is Rowley Crossworks AVR.

Rowley comes with a 30-day evaluation and a "personal" edition costs $149. From what I can tell it is the full blown version, but you can't use it for non-hobby projects. And, it has some "migration" compatibility with IAR! Plus, it is supported under Linux as well as Windows.

But, why in the world would I pay for a compiler?

Let's look at the potential negatives and my answers to them:
  1. My source code won't be of use to those without the commercial compiler. True, but I am emphatically NOT trying to do a software project here. Binaries are royalty free and people will be able to "port" my code to GCC if they wish.
  2. There are more libs (and support) for GCC/AVR out there. Arguable. Besides, I am going with "lightweight" here. No external libs, no OS.
  3. No Emacs. Well, IAR supports external editors, but the other IDEs don't. I've been using emacs for 20+ years now... hard to give it up.
A big plus for a commercial IDE/compiler: JTAG support. Sure, I could use Atmel's free AVR studio with WinAVR to do this, but I am looking to spend less time hacking my development environment and more time hacking robots.

I'm currently evaluating the Rowley compiler.

No comments:

Post a Comment