[cmake-developers] ARMCC toolchain support
Andersson, Joakim
Joakim.Andersson at nordicsemi.no
Wed Oct 28 05:56:01 EDT 2015
Let's see if we can bring some order to this.
There are two major Software packages that you can get from ARM, the Keil MDK-ARM and the ARM DS-5 Development Studio.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html
The MDK-ARM comes with ARM Compiler 5 (armcc).
The ARM DS-5 comes with ARM compiler 5 (armcc), ARM Compiler 6 (armclang), and a GCC toolchain (arm-linux-gnueabihf-*).
So this line as actually wrong:
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "MDK-ARM")
because if you invoke the armasm installed with ARM DS-5 it will say "DS-5"
It should be:
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "ARM Compiler 5")
So that means that ARM actually has at least 3 different compilers, and my patches only cover ARM Compiler 5 (armcc). This is the only compiler I have access to and a license for and the only one that is used in my projects.
So in my opinion we either use a single compiler ID for all of the ARM-provided toolchains (something like ARMCT) or we use different compiler IDs per toolchain (ARMC5, ARMC6 and ARMGCC). It's likely that the ARM GCC toolchain doesn't actually require a new ID and may work directly with the current CMake support. ARM Compiler 6 would definitely require further investigation.
This can safely be removed, the toolchain knows about these paths.
+# add the target specific include directory:
+get_filename_component(_compilerDir "${CMAKE_ASM_COMPILER}" PATH)
+get_filename_component(_compilerDir "${_compilerDir}" PATH)
+include_directories("${_compilerDir}/inc" )
-Joakim Andersson
More information about the cmake-developers
mailing list