aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/ld/stm32/series/stm32f2-f4/vector_symbols.inc (renamed from support/ld/stm32/series/stm32f2/vector_symbols.inc)0
-rw-r--r--support/make/target-config.mk22
2 files changed, 15 insertions, 7 deletions
diff --git a/support/ld/stm32/series/stm32f2/vector_symbols.inc b/support/ld/stm32/series/stm32f2-f4/vector_symbols.inc
index d275ec3..d275ec3 100644
--- a/support/ld/stm32/series/stm32f2/vector_symbols.inc
+++ b/support/ld/stm32/series/stm32f2-f4/vector_symbols.inc
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index 0e3a2c2..ac5845d 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -24,17 +24,27 @@ include $(BOARD_INCLUDE_DIR)/$(BOARD).mk
# Configuration derived from $(BOARD).mk
-LD_SERIES_PATH := $(LDDIR)/stm32/series/$(MCU_SERIES)
+TARGET_SERIES_MODULE := $(MCU_SERIES)
+
+# Override TARGET_SERIES_MODULE for STM32F2 and STM32F4, which are
+# basically the same and thus share a module.
+ifeq ($(MCU_SERIES), stm32f2)
+TARGET_SERIES_MODULE := stm32f2-f4
+endif
+ifeq ($(MCU_SERIES), stm32f4)
+TARGET_SERIES_MODULE := stm32f2-f4
+endif
+
+LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(TARGET_SERIES_MODULE)
+LD_SERIES_PATH := $(LDDIR)/stm32/series/$(TARGET_SERIES_MODULE)
LD_MEM_PATH := $(LDDIR)/stm32/mem/$(LD_MEM_DIR)
+
ifeq ($(MCU_SERIES), stm32f1)
+TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
# Due to the Balkanization on F1, we need to specify the line when
# making linker decisions.
LD_SERIES_PATH := $(LD_SERIES_PATH)/$(MCU_F1_LINE)
endif
-
-ifeq ($(MCU_SERIES), stm32f1)
-TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
-endif
ifeq ($(MCU_SERIES), stm32f2)
TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
endif
@@ -50,5 +60,3 @@ TARGET_FLAGS += -mthumb -DBOARD_$(BOARD) -DMCU_$(MCU) \
-DERROR_LED_PORT=$(ERROR_LED_PORT) \
-DERROR_LED_PIN=$(ERROR_LED_PIN) \
-D$(VECT_BASE_ADDR)
-
-LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(MCU_SERIES)