2 # Rules to (help) build the F4xx device support.
6 # Directory containing this makefile
8 PIOS_DEVLIB
:= $(dir $(lastword
$(MAKEFILE_LIST
)))
11 # Hardcoded linker script names for now
13 #LINKER_SCRIPTS_APP = $(PIOS_DEVLIB)/link_stm32f4xx_OP_memory.ld \
14 $(PIOS_DEVLIB
)/link_stm32f4xx_sections.
ld
16 #LINKER_SCRIPTS_BL = $(PIOS_DEVLIB)/link_stm32f4xx_BL_memory.ld \
17 $(PIOS_DEVLIB
)/link_stm32f4xx_sections.
ld
20 # Compiler options implied by the F4xx
23 #CDEFS += -DHSE_VALUE=$(OSCILLATOR_FREQ)
24 #CDEFS += -DUSE_STDPERIPH_DRIVER
25 ARCHFLAGS
+= -DARCH_POSIX
28 # PIOS device library source and includes
30 SRC
+= $(sort $(wildcard $(PIOS_DEVLIB
)*.c
))
31 EXTRAINCDIRS
+= $(PIOS_DEVLIB
)/inc
36 #include $(PIOSCOMMONLIB)/CMSIS2/library.mk
37 #CMSIS2_DEVICEDIR := $(PIOS_DEVLIB)/libraries/CMSIS2/Device/ST/STM32F4xx
38 #SRC += $(wildcard $(CMSIS2_DEVICEDIR)/Source/*.c)
39 #EXTRAINCDIRS += $(CMSIS2_DEVICEDIR)/Include
42 # ST Peripheral library
44 #PERIPHLIB = $(PIOS_DEVLIB)/libraries/stm32f4xx_StdPeriph_Driver
45 #SRC += $(wildcard $(PERIPHLIB)/src/*.c)
46 #EXTRAINCDIRS += $(PERIPHLIB)/inc
51 #USBOTGLIB = $(PIOS_DEVLIB)/libraries/STM32_USB_OTG_Driver
52 #USBOTGLIB_SRC = usb_core.c usb_dcd.c usb_dcd_int.c
53 #SRC += $(addprefix $(USBOTGLIB)/src/,$(USBOTGLIB_SRC))
54 #EXTRAINCDIRS += $(USBOTGLIB)/inc
57 # ST USB Device library
59 #USBDEVLIB = $(PIOS_DEVLIB)/libraries/STM32_USB_Device_Library
60 #SRC += $(wildcard $(USBDEVLIB)/Core/src/*.c)
61 #EXTRAINCDIRS += $(USBDEVLIB)/Core/inc
66 # If the application has included the generic FreeRTOS support, then add in
67 # the device-specific pieces of the code.
69 ifneq ($(FREERTOS_DIR
),)
70 FREERTOS_PORTDIR
:= $(FREERTOS_DIR
)
71 SRC
+= $(sort $(wildcard $(FREERTOS_PORTDIR
)/portable
/GCC
/Posix
/*.c
))
72 SRC
+= $(sort $(wildcard $(FREERTOS_PORTDIR
)/portable
/MemMang
/heap_3.c
))
74 EXTRAINCDIRS
+= $(FREERTOS_PORTDIR
)/portable
/GCC
/Posix