function(project_add_target_properties TARGET_NAME) target_compile_definitions(${TARGET_NAME} PRIVATE "$<$:DEBUG>" "$<$>:RELEASE>" GD32E230 ) target_compile_options(${TARGET_NAME} PRIVATE "$<$,$>:-g3>" "$<$,$>:-g3>" "$<$,$>:-g3>" "$<$>,$>:-g0>" "$<$>,$>:-g0>" "$<$>,$>:-g0>" "$<$,$>:-O0>" "$<$,$>:-O0>" "$<$>,$>:-Os>" "$<$>,$>:-Os>" -mcpu=cortex-m23 ) target_link_options(${TARGET_NAME} PRIVATE -mcpu=cortex-m23 -mthumb # -u _printf_float -static --specs=nano.specs --specs=nosys.specs -Wl,--gc-sections -Wl,--start-group -lc -lm -Wl,--end-group ) target_link_libraries(${TARGET_NAME} PRIVATE m # To use C math library. -lm should be end of the linker script. ) endfunction()