aboutsummaryrefslogtreecommitdiffstats
path: root/support/make
diff options
context:
space:
mode:
Diffstat (limited to 'support/make')
-rw-r--r--support/make/board-includes/robotis_cm900.mk (renamed from support/make/board-includes/cm900.mk)0
-rw-r--r--support/make/board-includes/robotis_opencm904.mk (renamed from support/make/board-includes/opencm904.mk)0
-rw-r--r--support/make/board-includes/st_nucleo_f103rb.mk (renamed from support/make/board-includes/nucleo.mk)0
-rw-r--r--support/make/board-includes/st_stm32f401cdiscovery.mk7
-rw-r--r--support/make/board-includes/st_stm32vldiscovery.mk (renamed from support/make/board-includes/VLDiscovery.mk)0
-rw-r--r--support/make/target-config.mk29
6 files changed, 27 insertions, 9 deletions
diff --git a/support/make/board-includes/cm900.mk b/support/make/board-includes/robotis_cm900.mk
index 9f70a1b..9f70a1b 100644
--- a/support/make/board-includes/cm900.mk
+++ b/support/make/board-includes/robotis_cm900.mk
diff --git a/support/make/board-includes/opencm904.mk b/support/make/board-includes/robotis_opencm904.mk
index 64d3351..64d3351 100644
--- a/support/make/board-includes/opencm904.mk
+++ b/support/make/board-includes/robotis_opencm904.mk
diff --git a/support/make/board-includes/nucleo.mk b/support/make/board-includes/st_nucleo_f103rb.mk
index a2943ce..a2943ce 100644
--- a/support/make/board-includes/nucleo.mk
+++ b/support/make/board-includes/st_nucleo_f103rb.mk
diff --git a/support/make/board-includes/st_stm32f401cdiscovery.mk b/support/make/board-includes/st_stm32f401cdiscovery.mk
new file mode 100644
index 0000000..6eb584f
--- /dev/null
+++ b/support/make/board-includes/st_stm32f401cdiscovery.mk
@@ -0,0 +1,7 @@
+MCU := STM32F401VC
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOD
+ERROR_LED_PIN := 12
+MCU_SERIES := stm32f4
+MCU_F4_LINE := dynamic_efficiency
+LD_MEM_DIR := sram_64k_flash_256k
diff --git a/support/make/board-includes/VLDiscovery.mk b/support/make/board-includes/st_stm32vldiscovery.mk
index 76cd85a..76cd85a 100644
--- a/support/make/board-includes/VLDiscovery.mk
+++ b/support/make/board-includes/st_stm32vldiscovery.mk
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index 0e3a2c2..68cddbf 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -24,31 +24,42 @@ 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)
+LD_SERIES_PATH := $(LD_SERIES_PATH)/stm32f2
TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
endif
ifeq ($(MCU_SERIES), stm32f4)
-TARGET_FLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16
+LD_SERIES_PATH := $(LD_SERIES_PATH)/$(MCU_F4_LINE)
+TARGET_FLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard \
+ -mfpu=fpv4-sp-d16 -fsingle-precision-constant -Wdouble-promotion
endif
TARGET_LDFLAGS += -Xlinker -T$(LD_SCRIPT_PATH) \
-L $(LD_SERIES_PATH) \
-L $(LD_MEM_PATH) \
- -L $(LDDIR)
+ -L $(LDDIR) $(TARGET_FLAGS) -mthumb
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)