AVR Development using Eclipse

Eclipse

I’ve just today set up and started using Eclipse as an IDE for AVR development. I got here in a rather roundabout way. My current project is a tetris-like game played on a 3595 lcd screen. I’m having a bit of trouble with the scalability of the playing area and needed to do some debugging. I installed avarice and avr-gdb and did a bit of debug-wire work with those for the first time, but I wanted a way to tie everything together. It seems that eclipse will allow me to code, build, program, debug code, and hardware debug all in one. First thing is first though, I needed to get eclipse installed and running.

Trial and Error I use Ubuntu 8.10 Intrepid Ibex and Eclipse is in the repositories, yay!! An hour and a half of downloads later I can’t get the AVR-eclipse plugin to work. Great.

Well, come to find out that Ubuntu has Eclipse version 3.2.2 in the repository and the AVR plugin needs a minimum of 3.3 installed. Fortunately eclipse comes as a java package, requiring no compiling. In fact, I don’t think you even need administrative privileges to install it.

Go download the Eclipse IDE for C/C++ developers here: http://www.eclipse.org/downloads/

Unpack it, I just put the eclipse folder from the tar package in my home directory. To run it just go into that directory and type: ./eclipse

We will need to AVR plugin for eclipse. To install it go to Help –> Software Updates. Click the available software tab, click add site and put in this url: http://avr-eclipse.sourceforge.net/updatesite/

In the window to the left expand the tree next to the url you just entered. Check the box next to AVR Eclipse Plugin and click Install to the right.

The plugin will download and install and then you will be prompted to restart eclipse, do so. Once you are back in use the AVR plugin help file to get things going. Find this by going to Help –> Help Contents –> AVR Plugin –> Getting Started.

Following that guide for about 5 minutes I was able to code, build, and program an app that flashed 6 leds in sequence on my development board (Dragon Rider 500) using a mega168 (what I already had sitting in the board. I’m asking my self why I didn’t start using this method much sooner.

There is a pretty good wiki regarding this AVR plugin: http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin

I’m going to look into on-chip debugging using eclipse along with avarice and avr-gdb. Check back for more on that.

essential