Guide to install avr-gcc 3.3 or 3.4 under linux

Author: Joerg Wolf jwolf -at-
Document origin:

No warranty and no support that this will work for every system.
But I succesfully compiled avr-gcc under linux with the following packages:


The packages should be compiled in the following order:
1. binutils for the system
2. binutils for AVR-target
3. gcc-core
4. libc
5. uisp

The first step is to install the new binutils for the linux gcc:
tar xvfj binutils-2.14.tar.bz2
cd binutils-2.14
make install

The next step is to install binutils again, but this time for AVR.
Everything will be installed to the target folder /usr/local/atmel

make distclean
./configure --prefix=/usr/local/atmel --target=avr --enable-languages=c --host=avr --disable-nls
make install
cd ..

Now the AVR-GCC can be compiled. The new avr-gcc is included in the original package from
No patches are required.

tar xvfj gcc-core-3.4-20040310.tar.bz2
cd gcc-3.4-20040310
./configure --prefix=/usr/local/atmel --target=avr --enable-languages=c --host=avr --disable-nls
make install

Now the AVR files should be renamed in order to avoid confusion if the system gcc and the avr-gcc
are both in the path.
cd /usr/local/atmel/bin
mv gcc avr-gcc
mv objcopy avr-objcopy
mv ar avr-ar
mv as avr-as
mv cpp avr-cpp
mv ranlib avr-ranlib

Before compiling avr-libc the following environment variables must be exported:
export CC=/usr/local/atmel/bin/avr-gcc
export AR=/usr/local/atmel/bin/avr-ar
export AS=/usr/local/atmel/bin/avr-as
export RANLIB=/usr/local/atmel/bin/avr-ranlib
export PREFIX=/usr/local/atmel

cd "download-folder"
tar xvfj avr-libc-1.0.3.tar.bz2
cd avr-libc-1.0.3
./domake install
cd ..

The last step, is to install the ISP-Programmer software.
I opened a new console, so there are none of the libc export variables around.
tar xvfj uisp-20040311.tar.bz2
cd uisp-20040311
./configure --prefix=/usr/local/atmel/
make install

Congratulations, you have succesfully compiled avr-gcc
I must admit it is a bit more work than WinAVR.