6 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f103_
$(TARGET_FLASH_SIZE
)k_opbl.
ld
10 STDPERIPH_DIR
= $(ROOT
)/lib
/main
/STM32F1
/Drivers
/STM32F10x_StdPeriph_Driver
11 STDPERIPH_SRC
= $(notdir $(wildcard $(STDPERIPH_DIR
)/src
/*.c
))
12 EXCLUDES
= stm32f10x_crc.c \
15 STARTUP_SRC
= startup_stm32f10x_md_gcc.S
16 STDPERIPH_SRC
:= $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC
))
18 # Search path and source files for the CMSIS sources
19 VPATH
:= $(VPATH
):$(CMSIS_DIR
)/Core
/Include
:$(ROOT
)/lib
/main
/STM32F1
/Drivers
/CMSIS
/Device
/ST
/STM32F10x
20 CMSIS_SRC
= $(notdir $(wildcard $(ROOT
)/lib
/main
/STM32F1
/Drivers
/CMSIS
/Device
/ST
/STM32F10x
/*.c
))
22 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
23 $(STDPERIPH_DIR
)/inc \
24 $(CMSIS_DIR
)/Core
/Include \
25 $(ROOT
)/lib
/main
/STM32F1
/Drivers
/CMSIS
/Device
/ST
/STM32F10x
27 DEVICE_STDPERIPH_SRC
= $(STDPERIPH_SRC
)
29 ifneq ($(filter VCP
, $(FEATURES
)),)
30 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
34 VPATH
:= $(VPATH
):$(USBFS_DIR
)/src
36 DEVICE_STDPERIPH_SRC
:= $(DEVICE_STDPERIPH_SRC
) \
42 LD_SCRIPT
= $(LINKER_DIR
)/stm32_flash_f103_
$(TARGET_FLASH_SIZE
)k.
ld
45 ARCH_FLAGS
= -mthumb
-mcpu
=cortex-m3
47 ifeq ($(DEVICE_FLAGS
),)
48 DEVICE_FLAGS
= -DSTM32F10X_MD
50 DEVICE_FLAGS
+= -DSTM32F10X
60 drivers
/serial_usb_vcp.c \
64 drivers
/adc_stm32f10x.c \
65 drivers
/bus_i2c_stm32f10x.c \
66 drivers
/bus_spi_stdperiph.c \
69 drivers
/light_ws2811strip_stdperiph.c \
70 drivers
/serial_uart_stdperiph.c \
71 drivers
/serial_uart_stm32f10x.c \
72 drivers
/system_stm32f10x.c \
73 drivers
/timer_stm32f10x.c
78 OPTIMISE_DEFAULT
:= -Os
82 LTO_FLAGS
:= $(OPTIMISATION_BASE
) $(OPTIMISE_DEFAULT
)