Tool/software: Code Composer Studio
Seeing that ti-cgt-armllvm_1.1.0-STS is available, was able to download the Linux installer and after installing outside of CCS 10.1.1.00004 was able to get CCS to recognise the compiler.
Using CCS was able to create an empty example project for a MSP432E401Y but upon compiling get the error:
**** Build of configuration Debug for project MSP432E401Y_TI_clag_hello **** /home/mr_halfword/ti/ccs1011/ccs/utils/bin/gmake -k -j 12 all -O Building file: "../main.c" Invoking: ARM Compiler "/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/bin/tiarmclang" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Og -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432E401Y_TI_clag_hello" -I"/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/include" -D__MSP432E401Y__ -Dgcc -gstrict-dwarf -gdwarf-3 -MMD -MP -MF"main.d_raw" -MT"main.o" -o"main.o" "../main.c" Finished building: "../main.c" Building file: "../startup_msp432e401y_ccs.c" Invoking: ARM Compiler "/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/bin/tiarmclang" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Og -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432E401Y_TI_clag_hello" -I"/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/include" -D__MSP432E401Y__ -Dgcc -gstrict-dwarf -gdwarf-3 -MMD -MP -MF"startup_msp432e401y_ccs.d_raw" -MT"startup_msp432e401y_ccs.o" -o"startup_msp432e401y_ccs.o" "../startup_msp432e401y_ccs.c" Finished building: "../startup_msp432e401y_ccs.c" Building file: "../system_msp432e401y.c" Invoking: ARM Compiler "/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/bin/tiarmclang" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Og -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include" -I"/home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS" -I"/home/mr_halfword/workspace_v10/MSP432E401Y_TI_clag_hello" -I"/home/mr_halfword/ti/ccs1011/ccs/tools/compiler/ti-cgt-armllvm_1.1.0-STS/include" -D__MSP432E401Y__ -Dgcc -gstrict-dwarf -gdwarf-3 -MMD -MP -MF"system_msp432e401y.d_raw" -MT"system_msp432e401y.o" -o"system_msp432e401y.o" "../system_msp432e401y.c" subdir_rules.mk:7: recipe for target 'system_msp432e401y.o' failed In file included from ../system_msp432e401y.c:35: In file included from /home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/msp.h:73: In file included from /home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/msp432e401y.h:196: In file included from /home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS/core_cm4.h:160: In file included from /home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS/cmsis_compiler.h:48: /home/mr_halfword/ti/ccs1011/ccs/ccs_base/arm/include/CMSIS/cmsis_gcc.h:657:54: error: unknown register name 'vfpcc' in asm __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); ^ 1 error generated. gmake: *** [system_msp432e401y.o] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
Is the new ARM-CGT-CLANG compiler supported in CCS 10 yet?
The error in the above example was in the following inline function in cmsis_gcc.h :
/** \brief Set FPSCR \details Assigns the given value to the Floating Point Status/Control register. \param [in] fpscr Floating Point Status/Control value to set */ __attribute__((always_inline)) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr) { #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); #else (void)fpscr; #endif }
According to Issue 411803002: Fix for building ARM/linux using clang. (Closed), different conditional compilation is required using __clang__ to select an intrinsic instead of __ASM statement for use with a LLVM-based compiler.