From 64d456f0345cd3a41b733e90d04fc11cbf069a1e Mon Sep 17 00:00:00 2001 From: TuxMonkey Date: Thu, 19 Mar 2026 01:40:29 +0800 Subject: [PATCH] changed CMakeLists.txt --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f7fc41..18496fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,10 @@ set(DSP_NAME "libCMSISDSP.a") # 指定DSP库名称 link_directories(${CMAKE_SOURCE_DIR}/Middlewares/ST/ARM/DSP/Lib) # Generic compiler settings for optimization and basic link lib -add_compile_options(-pipe ${MCU_FLAGS} -Wall -Werror -fmessage-length=0 # basic options +add_compile_options(-pipe ${MCU_FLAGS} -Wall -fmessage-length=0 # basic options -ffunction-sections -fdata-sections -fno-common # optimize options ) +# -Werror add_link_options(-pipe ${MCU_FLAGS} -T${LINKER_SCRIPT} -Wl,--no-warn-rwx-segments # close RWX warning -lm -lc -lnosys # lib options -Wl,--gc-sections -flto -specs=nano.specs -specs=nosys.specs # optimize options @@ -42,7 +43,8 @@ add_link_options(-pipe ${MCU_FLAGS} -T${LINKER_SCRIPT} -Wl,--no-warn-rwx-segment add_definitions( -DUSE_HAL_DRIVER -DSTM32F407xx - -DARM_MATH_CM4 + -DARM_MATH_CM4 + -D__FPU_PRESENT=1U ) # need -D to define macro # add inc