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-ngrepo and run the following command:
Currently, only i586 and Arm toolchain builds are verified.
Set these environment variables:
XTOOLS_TOOLCHAIN_PATHto the toolchain build directory.
To check that you have set these variables correctly in your current environment, follow these example shell sessions (the
XTOOLS_TOOLCHAIN_PATHvalues may be different on your system):
# Linux, macOS: $ echo $ZEPHYR_TOOLCHAIN_VARIANT xtools $ echo $XTOOLS_TOOLCHAIN_PATH /Volumes/CrossToolNGNew/build/output/