Last Update : 2007/Feb/8
Cross Compiler
on
PS3Linux
Motivation
Preparation
Install
How to execute
Future
Thanks to
<< Return

    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.

    1. binutils-2.16.1.tar.gz

      To use latest snapshot as binutil-2.16.1 on 2007/Feb/07

    2. gcc.4.1.1.tar.gz

      To use latest snapshot as gcc 4.11 on 2007/Feb/07

    3. g++ 4.1.1.tar.gz

      To use latest snapshot as g++ 4.1.1 on 2007/Feb/07

    4. newlib

      To use latest snapshot as newlib 1.15.0 on 2007/Feb/07


  • Install

    root account is needed for all of installation work.

    1. binutils

      1. tar xvzf binutils-2.16.1.tar.gz
      2. ./configure --target=arm-elf --prefix=/usr/local/arm
      3. make install

    2. Extract newlib

      Extract newlib to /tmp directoy. make symblic-link for /usr/local/arm/include.

      1. newlib download from "ftp://sources.redhat.com/pub/newlib/index.html"
      2. cd /tmp
      3. tar xvzf newlib-1.15.0.tar.gz
      4. cd newlib-1.15.0
      5. ln -s /tmp/newlib-1.15.0/newlib/libc/include /usr/local/arm/include

    3. 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.

      1. Download gcc/g++ from "http://gcc.gnu.org"
      2. export PATH=$PATH:/usr/local/arm/bin
      3. cd /tmp
      4. tar xvzf gcc.4.1.1.tar.gz
      5. tar xvzf g++.4.1.1.tar.gz
      6. cd gcc-4.1.1
      7. ./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
      8. make
      9. make install

    4. The first turn of newlib making

      Make newlib is compiled which has no option libssp. Remove symblic-link before "make install".

      1. cd /tmp
      2. ./configure --target=arm-elf --prefix=/usr/local/arm/ --disable-ada --disable-libssp
      3. make
      4. rm /usr/local/arm/include
      5. make install

    5. 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".

      1. export PATH=$PATH:/usr/local/arm/bin
      2. mv gcc-4.1.1 gcc-4.1.1-1st
      3. tar xvzf gcc.4.1.1.tar.gz
      4. tar xvzf g++.4.1.1.tar.gz
      5. cd gcc-4.1.1
      6. ./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/
      7. make
      8. make uninstall
      9. make install

    6. Second turn of newlib making

      Make newlib with libssp enabled compiler as just made.

      1. mv newlib-1.15.0 newlib-1.15.0-1st
      2. tar xvzf newlib-1.15.0.tar.gz
      3. cd newlib-1.15.0
      4. ./configure --target=arm-elf --prefix=/usr/local/arm/
      5. make
      6. make uninstall
      7. make install


  • How to execute

    1. path setting

      In the last line .bash_profile .bash_profile

      export PATH="$PATH:/usr/local/arm/bin"

      is added

    2. Execute

      arm-elf-gcc [Enter]


  • Future

    1. Report with in acutal operation.


  • Thanks to

    Thanks to Mr.T.M and his contribution work.


Top of Page
e-mail to Yuichi ODA


Copyright (C) 1998 - 2008 TeamKNOx