The ARM processors are used in Modern mobile device such as mobile-phone, Nintendo GameBoyAdvance, DS. It is necessary a cross compiler for development such devices. This page mentions how to create an ARM cross compiler by PS3Linux environment.
-
Movtivation
Buliding and Intall ARM cross compiler
-
Preparation
Download necessary files for GCC installtion. Don't have to download gobjc, gcj.
- binutils-2.16.1.tar.gz
To use latest snapshot as binutil-2.16.1 on 2007/Feb/07
- gcc.4.1.1.tar.gz
To use latest snapshot as gcc 4.11 on 2007/Feb/07
- g++ 4.1.1.tar.gz
To use latest snapshot as g++ 4.1.1 on 2007/Feb/07
- newlib
To use latest snapshot as newlib 1.15.0 on 2007/Feb/07
-
Install
root account is needed for all of installation work.
- binutils
- tar xvzf binutils-2.16.1.tar.gz
- ./configure --target=arm-elf --prefix=/usr/local/arm
- make install
- Extract newlib
Extract newlib to /tmp directoy. make symblic-link for /usr/local/arm/include.
- newlib download from "ftp://sources.redhat.com/pub/newlib/index.html"
- cd /tmp
- tar xvzf newlib-1.15.0.tar.gz
- cd newlib-1.15.0
- ln -s /tmp/newlib-1.15.0/newlib/libc/include /usr/local/arm/include
- The first turn of gcc/g++ making
It will be linkage error with crt0.o by execute "configure" command with default installed libssp with enable. Therefore, we need make for ARM cross compiler without libssp.
- Download gcc/g++ from "http://gcc.gnu.org"
- export PATH=$PATH:/usr/local/arm/bin
cd /tmp
- tar xvzf gcc.4.1.1.tar.gz
- tar xvzf g++.4.1.1.tar.gz
- cd gcc-4.1.1
- ./configure --target=arm-elf --prefix=/usr/local/arm/
--enable-languages=c,c++ --with-cpu=arm7tdmi --with-newlib --with-headers=/tmp/newlib-1.15.0/newlib/libc/include/ --disable-ada --disable-libssp
- make
- make install
- The first turn of newlib making
Make newlib is compiled which has no option libssp.
Remove symblic-link before "make install".
- cd /tmp
- ./configure --target=arm-elf --prefix=/usr/local/arm/ --disable-ada --disable-libssp
- make
- rm /usr/local/arm/include
- make install
- Second turn of gcc/g++ making
Make libssp option enable compiler by libssp disable compiler. Uninstall 1st compiler (without opiton of libssp) before "make install".
- export PATH=$PATH:/usr/local/arm/bin
- mv gcc-4.1.1 gcc-4.1.1-1st
- tar xvzf gcc.4.1.1.tar.gz
- tar xvzf g++.4.1.1.tar.gz
- cd gcc-4.1.1
- ./configure --target=arm-elf --prefix=/usr/local/arm/ --enable-languages=c,c++ --with-cpu=arm7tdmi --with-newlib --with-headers=/tmp/newlib-1.15.0/newlib/libc/include/
- make
- make uninstall
- make install
- Second turn of newlib making
Make newlib with libssp enabled compiler as just made.
- mv newlib-1.15.0 newlib-1.15.0-1st
- tar xvzf newlib-1.15.0.tar.gz
- cd newlib-1.15.0
- ./configure --target=arm-elf --prefix=/usr/local/arm/
- make
- make uninstall
- make install
-
How to execute
- path setting
In the last line .bash_profile .bash_profile
export PATH="$PATH:/usr/local/arm/bin"
is added
- Execute
arm-elf-gcc [Enter]
-
Future
- Report with in acutal operation.
-
Thanks to
Thanks to Mr.T.M and his contribution work.
|