(→Building a user model with a specific toolchain) |
|||
(9 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
== Cross Compilation for SAFplus == | == Cross Compilation for SAFplus == | ||
− | === | + | === Create toolchain === |
− | * Download | + | * Download or build your own toolchain for a target platform: |
− | + | : A toolchain can be downloaded at http://www.mentor.com/embedded-software/codesourcery. | |
+ | : Tools to generate cross-compilation toolchain: | ||
: http://crosstool-ng.org/ | : http://crosstool-ng.org/ | ||
: http://buildroot.uclibc.org/ | : http://buildroot.uclibc.org/ | ||
− | * | + | * Configure the toolchain: |
− | + | : In your toolchain location, check if the config.mk file exists. 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 | ||
Line 16: | Line 17: | ||
export ARCH MACH TARGET TOOLCHAIN_VERSION | export ARCH MACH TARGET TOOLCHAIN_VERSION | ||
− | === | + | === Building the prerequisite SAPlus 3rdparty libraries for a target platform === |
− | * Export your configuration | + | * Export your configuration toolchain |
$source <location of toolchain>/config.mk | $source <location of toolchain>/config.mk | ||
* Goto <SAFplus SDK dir>/src/SAFplus/3rdparty/base: | * Goto <SAFplus SDK dir>/src/SAFplus/3rdparty/base: | ||
$make PREFIX=<path to locate thirdparty libraries> | $make PREFIX=<path to locate thirdparty libraries> | ||
− | Prefer using the location of toolchain. | + | :'''Prefer using the location of toolchain.''' |
− | + | ||
− | === | + | === Building SAFplus libraries with a specific toolchain === |
* Configure SAFplus libraries | * Configure SAFplus libraries | ||
− | $<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your | + | $<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your toolchain name> |
− | * Goto asp/build/< | + | * Goto asp/build/<toolchain name> |
$make asp-libs | $make asp-libs | ||
− | === | + | === Building a user model with a specific toolchain === |
− | * Goto model project | + | * Goto model project folder |
− | $<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> | + | $<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-cross-build=<your toolchain name> --with-model-name=<model> |
− | * Goto asp/build/< | + | * Goto asp/build/<toolchain name> |
$make | $make |
Latest revision as of 01:12, 26 September 2012
Contents |
[edit] Cross Compilation for SAFplus
[edit] Create toolchain
- Download or build your own toolchain for a target platform:
- A toolchain can be downloaded at http://www.mentor.com/embedded-software/codesourcery.
- Tools to generate cross-compilation toolchain:
- http://crosstool-ng.org/
- http://buildroot.uclibc.org/
- Configure the toolchain:
- In your toolchain location, check if the config.mk file exists. 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
[edit] Building the prerequisite SAPlus 3rdparty libraries for a target platform
- Export your configuration toolchain
$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.
[edit] Building SAFplus libraries with a specific toolchain
- Configure SAFplus libraries
$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-safplus-build --with-cross-build=<your toolchain name>
- Goto asp/build/<toolchain name>
$make asp-libs
[edit] Building a user model with a specific toolchain
- Goto model project folder
$<SAFplus SDK dir>/src/SAFplus/configure --with-sdk-dir=<SAFplus SDK dir> --with-cross-build=<your toolchain name> --with-model-name=<model>
- Goto asp/build/<toolchain name>
$make