File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ SRC += pios_usbhook.c
7070SRC += startup.c
7171SRC += vectors_stm32f4xx.c
7272
73- ifneq "$(findstring STM32F40_41xxx ,$(STM32_TYPE ) ) " ""
73+ ifneq "$(findstring STM32F405xx ,$(STM32_TYPE ) ) " ""
7474LINKER_SCRIPTS_BL = $(PIOS_DEVLIB ) /link_STM32F4xx_BL_memory.ld \
7575 $(PIOS_DEVLIB ) /link_STM32F4xx_sections.ld
7676else ifneq "$(findstring STM32F446xx,$(STM32_TYPE))" ""
@@ -140,6 +140,9 @@ ADEFS = -D__ASSEMBLY__
140140#
141141# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
142142CFLAGS += -D$(STM32_TYPE )
143+ ifneq ($(STM32_SUBTYPE ) ,)
144+ CFLAGS += -D$(STM32_SUBTYPE )
145+ endif
143146
144147CFLAGS += -gdwarf-2
145148CFLAGS += -Os -fconserve-stack
Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ PAYLOAD_FILE = $(ROOT_DIR)/build/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
8787# Place project-specific -D (define) and/or
8888# -U options for C here.
8989CDEFS += -D$(STM32_TYPE )
90+ ifneq ($(STM32_SUBTYPE ) ,)
91+ CDEFS += -D$(STM32_SUBTYPE )
92+ endif
9093CDEFS += -DSYSCLK_FREQ=$(SYSCLK_FREQ )
9194CDEFS += -DMEM_SIZE=$(FW_BANK_SIZE )
9295CDEFS += -DUSE_$(BOARD )
@@ -156,7 +159,7 @@ LDFLAGS += -Wl,--warn-common
156159LDFLAGS += -Wl,--fatal-warnings
157160
158161# Linker scripts
159- ifneq "$(findstring STM32F40_41xxx ,$(STM32_TYPE ) ) " ""
162+ ifneq "$(findstring STM32F405xx ,$(STM32_TYPE ) ) " ""
160163LINKER_SCRIPTS_APP = $(PIOS_DEVLIB ) /link_STM32F4xx_OP_memory.ld \
161164 $(PIOS_DEVLIB ) /link_STM32F4xx_sections.ld
162165else ifneq "$(findstring STM32F446xx,$(STM32_TYPE))" ""
You can’t perform that action at this time.
0 commit comments