6 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f303_
$(TARGET_FLASH_SIZE
)k_opbl.
ld
10 # note that there is no hardfault debugging startup file assembly handler for other platforms
11 ifeq ($(DEBUG_HARDFAULTS
),F3
)
12 CFLAGS
+= -DDEBUG_HARDFAULTS
13 MCU_COMMON_SRC
= startup_stm32f3_debug_hardfault_handler.S
15 MCU_COMMON_SRC
= startup_stm32f30x_md_gcc.S
18 STDPERIPH_DIR
= $(ROOT
)/lib
/main
/STM32F3
/Drivers
/STM32F30x_StdPeriph_Driver
19 STDPERIPH_SRC
= $(notdir $(wildcard $(STDPERIPH_DIR
)/src
/*.c
))
20 EXCLUDES
= stm32f30x_crc.c \
22 STARTUP_SRC
= startup_stm32f30x_md_gcc.S
24 STDPERIPH_SRC
:= $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC
))
25 DEVICE_STDPERIPH_SRC
= $(STDPERIPH_SRC
)
27 VPATH
:= $(VPATH
):$(CMSIS_DIR
)/Core
/Include
28 CMSIS_SRC
= $(notdir $(wildcard $(ROOT
)/lib
/main
/STM32F3
/Drivers
/CMSIS
/Device
/ST
/STM32F30x
/*.c
))
30 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
31 $(STDPERIPH_DIR
)/inc \
32 $(CMSIS_DIR
)/Core
/Include \
33 $(ROOT
)/lib
/main
/STM32F3
/Drivers
/CMSIS
/Device
/ST
/STM32F30x
35 ifneq ($(filter VCP
, $(FEATURES
)),)
36 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
40 VPATH
:= $(VPATH
):$(USBFS_DIR
)/src
42 DEVICE_STDPERIPH_SRC
:= $(DEVICE_STDPERIPH_SRC
)\
46 ifneq ($(filter SDCARD_SPI
, $(FEATURES
)),)
47 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
50 VPATH
:= $(VPATH
):$(FATFS_DIR
)
53 ifneq ($(filter SDCARD_SDIO
, $(FEATURES
)),)
54 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
57 VPATH
:= $(VPATH
):$(FATFS_DIR
)
61 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f303_
$(TARGET_FLASH_SIZE
)k.
ld
64 ARCH_FLAGS
= -mthumb
-mcpu
=cortex-m4
-mfloat-abi
=hard
-mfpu
=fpv4-sp-d16
-fsingle-precision-constant
-Wdouble-promotion
65 DEVICE_FLAGS
= -DSTM32F303xC
-DSTM32F303
75 drivers
/serial_usb_vcp.c \
80 startup
/system_stm32f30x.c \
81 drivers
/adc_stm32f30x.c \
82 drivers
/bus_i2c_stm32f30x.c \
83 drivers
/bus_i2c_timing.c \
84 drivers
/bus_spi_stdperiph.c \
86 drivers
/light_ws2811strip_stdperiph.c \
87 drivers
/transponder_ir_io_stdperiph.c \
88 drivers
/pwm_output_dshot.c \
89 drivers
/pwm_output_dshot_shared.c \
90 drivers
/serial_uart_stdperiph.c \
91 drivers
/serial_uart_stm32f30x.c \
92 drivers
/system_stm32f30x.c \
93 drivers
/timer_stm32f30x.c
95 DSP_LIB
:= $(ROOT
)/lib
/main
/CMSIS
/DSP
96 DEVICE_FLAGS
+= -DARM_MATH_MATRIX_CHECK
-DARM_MATH_ROUNDING
-D__FPU_PRESENT
=1 -DUNALIGNED_SUPPORT_DISABLE
-DARM_MATH_CM4