avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Experiences to build avr-toolchain using latest stable ve


From: Clemens Koller
Subject: [avr-gcc-list] Experiences to build avr-toolchain using latest stable versions.
Date: Tue, 29 Aug 2006 11:53:19 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hello!

Well, I am somehow new on this list, so let me just describe a little of what I 
do:
Goal: Embedded portable Framegrabber (embedded PowerPC, MPC8540, SATA, USB2.0, 
GbE, ...)
runs the avr-gcc toolchain to program a little ATmega168 for system monitoring 
functions.

So, hosts are: powerpc-unknown-linux-gnu gcc 3.4.4 (natively run on the embedded PPC :-)
i686-pc-linux-gnu gcc 4.0.3 (CRUX) a simple linux machine for cross-checking.

I was googling pretty much to get an overview of what's the current status
of a (stable) avr-gcc build. During the build I and ran into some problems
which I solved with some configuration tweaking.
There are already several instructions out there, but let me try to put that
in here for a conclusion or a current status:

1. binutils-2.17:
-----------------
wget http://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2
mkdir build
cd build
../binutils-2.17/configure --target=avr --prefix=/usr/local/atmel
make
su
make install

Comments:
No problems here.

2a. usually optional: gmp-4.2.1:
--------------------------------
I need GNU MP > 3 for gcc-4.1.1 (for the target=avr at least) because I run
into the following, when I try to compile gcc:

configure: In function 'main':
configure:2282: error: 'choke' undeclared (first use in this function)
configure:2282: error: (Each undeclared identifier is reported only once
configure:2282: error: for each function it appears in.)
configure:2282: error: expected ';' before 'me'
configure: failed program was:
#line 2277 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
#if __GNU_MP_VERSION < 3
choke me
#endif
; return 0; }

wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.1.tar.bz2
./configure
make
make check
make install
ldconfig

Comments:
No problems here.

2b. usually optional: mpfr-2.2.0:
---------------------------------
The Multiple Precision Floating-Point Reliable Library
needed also for gcc build.

wget http://www.mpfr.org/mpfr-current/mpfr-2.2.0.tar.gz
plus patches:
wget  http://www.mpfr.org/mpfr-current/patches
gives:
mpfr-2.2.0_mpfr-2.2.0-p1.diff
patch -N -Z -p1 < mpfr-2.2.0_mpfr-2.2.0-p1.diff

#./configure --with-gmp-build=../gmp-4.2.1
./configure
make
make check
make install
ldconfig

Comments:
make check fails if I configure it with --with-gmp-build=...
so, remove it.

2c. gcc-core-4.1.1 and gcc-g++-4.1.1:
------------------------------------
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.1.1/gcc-core-4.1.1.tar.bz2
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.1.1/gcc-g++-4.1.1.tar.bz2

export PATH=/usr/local/atmel/bin:$PATH
mkdir gcc-build
cd gcc-build
../gcc-4.1.1/configure  --target=avr \
                       --prefix=/usr/local/atmel \
                       --enable-languages=c,c++ \
                       --disable-libssp \
                       --enable-__cxa_atexit \
                       --enable-clocale=gnu \
                       --disable-nls
make
make check
su
export PATH=/usr/local/atmel/bin:$PATH
make install

Comments (and quotes from some mailing list):
dependencies (at least): gmp-4.2.1, mpfr-2.2.0
"libssp is not supported under AVR anyway, so please configure with
--disable-libssp. If it were supported, you'd need to bootstrap the
entire system by first compiling just the compiler with --disable-libssp,
install it, compile the target library, and then reconfigure for
libssp, ..." (I didn't test that yet)
"--with-dwarf2 is broken!"

3a. avr-libc-1.4.4:
-------------------

wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.4.4.tar.bz2
./configure --build=`./config.guess` --host=avr --prefix=/usr/local/atmel
make
make install

Comment:
No problems here.

3b. optional: avr-libc-manpages-1.4.4:
--------------------------------------
wget 
http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-1.4.4.tar.bz2
follow the README

Comments:
No problems here.

4a. uisp-20050207:
------------------
wget http://download.savannah.nongnu.org/releases/uisp/uisp-20050207.tar.gz
./configure
make
make install

Comments:
Remove /usr/local/atmel from PATH when building it! :-)
No problems here.

4b. avrdude-5.1:
----------------
wget http://download.savannah.gnu.org/releases/avrdude/avrdude-5.1.tar.gz
./configure --prefix=/usr/local/atmel
make
make install

Comments:
No problems here.

----------------------------------------------- fine -------------------------

Feel free to add comments, so I can update the above as needed and post it from
time to time if you wish.

Are there any plans to fix dwarf2 in the future?
For more information, see:
This is PR 26504:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504


Best greets,
--
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19




reply via email to

[Prev in Thread] Current Thread [Next in Thread]