some learning code trying to use libopencm3 to read values from dht11 temperature sensor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.0 KiB

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)