5 ifeq ($(DEBUG_HARDFAULTS
),F7
)
6 CFLAGS
+= -DDEBUG_HARDFAULTS
10 CMSIS_DIR
:= $(ROOT
)/lib
/main
/CMSIS
13 STDPERIPH_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Drivers
/STM32F7xx_HAL_Driver
14 STDPERIPH_SRC
= $(notdir $(wildcard $(STDPERIPH_DIR
)/Src
/*.c
))
15 EXCLUDES
= stm32f7xx_hal_can.c \
18 stm32f7xx_hal_crc_ex.c \
19 stm32f7xx_hal_cryp.c \
20 stm32f7xx_hal_cryp_ex.c \
21 stm32f7xx_hal_dcmi.c \
22 stm32f7xx_hal_dcmi_ex.c \
23 stm32f7xx_hal_dfsdm.c \
24 stm32f7xx_hal_dma2d.c \
27 stm32f7xx_hal_hash.c \
28 stm32f7xx_hal_hash_ex.c \
31 stm32f7xx_hal_irda.c \
32 stm32f7xx_hal_iwdg.c \
33 stm32f7xx_hal_jpeg.c \
34 stm32f7xx_hal_lptim.c \
35 stm32f7xx_hal_ltdc.c \
36 stm32f7xx_hal_ltdc_ex.c \
37 stm32f7xx_hal_mdios.c \
39 stm32f7xx_hal_msp_template.c \
40 stm32f7xx_hal_nand.c \
42 stm32f7xx_hal_qspi.c \
45 stm32f7xx_hal_rtc_ex.c \
47 stm32f7xx_hal_sai_ex.c \
49 stm32f7xx_hal_sdram.c \
50 stm32f7xx_hal_smartcard.c \
51 stm32f7xx_hal_smartcard_ex.c \
52 stm32f7xx_hal_smbus.c \
53 stm32f7xx_hal_spdifrx.c \
54 stm32f7xx_hal_sram.c \
55 stm32f7xx_hal_timebase_rtc_alarm_template.c \
56 stm32f7xx_hal_timebase_rtc_wakeup_template.c \
57 stm32f7xx_hal_timebase_tim_template.c \
58 stm32f7xx_hal_wwdg.c \
65 stm32f7xx_ll_lptim.c \
69 stm32f7xx_ll_sdmmc.c \
72 STDPERIPH_SRC
:= $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC
))
75 USBCORE_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Middlewares
/ST
/STM32_USB_Device_Library
/Core
76 USBCORE_SRC
= $(notdir $(wildcard $(USBCORE_DIR
)/Src
/*.c
))
77 EXCLUDES
= usbd_conf_template.c
78 USBCORE_SRC
:= $(filter-out ${EXCLUDES}, $(USBCORE_SRC
))
80 USBCDC_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Middlewares
/ST
/STM32_USB_Device_Library
/Class
/CDC
81 USBCDC_SRC
= $(notdir $(wildcard $(USBCDC_DIR
)/Src
/*.c
))
82 EXCLUDES
= usbd_cdc_if_template.c
83 USBCDC_SRC
:= $(filter-out ${EXCLUDES}, $(USBCDC_SRC
))
85 USBHID_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Middlewares
/ST
/STM32_USB_Device_Library
/Class
/HID
86 USBHID_SRC
= $(notdir $(wildcard $(USBHID_DIR
)/Src
/*.c
))
88 USBHIDCDC_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Middlewares
/ST
/STM32_USB_Device_Library
/Class
/CDC_HID
89 USBHIDCDC_SRC
= $(notdir $(wildcard $(USBHIDCDC_DIR
)/Src
/*.c
))
91 USBMSC_DIR
= $(ROOT
)/lib
/main
/STM32F7
/Middlewares
/ST
/STM32_USB_Device_Library
/Class
/MSC
92 USBMSC_SRC
= $(notdir $(wildcard $(USBMSC_DIR
)/Src
/*.c
))
93 EXCLUDES
= usbd_msc_storage_template.c
94 USBMSC_SRC
:= $(filter-out ${EXCLUDES}, $(USBMSC_SRC
))
96 VPATH
:= $(VPATH
):$(USBCDC_DIR
)/Src
:$(USBCORE_DIR
)/Src
:$(USBHID_DIR
)/Src
:$(USBHIDCDC_DIR
)/Src
:$(USBMSC_DIR
)/Src
98 DEVICE_STDPERIPH_SRC
:= $(STDPERIPH_SRC
) \
106 VPATH
:= $(VPATH
):$(CMSIS_DIR
)/Include
:$(CMSIS_DIR
)/Device
/ST
/STM32F7xx
107 VPATH
:= $(VPATH
):$(STDPERIPH_DIR
)/Src
109 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
110 $(STDPERIPH_DIR
)/Inc \
114 $(USBHIDCDC_DIR
)/Inc \
116 $(CMSIS_DIR
)/Core
/Include \
117 $(ROOT
)/lib
/main
/STM32F7
/Drivers
/CMSIS
/Device
/ST
/STM32F7xx
/Include \
118 $(ROOT
)/src
/main
/vcp_hal
120 ifneq ($(filter SDCARD
,$(FEATURES
)),)
121 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
123 VPATH
:= $(VPATH
):$(FATFS_DIR
)
127 ARCH_FLAGS
= -mthumb
-mcpu
=cortex-m7
-mfloat-abi
=hard
-mfpu
=fpv5-sp-d16
-fsingle-precision-constant
-Wdouble-promotion
129 DEVICE_FLAGS
= -DUSE_HAL_DRIVER
-DUSE_FULL_LL_DRIVER
130 ifeq ($(TARGET
),$(filter $(TARGET
),$(F7X5XG_TARGETS
)))
131 DEVICE_FLAGS
+= -DSTM32F745xx
132 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f74x.
ld
133 STARTUP_SRC
= startup_stm32f745xx.s
135 else ifeq ($(TARGET
),$(filter $(TARGET
),$(F7X6XG_TARGETS
)))
136 DEVICE_FLAGS
+= -DSTM32F746xx
137 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f74x.
ld
138 STARTUP_SRC
= startup_stm32f746xx.s
140 else ifeq ($(TARGET
),$(filter $(TARGET
),$(F7X2RE_TARGETS
)))
141 DEVICE_FLAGS
+= -DSTM32F722xx
143 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f722.
ld
145 STARTUP_SRC
= startup_stm32f722xx.s
148 $(error Unknown MCU for F7 target
)
150 DEVICE_FLAGS
+= -DHSE_VALUE
=$(HSE_VALUE
)
152 TARGET_FLAGS
= -D
$(TARGET
)
155 vcp_hal
/usbd_desc.c \
156 vcp_hal
/usbd_conf.c \
157 vcp_hal
/usbd_cdc_interface.c \
158 drivers
/serial_usb_vcp.c \
162 target
/system_stm32f7xx.c \
163 drivers
/accgyro
/accgyro_mpu.c \
164 drivers
/adc_stm32f7xx.c \
165 drivers
/audio_stm32f7xx.c \
166 drivers
/bus_i2c_hal.c \
167 drivers
/dma_stm32f7xx.c \
168 drivers
/light_ws2811strip_hal.c \
169 drivers
/transponder_ir_io_hal.c \
170 drivers
/bus_spi_ll.c \
171 drivers
/pwm_output_dshot_hal.c \
172 drivers
/timer_hal.c \
173 drivers
/timer_stm32f7xx.c \
174 drivers
/system_stm32f7xx.c \
175 drivers
/serial_uart_stm32f7xx.c \
176 drivers
/serial_uart_hal.c
181 drivers
/serial_uart.c
184 drivers
/usb_msc_f7xx.c \
187 ifneq ($(filter SDIO
,$(FEATURES
)),)
191 msc
/usbd_storage_sdio.c
194 ifneq ($(filter SDCARD
,$(FEATURES
)),)
196 msc
/usbd_storage_sd_spi.c
199 ifneq ($(filter ONBOARDFLASH
,$(FEATURES
)),)
201 msc
/usbd_storage_emfat.c \
206 DSP_LIB
:= $(ROOT
)/lib
/main
/CMSIS
/DSP
207 DEVICE_FLAGS
+= -DARM_MATH_MATRIX_CHECK
-DARM_MATH_ROUNDING
-D__FPU_PRESENT
=1 -DUNALIGNED_SUPPORT_DISABLE
-DARM_MATH_CM7