doc: add section about 3rd party compilers
Change-Id: I469f0daa63dabfccc87bb46c312ebe319a58d863 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
b20edcae7d
commit
80fe4aeb05
1 changed files with 51 additions and 1 deletions
|
@ -67,7 +67,7 @@ To build an example application follow these steps:
|
|||
|
||||
$ export ZEPHYR_GCC_VARIANT=zephyr
|
||||
|
||||
$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
|
||||
$ export ZEPHYR_SDK_INSTALL_DIR=<sdk installation directory>
|
||||
|
||||
#. Navigate to the main project directory:
|
||||
|
||||
|
@ -117,6 +117,54 @@ The ELF binaries generated by the build system are named by default
|
|||
The build system generates different names for different use cases depending on
|
||||
the hardware and platforms used.
|
||||
|
||||
Using Custom and 3rd Party Cross Compilers
|
||||
==========================================
|
||||
|
||||
The Zephyr SDK is provided for convenience and ease of use. It provides
|
||||
cross-compilers for all ports supported by Zephyr and does not require any extra
|
||||
flags when building applications or running tests.
|
||||
|
||||
If you have a custom cross-compiler or if you wish to use a vendor provided SDK,
|
||||
follow the steps below to build with any custom or 3rd party cross-compilers:
|
||||
|
||||
#. To avoid any conflicts with the Zephyr SDK, enter the following commands.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ unset ZEPHYR_GCC_VARIANT
|
||||
|
||||
$ unset ZEPHYR_SDK_INSTALL_DIR
|
||||
|
||||
#. We will use the `GCC ARM Embedded`_ compiler for this example, download the
|
||||
package suitable for your operating system from the `GCC ARM Embedded`_ website
|
||||
and extract it on your file system. This example assumes the compiler was
|
||||
extracted to: :file:`~/gcc-arm-none-eabi-5_3-2016q1/`.
|
||||
|
||||
#. Navigate to the main project directory:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd zephyr-project
|
||||
|
||||
#. Source the project environment file to set the project environment
|
||||
variables:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ source zephyr-env.sh
|
||||
|
||||
#. Build the example project and make sure you supply the CROSS_COMPILE on the command
|
||||
line, enter:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd $ZEPHYR_BASE/samples/hello_world/microkernel
|
||||
|
||||
$ make CROSS_COMPILE=~/gcc-arm-none-eabi-5_3-2016q1/bin/arm-none-eabi- BOARD=arduino_due
|
||||
|
||||
The above will build the sample using the toolchain downloaded from `GCC ARM Embedded`_.
|
||||
|
||||
|
||||
Running a Sample Application in QEMU
|
||||
====================================
|
||||
|
||||
|
@ -147,3 +195,5 @@ rely on testing in the QEMU emulation environment only.
|
|||
.. _Linux Foundation ID website: https://identity.linuxfoundation.org
|
||||
|
||||
.. _Gerrit: https://gerrit.zephyrproject.org/
|
||||
|
||||
.. _GCC ARM Embedded: https://launchpad.net/gcc-arm-embedded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue