Warning

You must install avr-binutils and make sure your path is set properly before installing avr-gcc.

The steps to build avr-gcc are essentially same as for binutils:

$ bunzip2 -c gcc-<version>.tar.bz2 | tar xf - $ cd gcc-<version> $ mkdir obj-avr $ cd obj-avr $ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ \ --disable-nls --disable-libssp --with-dwarf2 $ make $ make install

To save your self some download time, you can alternatively download only the gcc-core-<version>.tar.bz2 and gcc-c++-<version>.tar.bz2 parts of the gcc. Also, if you don't need C++ support, you only need the core part and should only enable the C language support. (Starting with GCC 4.7 releases, these split files are no longer available though.)

Note

Early versions of these tools did not support C++.

The stdc++ libs are not included with C++ for AVR due to the size limitations of the devices.