Main »

Computers-hardware-arduino-manual Install Of Gcc Bintuils Avrlibc




manual upgrade of gcc binutils avrlibc on ubuntu 8.04LTS



trying to use:

Freeduino V1.16, with ATMEGA328
Color LCD & Joystick shield for Arduino (nokia 6610)
arduino IDE v17 .. should work on v11
ubuntu 8.04LTS

tried to verify/compile/ a test of the nokia lcd sheild for a freedurino 328 and got the error:

‘atmega328p’ supported for assembler only

doing a google search turned up that it might be a gcc issue needing to be v4.2.3 or up

avr-gcc --version

ubuntu 8.04 is down rev from what we need, so we install a newer version of gcc

sudo su -

need some pre req first:

apt-get install libgmp3-dev libmpfr-dev

now the newer gcc:

cd /usr/src/
mkdir gcc
cd gcc
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.3.3/gcc-4.3.3.tar.gz
tar xjf gcc-4.3.3.tar.gz
cd gcc-4.3.3
mkdir obj
cd obj
../configure --prefix=/usr/local --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp
make
make install

exit out of su

avr-gcc --version

should now give us the newer gcc version

for an updated binutils

mkdir /usr/src/binutils
cd /usr/src/binutils
wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.tar.gz
tar xzvf binutils-2.20.tar.gz
cd binutils-2.20
./configure --prefix=/usr/local --target=avr
make
make install

check the install went well

avr-as --version

get avr-libc: http://www.nongnu.org/avr-libc/

mkdir /usr/src/avr-libc
cd /usr/src/avr-libc
wget http://download.savannah.gnu.org/releases-noredirect/avr-libc/avr-libc-1.6.7.tar.bz2
tar xvjf avr-libc-1.6.7.tar.bz2
cd avr-libc-1.6.7
./configure --host=avr --prefix=/usr/local
make
make install

check by re verify/compile/ nokia test program with board chosen

arduion mega328

... life is good











recently patched my system using apt-get and it replaced the version of gcc that is needed by the arduino ide

avr-gcc --version
cd /usr/src/avr-gcc/gcc-4.3.3/obj
../configure --prefix=/usr/local --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp
make
make install
avr-gcc --version
still reporting old version, but it's the new version and arduino ide works again.

note that binutils is now showing down rev but seems to work ok.

top level subjects:

Page last modified on October 29, 2009, at 01:08 AM

^