|
|
|
|
@ -15,14 +15,17 @@ find_program(CMAKE_C_COMPILER NAMES arm-none-eabi-gcc arm-none-eabi-gcc.exe)
|
|
|
|
|
find_program(CMAKE_CXX_COMPILER NAMES arm-none-eabi-g++ arm-none-eabi-g++.exe)
|
|
|
|
|
find_program(CMAKE_ASM_COMPILER NAMES arm-none-eabi-gcc arm-none-eabi-gcc.exe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (NOT ("${tools}" STREQUAL ""))
|
|
|
|
|
message(STATUS "Tools path is set")
|
|
|
|
|
SET(CMAKE_AR "${tools}/bin/ar")
|
|
|
|
|
SET(CMAKE_CXX_COMPILER_AR "${tools}/bin/ar")
|
|
|
|
|
SET(CMAKE_C_COMPILER_AR "${tools}/bin/ar")
|
|
|
|
|
|
|
|
|
|
#find_program(CMAKE_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe )
|
|
|
|
|
#find_program(CMAKE_CXX_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe )
|
|
|
|
|
#find_program(CMAKE_C_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe)
|
|
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
find_program(CMAKE_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe )
|
|
|
|
|
find_program(CMAKE_CXX_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe )
|
|
|
|
|
find_program(CMAKE_C_COMPILER_AR NAMES arm-none-eabi-gcc-ar arm-none-eabi-gcc-ar.exe)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
#SET(CMAKE_LINKER "${tools}/bin/arm-none-eabi-g++")
|
|
|
|
|
find_program(CMAKE_LINKER NAMES arm-none-eabi-g++ arm-none-eabi-g++.exe)
|
|
|
|
|
@ -48,10 +51,17 @@ if(NOT ARM_CPU)
|
|
|
|
|
endif(NOT ARM_CPU)
|
|
|
|
|
|
|
|
|
|
if (ARM_CPU STREQUAL "cortex-m55")
|
|
|
|
|
# For gcc 10q4
|
|
|
|
|
SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
SET(CMAKE_ASM_FLAGS "-march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "ASM compiler common flags")
|
|
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "-fno-use-linker-plugin -march=armv8.1-m.main+mve.fp+fp.dp" CACHE INTERNAL "linker flags")
|
|
|
|
|
elseif (ARM_CPU STREQUAL "cortex-m55+nomve.fp+nofp")
|
|
|
|
|
# This case is not tested nor supported
|
|
|
|
|
SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
SET(CMAKE_ASM_FLAGS "-march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "ASM compiler common flags")
|
|
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "-fno-use-linker-plugin -march=armv8.1-m.main+dsp+fp.dp" CACHE INTERNAL "linker flags")
|
|
|
|
|
else()
|
|
|
|
|
SET(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections -mcpu=${ARM_CPU}" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
SET(CMAKE_CXX_FLAGS "-ffunction-sections -fdata-sections -mcpu=${ARM_CPU}" CACHE INTERNAL "C compiler common flags")
|
|
|
|
|
|