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
13 CDEFS
+= -DUSE_STDPERIPH_DRIVER
14 CDEFS
+= -DARM_MATH_CM0
15 CDEFS
+= -DHSE_VALUE
=$(OSCILLATOR_FREQ
)
16 ARCHFLAGS
+= -mcpu
=cortex-m0
--specs
=nano.specs
18 # Board-specific startup files
19 ASRC
+= $(PIOS_DEVLIB
)startup_stm32f0
$(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
28 CMSIS_DEVICEDIR
= $(PIOS_DEVLIB
)libraries
/CMSIS
/Device
/ST
/STM32F0xx
/Source
29 CMSIS_DIR
= $(PIOS_DEVLIB
)/libraries
/CMSIS
/Include
30 EXTRAINCDIRS
+= $(CMSIS_DEVICEDIR
)/..
/Include
31 EXTRAINCDIRS
+= $(CMSIS_DIR
)
32 # ST Peripheral library
33 PERIPHLIB
= $(PIOS_DEVLIB
)libraries
/STM32F0xx_StdPeriph_Driver
34 SRC
+= $(sort $(wildcard $(PERIPHLIB
)/src
/*.c
))
35 EXTRAINCDIRS
+= $(PERIPHLIB
)/inc
40 # If the application has included the generic FreeRTOS support, then add in
41 # the device-specific pieces of the code.
43 ifneq ($(FREERTOS_DIR
),)
44 FREERTOS_PORTDIR
:= $(FREERTOS_DIR
)
45 SRC
+= $(sort $(wildcard $(FREERTOS_PORTDIR
)/portable
/GCC
/ARM_CM0
/*.c
))
46 SRC
+= $(sort $(wildcard $(FREERTOS_DIR
)/portable
/MemMang
/heap_1.c
))
47 EXTRAINCDIRS
+= $(FREERTOS_PORTDIR
)/portable
/GCC
/ARM_CM0