2 # Rules to (help) build the F10x device support.
5 # Directory containing this makefile
6 PIOS_DEVLIB
:= $(dir $(lastword
$(MAKEFILE_LIST
)))
8 # Linker scripts path (contains board-specific scripts)
9 LINKER_SCRIPTS_PATH
= $(PIOS_DEVLIB
)
11 # Compiler options implied by the F10x
12 CDEFS
+= -DSTM32F10X
-DSTM32F10X_
$(MODEL
)
13 CDEFS
+= -DUSE_STDPERIPH_DRIVER
14 CDEFS
+= -DARM_MATH_CM3
15 CDEFS
+= -DHSE_VALUE
=$(OSCILLATOR_FREQ
)
16 ARCHFLAGS
+= -mcpu
=cortex-m3
--specs
=nano.specs
18 # Board-specific startup files
19 ASRC
+= $(PIOS_DEVLIB
)startup_stm32f10x_
$(MODEL
)$(MODEL_SUFFIX
).S
21 # PIOS device library source and includes
22 SRC
+= $(sort $(wildcard $(PIOS_DEVLIB
)*.c
))
23 EXTRAINCDIRS
+= $(PIOS_DEVLIB
)inc
26 include $(PIOSCOMMON
)/libraries
/CMSIS
/library.mk
27 CMSIS_DEVICEDIR
= $(PIOS_DEVLIB
)libraries
/CMSIS
/Core
/CM3
28 EXTRAINCDIRS
+= $(CMSIS_DEVICEDIR
)
30 # ST Peripheral library
31 PERIPHLIB
= $(PIOS_DEVLIB
)libraries
/STM32F10x_StdPeriph_Driver
32 SRC
+= $(sort $(wildcard $(PERIPHLIB
)/src
/*.c
))
33 EXTRAINCDIRS
+= $(PERIPHLIB
)/inc
35 # ST USB Device library
36 USBDEVLIB
= $(PIOS_DEVLIB
)libraries
/STM32_USB-FS-Device_Driver
37 SRC
+= $(sort $(wildcard $(USBDEVLIB
)/src
/*.c
))
38 EXTRAINCDIRS
+= $(USBDEVLIB
)/inc
43 # If the application has included the generic FreeRTOS support, then add in
44 # the device-specific pieces of the code.
46 ifneq ($(FREERTOS_DIR
),)
47 FREERTOS_PORTDIR
:= $(FREERTOS_DIR
)
48 SRC
+= $(sort $(wildcard $(FREERTOS_PORTDIR
)/portable
/GCC
/ARM_CM3
/*.c
))
49 SRC
+= $(sort $(wildcard $(FREERTOS_DIR
)/portable
/MemMang
/heap_1.c
))
50 EXTRAINCDIRS
+= $(FREERTOS_PORTDIR
)/portable
/GCC
/ARM_CM3