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

BlackfinToolchain [1]

Clang

clangsetup

ClangToolchain

CodeVisionAVR

CodevisionAVRToolchain

Cosmic

Cosmic68HC05Toolchain, CosmicS08Toolchain, CosmicS12XToolchain, CosmicS12ZToolchain, CosmicSTM8Toolchain

Freescale CodeWarrior HC12, S12Z

fcwsetup [2]

CodewarriorHC12Toolchain, CodewarriorS12ZToolchain

GCC

gccsetup

GNUToolchain

Green Hills Software

ghssetup

GHSToolchain

HighTec

gccsetup [3]

GNUToolchain

IAR Systems

iarsetup

IARARMToolchain, IARAVRToolchain, IARMSP430Toolchain, IARRL78Toolchain, IARRXToolchain, IARSTM8Toolchain, IARV850Toolchain

Intel Classic

gccsetup

IntelClassicToolchain

Intel oneAPI

clangsetup

IntelClangToolchain

KEIL ARMCC, C51, C166

KeilARMToolchain, KeilC51Toolchain, KeilC166Toolchain

KEIL ARMCLANG

clangsetup

KeilARMClangToolchain

Microchip MPLAB XC8 PIC

xc8setup [4]

MicrochipXC8PICToolchain

Microchip MPLAB XC8 AVR, XC16, XC32

gccsetup

MicrochipXC8AVRToolchain, MicrochipXC16Toolchain, MicrochipXC32Toolchain

Microsoft

MicrosoftToolchain

QNX

gccsetup [5]

GNUToolchain

Renesas

RenesasRHToolchain, RenesasRLToolchain, RenesasRXToolchain, RenesasSHToolchain

TASKING HSM C and ARM

TaskingCARMToolchain

TASKING TriCore

taskingsetup

TaskingCTCToolchain

Texas Instruments CGT

ticgtsetup

TIARMToolchain, TIARP32Toolchain, TIC2000Toolchain, TIC6000Toolchain, TIC7000Toolchain, TIMSP430Toolchain, TIPRUToolchain

Texas Instruments CGT ARM Clang

clangsetup

TIARMClangToolchain

Wind River Diab

WindriverDiabToolchain

Wind River GNU

gccsetup

WindriverGNUToolchain

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

CustomToolchains

Custom C/C++ compiler toolchain

BlackfinToolchains

Analog Devices Blackfin C/C++ compiler toolchain

ClangToolchains

Clang C/C++ compiler toolchain

CodevisionToolchains

CodeVision C compiler toolchain

CodewarriorToolchains

Freescale CodeWarrior C/C++ compiler toolchain

CosmicToolchains

Cosmic C compiler toolchain

GHSToolchains

Green Hills Software C/C++ compiler toolchain

GNUToolchains

GNU C/C++ compiler toolchain

IARToolchains

IAR Systems C/C++ compiler toolchain

IntelToolchains

Intel C/C++ compiler toolchain

KeilToolchains

KEIL C/C++ compiler toolchain

MicrochipToolchains

Microchip MPLAB C/C++ compiler toolchain

MicrosoftToolchains

Microsoft C/C++ compiler toolchain

RenesasToolchains

Renesas C/C++ compiler toolchain

TIToolchains

Texas Instruments CGT C/C++ compiler toolchain

TaskingToolchains

TASKING C/C++ compiler toolchain

WindriverToolchains

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.