|
|
@ -33,7 +33,7 @@ set(CMAKE_CXX_COMPILER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTA |
|
|
|
set(CMAKE_OBJCOPY "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objcopy${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "objcopy tool") |
|
|
|
set(CMAKE_OBJDUMP "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "objdump tool") |
|
|
|
set(CMAKE_SIZE "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "size tool") |
|
|
|
set(CMAKE_DEBUGER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "debuger") |
|
|
|
set(CMAKE_DEBUGGER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "debugger") |
|
|
|
set(CMAKE_CPPFILT "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-c++filt${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "c++filt") |
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
|
|
@ -43,11 +43,15 @@ set(CMAKE_EXECUTABLE_SUFFIX ".elf") |
|
|
|
if(NOT CMAKE_CONFIGURATION_TYPES) |
|
|
|
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo) |
|
|
|
endif() |
|
|
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build Type" FORCE) |
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "") |
|
|
|
set(CMAKE_BUILD_TYPE RelWithDebInfo) |
|
|
|
endif() |
|
|
|
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Build Type" FORCE) |
|
|
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES}) |
|
|
|
|
|
|
|
set(arm_none_eabi_debug "-Og -g") |
|
|
|
set(arm_none_eabi_release "-Os -DNDEBUG -flto -fuse-linker-plugin") |
|
|
|
# We set -Os or -O2 depending on the MCU family |
|
|
|
set(arm_none_eabi_release "-DNDEBUG -flto -fuse-linker-plugin") |
|
|
|
set(arm_none_eabi_relwithdebinfo "-ggdb3 ${arm_none_eabi_release}") |
|
|
|
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG ${arm_none_eabi_debug} CACHE INTERNAL "c compiler flags debug") |
|
|
|