[cmake-developers] [CMake 0012521]: XMOS Toolchain Support

Mantis Bug Tracker mantis at public.kitware.com
Sun Oct 16 07:52:51 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12521 
====================================================================== 
Reported By:                Bernhard Sputh
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12521
Category:                   CMake
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-10-16 13:52 CEST
Last Modified:              2011-10-16 13:52 CEST
====================================================================== 
Summary:                    XMOS Toolchain Support
Description: 
I've written support basic support files for the XMOS-toolchain [1] running on
top of MS-Windows 7 (linux should work as well, but I've not yet tested this). 

To get the Assembler supported in the XMOS toolchain the following three lines
have to be inserted into the file CMakeDetermingASMCompiler.cmake:

LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XMOS )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XMOS "--version")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XMOS "XMOS Limited")

The actual compiler support is based on the GNU.cmake files provided by CMake,
due to the XMOS toolchain being based on LLVM, which in turn is based on GCC, at
least when it comes to the command line options. Since C++ is not supported by
the XMOS toolchain, I've created a file that aborts the build, to prevent
trouble later. 

Find the following files attached:
- XMOS.cmake: A slightly adjusted GNU.cmake
- XMOS-ASM.cmake: Setting the file extensions for XMOS assembler.
- XMOS-C.cmake: A slightly adjusted GNU-C.cmake.
- XMOS-CXX.cmake: The file that prevents accidential inclusion of C++ in an XMOS
project.
-  CMakeDetermingASMCompiler.cmake: My modified version of the file

Due to the XMOS toolchain not being able to compile without having been given a
valid topology, which is project specific, I force the compiler in my toolchain
files. I use the following lines to connect to the XMOS toolchain:

INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(xcc XMOS)
CMAKE_FORCE_CXX_COMPILER(xcc XMOS)

Keep in mind that this is early days for the toolchain support, it will be
extended in the future. 

[1] https://www.xmos.com/products/development-tools

Additional Information: 
Only tested under MS-Windows and with CMake 2.8.5, and the XMOS toolchain
version 11.2.2 

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-10-16 13:52 Bernhard Sputh New Issue                                    
2011-10-16 13:52 Bernhard Sputh File Added: XMOS-Toolchain.zip                  
 
======================================================================




More information about the cmake-developers mailing list