TC_Toolchain.cmake 925 Bytes
Newer Older
Michael Schmid committed
1 2
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_SYSTEM_VERSION 1)
3
SET(CMAKE_SYSTEM_PROCESSOR __TriCore__)
4

5
# add __TriCore__ to compiler flags
6
add_definitions(-D__TriCore__)
7 8
add_definitions(-DEMBB_OS_FREERTOS)
# add __TriCore__ to cmake flags
9
set(__TriCore__ 1)
10
set(EMBB_OS_FREERTOS 1)
Michael Schmid committed
11

12

Michael Schmid committed
13
# specify the cross compiler
14 15
SET(CMAKE_C_COMPILER   C:/HighTec/toolchains/tricore/v4.9.1.0-infineon-1.1/bin/tricore-gcc.exe)
SET(CMAKE_CXX_COMPILER C:/HighTec/toolchains/tricore/v4.9.1.0-infineon-1.1/bin/tricore-c++.exe)
Michael Schmid committed
16

17
# target environment 
Michael Schmid committed
18 19
SET(CMAKE_FIND_ROOT_PATH  C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1)

20
# path to FreeRTOS
21
SET(FREE_RTOS_LIB_PATH C:/Data/Projekte/FreeRTOS_AppKit_TC277)
22

Michael Schmid committed
23 24 25 26 27
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)