Figure 3. Use gunzip.
Figure 4. Uncompress the Eclipse install.
configure a tool in Eclipse to also program your
AVRs using avrdude. Eclipse is a very handy tool
for a developer.
Eclipse comes in a lot of flavors for a lot of
different programming languages, from java to
pgp. We only want the C/C++ environment; just
getting the CDT environment means a leaner
program that will run faster, and will definitely
download quicker. Go to www.eclipse.org/
downloads and scroll down looking for Eclipse
IDE for C/C++ Developers. When you find it, click
on the Linux 32bit link to the right of the
description (Figure 2). This link will take you to
the actual download page. Click on the Download
arrow and wait for it to come in. Firefox (as
configured on my Ubuntu OS) put the download
file in /tmp/eclipse-cpp-galileo-SR1-linux-gtk.tar.gz.
Firefox may want to open the file in a tool that will
uncompress it. Don’t let it do that! We’re going
to put Eclipse where we want it. This file will
dump it into /tmp if you just gunzip it, so simply
save the file and we’ll deal with it later.
Okay, now you have it, but it is in a tarred
and gzipped file. It’s not as pretty as getting an
apt-get package, but apt-get wanted to download
a fully loaded Java IDE with a bunch of things in it
we didn’t need or want for AVR development, so
I went right to the Eclipse project to get an
install. We can’t run anything as a zip file, and
we certainly don’t want it in /tmp, so we’re
going to move the file and uncompress it in
/usr/local/eclipse. First, gunzip the file in
/tmp by typing cd /tmp gunzip eclipse-
cpp-galileo-SR2-linux-gtk.tar.gz (Figure 3).
Now we just have a tar file. Let’s
create the directory we want Eclipse to
live in. Type sudo mkdir
/usr/local/eclipse. This will create our
Eclipse directory. Now type sudo mv
/usr/local/eclipse. This command moves
our tar file to our desired final location
where we will uncompress it and create
our Eclipse environment. Type cd /usr/
local/eclipse sudo tar xf eclipse-cpp-
galileo-SR2-linux-gtk.tar (Figure 4).
Congratulations! You now have
avr-gcc and Eclipse installed. But wait!
There’s more! You will want Eclipse to
know where your avr-gcc compiler is and
how to do AVR-type cool stuff. To do that, you
will need the Eclipse AVR plugin. We can get this
plugin directly from inside the Eclipse IDE. On to
the next step ...
Step Three: Get the Eclipse AVR
This plugin handles all of the tedium of finding
the compiler, deciding what compiler switches to
use, and — most importantly — building the makefiles
that build your AVR projects so you don’t have to.
Like everything else we’ve gotten so far, this too is
an open source project. The first thing that we need
to do is find the plugin so that we can tell Eclipse
where to get it. Google helped me out with this task.
Here are the download and install directions:
This site is a little dated; we’re going to be
using Eclipse 3. 5 (Galileo) but while the text
around the software install process has changed a
little, it is still recognizable enough that we can
muddle through. If you have problems getting this
to install gracefully (like I did at first), you can
directly install the plugin as per the directions near
the bottom of the page. Either way, it isn’t too
difficult. I’m going to show you how to install the
plugin from within Eclipse.
In the upper left of your Ubuntu desktop, click
on Places; draw down to computer and open that.
Figure 5. Ta da! Eclipse!
SERVO 04.2010 15