diff --git a/CMakeCommon/SetCompilerFlags.cmake b/CMakeCommon/SetCompilerFlags.cmake index a34734f..95140b2 100644 --- a/CMakeCommon/SetCompilerFlags.cmake +++ b/CMakeCommon/SetCompilerFlags.cmake @@ -26,19 +26,24 @@ # function(SetGNUCompilerFlags compiler_libs) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - if(DEFINED CMAKE_SYSTEM_PROCESSOR) + if(DEFINED __TriCore__) set(compiler_libs PARENT_SCOPE) - set(common_flags "-fno-common -Os -std=c99") - set(warning_flags "-W -Wall -Wextra -Wdiv-by-zero -Warray-bounds -Wcast-align -Wignored-qualifiers -Wformat -Wformat-security") + set(common_c_flags "-fno-common -Os -std=c99") + set(common_cxx_flags "-fno-common -std=c++0x") + set(warning_flags "-W -Wall -Wextra") set(target_flags "-DAPPKIT_TC277TFT -DEMBB_DEBUG -fshort-double -mcpu=tc27xx -mversion-info") if (WARNINGS_ARE_ERRORS STREQUAL ON) set(warning_flags "${warning_flags} -Werror") endif() if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${common_flags} ${warning_flags} ${target_flags}" + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${common_c_flags} ${warning_flags} ${target_flags}" PARENT_SCOPE) endif() + if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${common_cxx_flags} ${warning_flags} ${target_flags}" + PARENT_SCOPE) + endif() else() set(compiler_libs pthread rt PARENT_SCOPE) # -Wall -> All warnings diff --git a/TC_Toolchain.cmake b/TC_Toolchain.cmake index 8d3abc8..ecbebb3 100644 --- a/TC_Toolchain.cmake +++ b/TC_Toolchain.cmake @@ -10,8 +10,8 @@ set(__TriCore__ 1) set(EMBB_OS_FREERTOS 1) # specify the cross compiler -SET(CMAKE_C_COMPILER C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/tricore-gcc.exe) -SET(CMAKE_CXX_COMPILER C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/tricore-g++.exe) +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) # target environment SET(CMAKE_FIND_ROOT_PATH C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1) diff --git a/base_c/CMakeLists.txt b/base_c/CMakeLists.txt index 190a6d2..5542480 100644 --- a/base_c/CMakeLists.txt +++ b/base_c/CMakeLists.txt @@ -74,9 +74,6 @@ endif() if(DEFINED EMBB_OS_FREERTOS) - #set(CMAKE_CXX_STANDARD_LIBRARIES ${FREE_RTOS_LIB_PATH}/iRom/libFreeRTOS_Lib.a) - #set(CMAKE_C_STANDARD_LIBRARIES ${FREE_RTOS_LIB_PATH}/iRom/libFreeRTOS_Lib.a) - #set(CMAKE_INSTALL_RPATH ${FREE_RTOS_LIB_PATH}) file(GLOB_RECURSE FREE_RTOS_HEADERS "${FREE_RTOS_LIB_PATH}/*.h") endif() diff --git a/partest.tar b/partest.tar index aba9b9c..f2862a8 100644 Binary files a/partest.tar and b/partest.tar differ