Difference between revisions of "Cross compiler"

(Making your own tool chain)
Line 1: Line 1:
 
 
== Cross Compilation for SAFplus ==
 
== Cross Compilation for SAFplus ==
  
Line 11: Line 10:
 
* Create toolchain configuration file config.mk.
 
* Create toolchain configuration file config.mk.
 
: This file is included in the cross build makefile. If your toolchain tarball does not include this file, please create it manually. Basically, the file contains the following configuration variables:
 
: This file is included in the cross build makefile. If your toolchain tarball does not include this file, please create it manually. Basically, the file contains the following configuration variables:
     ::ARCH=i386
+
     ARCH=i386
     ::MACH=i686
+
     MACH=i686
     ::TARGET=i686-unknown-linux-gnu
+
     TARGET=i686-unknown-linux-gnu
     ::TOOLCHAIN_VERSION=0.1
+
     TOOLCHAIN_VERSION=0.1
     ::export ARCH MACH TARGET TOOLCHAIN_VERSION
+
     export ARCH MACH TARGET TOOLCHAIN_VERSION
  
 
=== Making prerequisite SAPlus 3rdparty libraries for your toolchain ===
 
=== Making prerequisite SAPlus 3rdparty libraries for your toolchain ===
Line 26: Line 25:
 
    
 
    
 
=== Making SAFplus with your toolchain ===
 
=== Making SAFplus with your toolchain ===
 +
 +
* Configure SAFplus libraries
 +
  :$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your tool chain name>
 +
* Goto asp/build/<tool chain name>
 +
:$make asp-libs
 +
 +
=== Making model with your toolchain ===
 +
* Goto model project dir
 +
  :$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your tool chain name> --with-model-name=<model>
 +
* Goto asp/build/<tool chain name>
 +
:$make

Revision as of 02:15, 14 September 2012

Contents

Cross Compilation for SAFplus

Making your own tool chain

http://crosstool-ng.org/
http://buildroot.uclibc.org/
  • Create toolchain configuration file config.mk.
This file is included in the cross build makefile. If your toolchain tarball does not include this file, please create it manually. Basically, the file contains the following configuration variables:
   ARCH=i386
   MACH=i686
   TARGET=i686-unknown-linux-gnu
   TOOLCHAIN_VERSION=0.1
   export ARCH MACH TARGET TOOLCHAIN_VERSION

Making prerequisite SAPlus 3rdparty libraries for your toolchain

  • Export your configuration tool chain
$source <location of toolchain>/config.mk
  • Goto <SAFplus SDK dir>/src/SAFplus/3rdparty/base:
$make PREFIX=<path to locate thirdparty libraries>

Prefer using the location of toolchain.

Making SAFplus with your toolchain

  • Configure SAFplus libraries
  :$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your tool chain name>
  • Goto asp/build/<tool chain name>
$make asp-libs

Making model with your toolchain

  • Goto model project dir
  :$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your tool chain name> --with-model-name=<model>
  • Goto asp/build/<tool chain name>
$make