2024-03-31 16:06:11 +00:00
|
|
|
message("========use armv7_8.cmake")
|
|
|
|
|
|
2025-01-21 16:20:51 +08:00
|
|
|
set(CMAKE_C_FLAGS "-mcpu=${CONFIG_ARCH} -O0 -g3 -mfloat-abi=${CONFIG_FLOAT_TYPE} -mthumb -DMKRTOS \
|
2024-03-31 16:06:11 +00:00
|
|
|
-std=gnu11 -ffunction-sections -fdata-sections -fno-builtin -u=_printf_float \
|
2025-01-06 19:07:10 +08:00
|
|
|
-nostartfiles -nodefaultlibs -nostdlib -nostdinc \
|
2025-02-01 12:26:56 +08:00
|
|
|
-fno-stack-protector -Wl,--gc-section -D__ARM_ARCH_7M__ \
|
2024-03-31 16:06:11 +00:00
|
|
|
-include ${CMAKE_SOURCE_DIR}/build/autoconf.h \
|
|
|
|
|
" CACHE STRING "" FORCE)
|
|
|
|
|
|
2025-01-03 18:29:25 +08:00
|
|
|
set(CMAKE_CXX_FLAGS "-mcpu=${CONFIG_ARCH} -Ofast -g3 -mfloat-abi=${CONFIG_FLOAT_TYPE} -mthumb -DMKRTOS -std=c++11 \
|
2024-03-31 16:06:11 +00:00
|
|
|
-fmessage-length=0 -Xlinker --print-map -Wall -W -fno-stack-protector -g \
|
2025-01-03 18:29:25 +08:00
|
|
|
-u=_printf_float -D__ARM_ARCH_7M__ \
|
2024-03-31 16:06:11 +00:00
|
|
|
-ffunction-sections -fdata-sections -fno-builtin -nostartfiles -nodefaultlibs -nostdlib -nostdinc -Xlinker \
|
|
|
|
|
-include ${CMAKE_SOURCE_DIR}/build/autoconf.h \
|
|
|
|
|
" CACHE STRING "" FORCE)
|
|
|
|
|
|
2025-01-03 18:29:25 +08:00
|
|
|
set(CMAKE_ASM_FLAGS "-mcpu=${CONFIG_ARCH} -Ofast -g3 -mfloat-abi=${CONFIG_FLOAT_TYPE} -mthumb -DMKRTOS \
|
|
|
|
|
-u=_printf_float -std=gnu11 -ffunction-sections -fdata-sections -fno-builtin \
|
2024-09-22 16:06:39 +08:00
|
|
|
-nostartfiles -nodefaultlibs -nostdlib -nostdinc -Xlinker -fno-stack-protector -D__ARM_ARCH_7M__ \
|
2024-03-31 16:06:11 +00:00
|
|
|
-include ${CMAKE_SOURCE_DIR}/build/autoconf.h \
|
2024-11-02 21:49:13 +08:00
|
|
|
" CACHE STRING "" FORCE)
|
|
|
|
|
|
|
|
|
|
if (${CONFIG_FLOAT_TYPE} STREQUAL "hard")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-12-16 08:27:37 +08:00
|
|
|
if (${CONFIG_FLOAT_TYPE} STREQUAL "softfp")
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -DMKRTOS_USE_FPU ")
|
|
|
|
|
endif()
|
|
|
|
|
|