Software Tools

Software, Languages, and Tools

This time we are going to look at some of the software, languages, and programming tools for the AVR. This will finish up my overview on the AVR. My next series of articles will be on the new robot brain board that I plan to design and build. The board I am designing will be for Mini Sumo, but could be used for other projects.

Atmel

Atmel again you say, ha! When it comes to AVR development, everything starts with Atmel. Atmel provides a nice tool called AVR Studio. AVR Studio is the IDE (integrated development environment) you use for assembly language and higher level programming. What is nice about AVR Studio is all the features you get with it. An example would be simulation. Write your code, run the simulator, and watch the bits toggle. You can even change the I/O bits to simulate external devices connected to the AVR. One of the features of AVR Studio is that it will link with WinAVR (a toolchain for compiling C/C++ programs). This information has changed somewhat recently. With AVR Studio version 4 and before, you had to install WinAVR separately. Now with Atmel releasing AVR Studio 5, WinAVR is part of the software.

Basic

Where AVR Studio is a tool for coding and testing your program, BASIC is a language. There are a few options when programming in BASIC, and the options come with a nice IDE similar to AVR Studio. I am only going to talk a little bit about two choices, but just do a search and you’ll turn up several options.

BASCOM from MSC Electronics is one of the most popular choices for programming AVRs’ in BASIC. You get a good development environment, with the ability to download your code from within the tool. BASCOM comes in a free 4K code limited edition, and the full tool for $120 US. Download the demo and give BASCOM a try.

mikroBasic from Mikro Elektronika also has a BASIC compiler (yes compiler not interpreter) for the AVR. Again, Mikro provides a full IDE for developing your code. Mikro provides a free 2K code limited version along with a $149 US paid full version. I have not heard much about this program, so I would suggest you do some research before purchasing.

C

When you get to the C programming language you have many more choices. You can go completely free to full professional with the price tag to match. We are going to work our way from cheap (not because of features) to expensive.

WinAVR

WinAVR is the defacto standard when you are talking free C compilers. WinAVR is based on AVR-GCC, which both are based off the GNU compiler toolchain. For Windows PC users you’ll be using WinAVR, while for Mac OS X or Linux it will be AVR-GCC. Don’t worry, they are the same. WinAVR and the rest of the tools are just packaged into a nice Windows installer. There is tons of information out there on WinAVR. Take a look at the WinAVR web site, then hop on over to AVR Freaks for more info.

Here is a short blurb on WinAVR. Programmer’s Notepad comes bundled with WinAVR. PN is a simple IDE for programming in different languages. Again with Atmel including WinAVR in their latest version of AVR Studio, you don’t even need download anything else.

Make Hack Void

Since WinAVR was picked up by Atmel, another group of programmers decided to take on building a toolchain like WinAVR. Make Hack Void is a web site that releases a replacement for WinAVR. They call their tool MHV AVR. I am in the process of testing it to see if it is a good replacement.

Arduino

Another free option that I know of is Arduino. Arduino is hardware, but they also provide free software for programming the Arduino. Arduino is also the programming environment. Arduino is based on Wiring (which itself is based on Processing) which is a simplified C/C++ IDE. It was designed for people without prior microcontroller programming experience. Take a look at the Arduino web site for more information.

Low cost C compilers are not low-cost because they lack features. For the most part the only real difference between high cost professional compilers and the low-cost version is code density. The pro packages can optimize the code better. Dense code does hurt you in the debugging stage as your lines of C code don’t match up to the assembly language listing.

Imagecraft

Imagecraft makes a nice low-cost C compiler that compares well with the more expensive options. Imagecraft’s product is ICCAVR.  The IDE is full featured including an applications building tool. The only thing is the interface looks like it came out of the Windows 16-bit days. The interface is slated for an overhaul in the near future. They have a fully working demo for 45 days. After the 45 day demo period, the program is reduced to 4K code limit. You can also purchase a non-commercial license for $49, and full-blown license for $249. Take a look at their website, as they offer compilers for different microcontrollers.

Mikro Elektronika

Mikro Elektronika also provides a low-cost solution for programming AVRs’ in C. Again, this tool provides a full development environment. The interface looks current and seems to have many project management features. I will say I have no experience with this compiler as of yet, but I have downloaded the full functional (but code limited) demo and intend to try it.

CodeVision

CodeVision is another choice in the low-cost arena. This compiler I do not know much about. They have light and standard versions that range from $127 to $211 US. In this case I will say use at your own risk. The IDE looks nice, but I know nothing about its features. It looks as though it is only a little more advanced than Programmer’s Notepad.

When we get into the professional packages, the pricing really jumps. Now you’ll be spending several thousands of dollars to purchase and several hundred dollars in maintenance fees. Since this is way out of the range of most hobbyists, I am just going to drop names. If you want to take a look, check out their web sites. The big name in AVR development is IAR.  Take a look and see what you think.

C++

It is possible to program the AVR in C++. C++ will take up more code space, but if you are careful it can be done. I am not going to do a full write up as before since most of the tools are the same. Free software again is WinAVR, MHV AVR, and Arduino. They allow C++ programming. Arduino does have some built-in functions that do make life a little easier. As for pro packages, look at IAR. I am not sure if other vendors do C++, but as I always say “just look at their website”.

Finally…

We made it to the end. As you can see there is more information out there than I can fit into a blog. There were a few things I left out of this last article. There are a few free IDEs that I forgot to mention. The one that I use is Eclipse. I plan to show you how to set up a free development environment using Eclipse in a later series of articles. I will add other tools to my Eclipse installation that will make it look and act like a professional package costing thousands of dollars – all free!

So see you next time when we start designing a new brain for my robot.