mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
Build STM32F7 with single-point FPU.
This commit is contained in:
parent
a29a3af218
commit
bc8c8df316
25
examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake
Normal file
25
examples/build_system/cmake/cpu/cortex-m7-fpsp.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
if (TOOLCHAIN STREQUAL "gcc")
|
||||
set(TOOLCHAIN_COMMON_FLAGS
|
||||
-mthumb
|
||||
-mcpu=cortex-m7
|
||||
-mfloat-abi=hard
|
||||
-mfpu=fpv5-sp-d16
|
||||
)
|
||||
set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
|
||||
|
||||
elseif (TOOLCHAIN STREQUAL "clang")
|
||||
set(TOOLCHAIN_COMMON_FLAGS
|
||||
--target=arm-none-eabi
|
||||
-mcpu=cortex-m7
|
||||
-mfpu=fpv5-sp-d16
|
||||
)
|
||||
set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
|
||||
|
||||
elseif (TOOLCHAIN STREQUAL "iar")
|
||||
set(TOOLCHAIN_COMMON_FLAGS
|
||||
--cpu cortex-m7
|
||||
--fpu VFPv5_sp
|
||||
)
|
||||
set(FREERTOS_PORT IAR_ARM_CM7 CACHE INTERNAL "")
|
||||
|
||||
endif ()
|
27
examples/build_system/make/cpu/cortex-m7-fpsp.mk
Normal file
27
examples/build_system/make/cpu/cortex-m7-fpsp.mk
Normal file
@ -0,0 +1,27 @@
|
||||
ifeq ($(TOOLCHAIN),gcc)
|
||||
CFLAGS += \
|
||||
-mthumb \
|
||||
-mcpu=cortex-m7 \
|
||||
-mfloat-abi=hard \
|
||||
-mfpu=fpv5-sp-d16 \
|
||||
|
||||
else ifeq ($(TOOLCHAIN),clang)
|
||||
CFLAGS += \
|
||||
--target=arm-none-eabi \
|
||||
-mcpu=cortex-m7 \
|
||||
-mfpu=fpv5-sp-d16 \
|
||||
|
||||
else ifeq ($(TOOLCHAIN),iar)
|
||||
CFLAGS += \
|
||||
--cpu cortex-m7 \
|
||||
--fpu VFPv5_sp \
|
||||
|
||||
ASFLAGS += \
|
||||
--cpu cortex-m7 \
|
||||
--fpu VFPv5_sp \
|
||||
|
||||
else
|
||||
$(error "TOOLCHAIN is not supported")
|
||||
endif
|
||||
|
||||
FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM7/r0p1
|
@ -11,7 +11,7 @@ set(CMSIS_5 ${TOP}/lib/CMSIS_5)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
|
||||
|
||||
# toolchain set up
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m7 CACHE INTERNAL "System Processor")
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m7-fpsp CACHE INTERNAL "System Processor")
|
||||
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
|
||||
|
||||
set(FAMILY_MCUS STM32F7 CACHE INTERNAL "")
|
||||
|
@ -6,7 +6,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
|
||||
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver
|
||||
|
||||
include $(TOP)/$(BOARD_PATH)/board.mk
|
||||
CPU_CORE ?= cortex-m7
|
||||
CPU_CORE ?= cortex-m7-fpsp
|
||||
|
||||
# --------------
|
||||
# Compiler Flags
|
||||
|
Loading…
x
Reference in New Issue
Block a user