How To Generate MPC555 Cross Compiler Tools


ALERT! This HOWTO is OK with gcc v4.4.4

ALERT! Make sure the mpc555.ld file you use sets the following variables :
        SDA2_BASE_ = .; 
        just before *(.sdata2) section and 
        SDA_BASE_ = . ; 
        just before *(.sdata) section 

ALERT! Make sure these tools are installed on your system : bison, flex, m4, makeinfo (texinfo package), mpfr (libmpfr-dev package)

Information about building cross compiler

Packages to retrieve

Prepare the generation

  • Check that on your host a gcc compiler is installed
  • Set sh as shell (important to build gcc)
  • Set these variables :
    • Work directory : export CROSS_PRJ=$HOME/MyDirectoryForMPC555
    • Directory where cross compiler tools will be installed : export PREFIX=$CROSS_PRJ/tools
    • Set PATH variable : export PATH=${PREFIX}/bin:${PATH}

Package binutils

tar xvfz /DIRECTORYXX/binutils-2.20.1.tar.gz
mkdir build-binutils
cd build-binutils
../binutils-2.20.1/configure --target=powerpc-linux
make all
make install

Package GCC

tar xvfz /DIRECTORYXXX/gcc-4.4.4.tar.gz
mkdir build-gcc
cd build-gcc
../gcc-4.4.4/configure --target=powerpc-linux
make all-gcc
make install-gcc

Package newlib

tar xvfz /DIRECTORYXXX/newlib-1.18.0.tar.gz mkdir build-newlib cd build-newlib ../newlib-1.18.0/configure --target=powerpc-linux --prefix=$PREFIX make all make install

May be you will get an error because of makeinfo command.

To correct that, check where is your makeinfo command, edit Makefile and change line containing MAKEINFO = path-to-build-newlib/missing makeinfo

Test the crosscompiler

A way to check the powerpc-linux-gcc croscompiler is to launch : powerpc-linux-gcc --version

And check that the result is : 4.4.4

Retrieved from

-- SorayaArias - 06 Dec 2012
Topic revision: r3 - 31 Jul 2013, SorayaArias
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding SedWiki? Send feedback