6.1.3. CompilerToolchainIntegration¶
6.1.3.1. Compiler profile overview¶
For many compilers, a setup tool creates the compiler profile by querying the native
compiler. Call it with the native compiler and its relevant target switches, e.g.
-mcpu=cortex-m4. For the other compilers, enable the toolchain rule with
axivion_config and check its default values, in particular the emulated
compiler, the language version, the predefined macros, the system include path, the
switch mapping and the type configuration.
Compiler |
Setup tool |
Toolchain rule |
|---|---|---|
Analog Devices Blackfin |
||
Clang |
||
CodeVisionAVR |
||
Cosmic |
Cosmic68HC05Toolchain, CosmicS08Toolchain, CosmicS12XToolchain, CosmicS12ZToolchain, CosmicSTM8Toolchain |
|
Freescale CodeWarrior HC12, S12Z |
||
GCC |
||
Green Hills Software |
||
HighTec |
||
IAR Systems |
IARARMToolchain, IARAVRToolchain, IARMSP430Toolchain, IARRL78Toolchain, IARRXToolchain, IARSTM8Toolchain, IARV850Toolchain |
|
Intel Classic |
||
Intel oneAPI |
||
KEIL ARMCC, C51, C166 |
||
KEIL ARMCLANG |
||
Microchip MPLAB XC8 PIC |
||
Microchip MPLAB XC8 AVR, XC16, XC32 |
MicrochipXC8AVRToolchain, MicrochipXC16Toolchain, MicrochipXC32Toolchain |
|
Microsoft |
||
QNX |
||
Renesas |
RenesasRHToolchain, RenesasRLToolchain, RenesasRXToolchain, RenesasSHToolchain |
|
TASKING HSM C and ARM |
||
TASKING TriCore |
||
Texas Instruments CGT |
TIARMToolchain, TIARP32Toolchain, TIC2000Toolchain, TIC6000Toolchain, TIC7000Toolchain, TIMSP430Toolchain, TIPRUToolchain |
|
Texas Instruments CGT ARM Clang |
||
Wind River Diab |
||
Wind River GNU |
Additional profiles¶
The folder profiles in the Axivion Suite installation folder contains notes and
configuration snippets for specific compilers. Each subfolder contains a
README.txt file.
The axivion_preinc.h files in these subfolders are preincluded by the default
configuration of the matching toolchain rule. You do not have to configure them.
For the build scripts and instructions for Eclipse-based IDEs in the same folder, see IDE Profiles.
The profiles cmake and bazel are described in
CMake and Bazel, the profile
yocto-poky in Yocto/Poky/BitBake.
ARM Neon intrinsics are declared in profiles/arm-neon/axivion_preinc.h.
gccsetup preincludes it if the native compiler
defines __ARM_NEON. For a GNUToolchain profile not created by
gccsetup, add
profiles/arm-neon/compiler_config_neon.json as a layer to
BAUHAUS_CONFIG.
For CUDA, see the option --nvcc of gccsetup and
clangsetup. For
other toolchains, add the CUDA include directories to the system include path of the
toolchain rule. The command printf "" | nvcc -v -x c -E - 2>&1 | grep INCLUDES
shows them. profiles/cuda/compiler_local_config.json is an example. The
environment variables prefixed with __AXIVION_CUDA__ in
profiles/cuda/axivion_preinc.h take their values from the same nvcc
output; without them, the defaults for CUDA 12.0 apply.
6.1.3.2. Reference¶
Compiler/Linker/Archiver Integration
This rulegroup is used to configure the compilation tools (compiler, linker, archiver/librarian) that are used to compile the C/C++ source code of the project.
The settings here determine how the cafeCC tool acts. Typically,
cafeCC is configured to emulate the native compiler used to build your project.
This then allows substituting cafeCC for the native compiler in the
build system.
cafeCC expects that exactly one toolchain rule is enabled.
The different compiler profiles available here only differ in their default configuration.
Please note that you cannot configure rules below this rulegroup inside Python layers. This rulegroup only supports JSON configuration.
Nested Rules
Custom C/C++ compiler toolchain |
|
Analog Devices Blackfin C/C++ compiler toolchain |
|
Clang C/C++ compiler toolchain |
|
CodeVision C compiler toolchain |
|
Freescale CodeWarrior C/C++ compiler toolchain |
|
Cosmic C compiler toolchain |
|
Green Hills Software C/C++ compiler toolchain |
|
GNU C/C++ compiler toolchain |
|
IAR Systems C/C++ compiler toolchain |
|
Intel C/C++ compiler toolchain |
|
KEIL C/C++ compiler toolchain |
|
Microchip MPLAB C/C++ compiler toolchain |
|
Microsoft C/C++ compiler toolchain |
|
Renesas C/C++ compiler toolchain |
|
Texas Instruments CGT C/C++ compiler toolchain |
|
TASKING C/C++ compiler toolchain |
|
Wind River C/C++ compiler toolchain |
Options
Setting an option for this rule means setting the default for all nested rules.
The following places define options that affect this rule: Project-GlobalOptions
This rule has no individual options.