The latest development version of this page may be more current than this released 4.0.0 version.

Crosstool-NG (Deprecated)

Warning

xtools toolchain variant is deprecated. The cross-compile toolchain variant should be used when using a custom toolchain built with Crosstool-NG.

You can build toolchains from source code using crosstool-NG.

  1. Follow the steps on the crosstool-NG website to prepare your host.

  2. 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.

  3. Set these environment variables:

  4. 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/