Building the SDK - adapteva/epiphany-sdk GitHub Wiki

This page acts as a short guide on how to build the SDK using the provided build scripts.

Please note: Your source directory, build and work directories must not have spaces in their names. This is due to a limitation of the GNU Autotools.


Installing Prerequisites

Before building the SDK, please make sure you have the required prerequisites installed. These are listed separately for Linux, Windows and Mac OS X.


The short version

This section instructs how to build the latest stable SDK release. It assumes the prerequisites are already installed. The process requires at least 9 GB available disk space.

Download the SDK build scripts

This is a repeat of the process explained in Downloading the SDK, made specific to the current 2016.11 branch.

mkdir buildroot && cd buildroot
git clone --branch 2016.11 https://github.com/adapteva/epiphany-sdk.git sdk

Cross compiling for ARM (Parallella) on a x86_64 host

./sdk/build-epiphany-sdk.sh -C -c arm-linux-gnueabihf

This will build the toolchain for ARM, and Epiphany host libraries for ARM.

You might need to adjust arm-linux-gnueabihf to match your cross compiler.

Building for Intel x86_64 (on x86_64)

./sdk/build-epiphany-sdk.sh -C

This will build the toolchain for x86_64, and the Epiphany host libraries for ARM.

Building on the Parallella for ARM

    ./sdk/build-epiphany-sdk.sh -C

This will build the toolchain for ARM, and the Epiphany host libraries for ARM.

Building on the Parallella is slow and can take several hours. This depends a lot on your uSD-card.


Checking out source

Firstly, the source code of the SDK must be downloaded, as demonstrated in Downloading the SDK.

To simplify things you should store the directory into which you downloaded the sources in a variable.

export EPIPHANY_BUILD_HOME="/path/to/download_directory"

Where '/path/to/download_directory' is the absolute path to the directory containing the downloaded SDK tree.

Building the SDK

To build the SDK use the build-epiphany-sdk.sh script.

cd $EPIPHANY_BUILD_HOME
sdk/build-epiphany-sdk.sh

Once begun, a successful build will end with the following message:

 **************************************************
 The build is complete.
 The tools have been installed at: /usr/local/bin
 Please ensure that this directory is in your PATH.
 **************************************************

Adding the SDK to your PATH

export PATH=${EPIPHANY_BUILD_HOME}/esdk/tools/e-gnu/bin:$PATH

Note that esdk is normally a symbolic link to the current esdk (e.g. esdk.2016.11), and e-gnu is also normally a symbolic link (to e.g. e-gnu.armv7l).

After this, typing epiphany-elf-gcc --version or e-gcc --version should run Epiphany GCC and dump the version information.

Resolving issues building

If the build has failed, the build log should be checked to see what has caused the error. Usually this is due to a prerequisite package not being installed, so please re-check that you have all the prerequisites installed (please visit the relevant page for your Operating System, Linux, Windows and OS X, for more information). If needed, the SDK forums should be used for support and a bug submitted.