ARM7 GNU Toolchain
From Lochraster
Contents |
[edit] Prerequisites
For a complete ARM7 toolchain you will need:
[edit] Building the toolchain
[edit] binutils
% tar xjf binutils-2.18.tar.bz2 % cd binutils-2.18 % ./configure --prefix=/usr/local/arm --target=arm-elf --enable-interwork --enable-multilib [...] % make [...] % make install [...]
[edit] gcc
Attention: Extract newlib to some directory before, and specify that on the configure-call using "--with-build-sysroot=NEWLIB_DIR/newlib/libc/include"
% tar xjf gcc-core-4.1.2.tar.bz2 % cd gcc-4.1.2/ % mkdir arm-obj % cd arm-obj % ../configure --prefix=/usr/local/arm --target=arm-elf --enable-interwork --enable-multilib --enable-languages=c --with-newlib --without-ssp --disable-libssp --with-build-sysroot=NEWLIB_DIR/newlib/libc/include [...] % make [...] % make install [...]
[edit] newlib
file newlib-cflags_for_target.patch:
--- newlib/configure.host.orig 2007-09-19 01:50:01.000000000 +0200 +++ newlib/configure.host 2007-09-19 01:50:37.000000000 +0200 @@ -95,6 +95,7 @@ ;; arm) machine_dir=arm + newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED" ;; avr*) newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
% cd NEWLIB_DIR % ./configure --prefix=/usr/local/arm --target=arm-elf --enable-interwork --enable-multilib [...] % patch < ../newlib-cflags_for_target.patch patching file newlib/configure.host Hunk #1 succeeded. % make [...] % make install [...]
[edit] gdb
% tar xjf gdb-6.6.tar.bz2 % cd gdb-6.6 % ./configure --target=arm-elf --prefix=/usr/local/arm --enable-interwork --enable-multilib --with-gnu-ld --with-gnu-as [...] % make [...] % make install [...]