File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,17 @@ INC += -I$(HAL_DIR)/inc
4848INC += -I$(USBDEV_DIR ) /core/inc -I$(USBDEV_DIR ) /class/inc
4949# INC += -I$(USBHOST_DIR)
5050
51- CFLAGS_CORTEX_M = -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard
51+ # Basic Cortex-M flags
52+ CFLAGS_CORTEX_M = -mthumb
53+
54+ # Select hardware floating-point support
55+ ifeq ($(CMSIS_MCU ) ,$(filter $(CMSIS_MCU ) ,STM32F767xx STM32F769xx) )
56+ CFLAGS_CORTEX_M += -mfpu=fpv5-d16 -mfloat-abi=hard
57+ else
58+ CFLAGS_CORTEX_M += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
59+ endif
60+
61+ # Options for particular MCU series
5262CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M ) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_F4
5363CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M ) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7
5464CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M ) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4
You can’t perform that action at this time.
0 commit comments