Cadence Tensilica Xtensa C/C++ Compiler (XCC)
Obtain Tensilica Software Development Toolkit targeting the specific SoC on hand. This usually contains two parts:
The Xtensa Xplorer which contains the necessary executables and libraries.
A SoC-specific add-on to be installed on top of Xtensa Xplorer.
This add-on allows the compiler to generate code for the SoC on hand.
Install Xtensa Xplorer and then the SoC add-on.
Follow the instruction from Cadence on how to install the SDK.
Depending on the SDK, there are two set of compilers:
xt-xccand its friends.
xt-clangand its friends.
Make sure you have obtained a license to use the SDK, or has access to a remote licensing server.
XTENSA_TOOLCHAIN_PATHto the toolchain installation directory.
XTENSA_COREto the SoC ID where application is being targeting.
TOOLCHAIN_VERto the Xtensa SDK version.
For example, assuming the SDK is installed in
/opt/xtensa, and using the SDK for application development on
intel_adsp_cavs15, setup the environment using:
# Linux export ZEPHYR_TOOLCHAIN_VARIANT=xcc export XTENSA_TOOLCHAIN_PATH=/opt/xtensa/XtDevTools/install/tools/ export XTENSA_CORE=X6H3SUE_RI_2018_0 export TOOLCHAIN_VER=RI-2018.0-linux
To use Clang-based compiler:
Note that the Clang-based compiler may contain an old LLVM bug which results in the following error:
/tmp/file.s: Assembler messages: /tmp/file.s:20: Error: file number 1 already allocated clang-3.9: error: Xtensa-as command failed with exit code 1
If this happens, set
# Linux export XCC_NO_G_FLAG=1
Also note that setting
xccis deprecated. Set