From 9be490a58e770bce84100f10f16ec3f0c770b8ac Mon Sep 17 00:00:00 2001 From: xiaotian Date: Tue, 22 Feb 2022 23:38:28 +0800 Subject: [PATCH] fixed --- CMSIS/DeviceSupport/linker/AT32F403AxG_FLASH.ld | 2 +- CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMSIS/DeviceSupport/linker/AT32F403AxG_FLASH.ld b/CMSIS/DeviceSupport/linker/AT32F403AxG_FLASH.ld index 1af978a..f23e391 100644 --- a/CMSIS/DeviceSupport/linker/AT32F403AxG_FLASH.ld +++ b/CMSIS/DeviceSupport/linker/AT32F403AxG_FLASH.ld @@ -2,7 +2,7 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = 0x20018000; /* end of RAM */ +_estack = 0x20018000; /* end of RAM */ /*此处原厂提供的值会导致浮点数溢出*/ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x200; /* required amount of heap */ diff --git a/CMakeLists.txt b/CMakeLists.txt index 12347b9..cbf4f04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,3 @@ -#此文件从模板自动生成! 请勿更改! set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_VERSION 1) cmake_minimum_required(VERSION 3.21) @@ -14,7 +13,7 @@ set(SIZE arm-none-eabi-size) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # project settings -project(FPU_TEST C CXX ASM) +project(AT32 C CXX ASM) set(CMAKE_CXX_STANDARD 17) set(CMAKE_C_STANDARD 11) @@ -25,12 +24,13 @@ set(CMAKE_C_STANDARD 11) #Uncomment for software floating point #add_compile_options(-mfloat-abi=soft) - +#优化等级 +add_compile_options(-O3) add_compile_options(-mcpu=cortex-m4 -mthumb -mthumb-interwork) add_compile_options(-ffunction-sections -fdata-sections -fno-common -fmessage-length=0) # uncomment to mitigate c++17 absolute addresses warnings #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-register") -add_compile_options(-O3) + include_directories( User/inc StdPeriph_Driver/inc