How-To Setup Eclipse and WinAVR, Part 1

How-To Setup Eclipse and WinAVR

Part 1

In this series of articles, I am going to show you how to setup an AVR development environment. In future articles we will make changes to Eclipse, compile and build code, simulate the code, and finally download it into the Chibots Controller ver. 2.4.3. I have to thank Eddy Wright for this great AVR board. It can be used for many different projects including robots. Plus this board is cheaper than a Basic Stamp with more horsepower. Did I mention you can use interrupts? So you can see we will be doing all the standard development tasks in these articles.

Why did I choose Eclipse? I wanted a consistent user interface for my IDE. Since I use a few different microcontrollers, I didn't want to learn the in's and out's of several IDE's. Eclipse has a few other features that I like. Specifically I like the project management and plugin capabilities of Eclipse. I know some people think Eclipse is slow, others don't like that it is built from Java. Don't let this scare you off, or keep you from at least trying it out. Eclipse is a decent IDE to use, and several embedded tool vendors are now supporting it.

Downloading...

This is geared towards Windows XP/Vista. If you use Mac OS X, the August 2008 issue of Servo Magazine shows you how to setup the same environment. The section "Ask Mr. Roboto", by Dennis Clark, walks you through what you need to know about the setup. You can then follow along with my later articles. As for the Linux folk out there, you'll have to search the web for using Eclipse and AVR-GCC. I do not know enough about it to help, except to mention there are tons of resources on the web.

So let's get started. You'll need to check if you have a Java virtual machine installed on your computer. This can be done by checking "Add/Remove Programs" in Control Panel. If you don't have Java installed, you'll have to download it from www.java.com.

Once you have downloaded Java, launch the installer and follow the on screen instructions.

Now you can either install Eclipse or WinAVR next. I'm going to start with Eclipse. Goto www.eclipse.org to download the C/C++ version of Eclipse. This makes it easier in the long run, and is a smaller download.

Click on "Download Eclipse". You'll be taken to the next screen.

Select "Eclipse IDE for C/C++ Developers(68 MB)". This is a stripped down version of Eclipse. It does not have all the Java developer tools. It does however have the CDT plug in already included. If you want you could get Eclipse Classic, but you would still need to install the CDT plug in.

Now that you have Eclipse, all you have to do is extract the zip file to a folder of your choosing. Eclipse does not install in the normal sense, it does not mess with the Windows registry. I would suggest add a short cut of the eclipse.exe to your desktop for easy use once it is installed.

Here we are at WinAVR. Just kidding. You can get WinAVR from winavr.sourceforge.net/. Goto the download link where you'll be taken to Sourceforge's download section.

Click on download to be take to the next screen. Now just click on the .exe file to start the download. The current version of WinAVR is 20080610.

Once you have that downloaded, again just click the installer and follow the on screen instructions. I recommend accepting the default install directory since other people have had issues if they changed it. At this point you could start to develop code for the AVR, but I would not suggest it. We are going to add a plug in that will help us by providing project management features to our environment in the next installment of the series.

So join me next time to finish up the Eclipse and WinAVR installation. From there we will begin our coding journey.

For everybody's information we have installed Java version 6 update 7, Eclipse 3.4, and WinAVR 20080610.

Tags: