3rd Party Toolchains¶
A “3rd party toolchain” is an officially supported toolchain provided by an external organization. Several of these are available.
GNU ARM Embedded¶
Download and install a GNU ARM Embedded build for your operating system and extract it on your file system.
Warning
Do not install the toolchain into a path with spaces. On Windows, we’ll assume you install into the directory
C:\gnu_arm_embedded
.Warning
The GNU ARM Embedded Toolchain for Windows, version 8-2018-q4-major has a critical bug and should not be used. Toolchain version 7-2018-q2-update is known to work.
Set these environment variables:
- Set
ZEPHYR_TOOLCHAIN_VARIANT
tognuarmemb
. - Set
GNUARMEMB_TOOLCHAIN_PATH
to the toolchain installation directory.
- Set
To check that you have set these variables correctly in your current environment, follow these example shell sessions (the
GNUARMEMB_TOOLCHAIN_PATH
values may be different on your system):# Linux, macOS: $ echo $ZEPHYR_TOOLCHAIN_VARIANT gnuarmemb $ echo $GNUARMEMB_TOOLCHAIN_PATH /home/you/Downloads/gnu_arm_embedded # Windows > echo %ZEPHYR_TOOLCHAIN_VARIANT% gnuarmemb > echo %GNUARMEMB_TOOLCHAIN_PATH% C:\gnu_arm_embedded
Crosstool-NG¶
You can build toolchains from source code using crosstool-NG.
Follow the steps on the crosstool-NG website to prepare your host.
Follow the Zephyr SDK with Crosstool NG instructions to build your toolchain. Repeat as necessary to build toolchains for multiple target architectures.
You will need to clone the
sdk-ng
repo and run the following command:./go.sh <arch>
Note
Currently, only i586 and Arm toolchain builds are verified.
Set these environment variables:
- Set
ZEPHYR_TOOLCHAIN_VARIANT
toxtools
. - Set
XTOOLS_TOOLCHAIN_PATH
to the toolchain build directory.
- Set
To check that you have set these variables correctly in your current environment, follow these example shell sessions (the
XTOOLS_TOOLCHAIN_PATH
values may be different on your system):# Linux, macOS: $ echo $ZEPHYR_TOOLCHAIN_VARIANT xtools $ echo $XTOOLS_TOOLCHAIN_PATH /Volumes/CrossToolNGNew/build/output/