1
0
dht_test/toolchain-STM32F1.cmake
2021-07-21 23:04:05 +03:00

42 lines
1.0 KiB
CMake

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION Cortex-M3-STM32F1)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(ARM_OPTIONS -mcpu=cortex-m3 -mthumb -msoft-float)
add_compile_options(
${ARM_OPTIONS}
-ffunction-sections
-fdata-sections
-MMD
-MP
)
add_link_options(
${ARM_OPTIONS}
-specs=nano.specs
-specs=nosys.specs # puts does not work.....
#-specs=rdimon.specs
LINKER:-lc
LINKER:-lgcc
LINKER:-lnosys
#-specs=nano.specs
#-u_printf_float
#-u_scanf_float
-nostartfiles
#-Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
LINKER:--gc-sections
LINKER:--build-id
LINKER:-Map=${CMAKE_PROJECT_NAME}.map
-T${CMAKE_SOURCE_DIR}/generated.STM32F103C8T6.ld
)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)