aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--support/make/board-includes/maple.mk6
-rw-r--r--support/make/board-includes/maple_RET6.mk6
-rw-r--r--support/make/board-includes/maple_mini.mk6
-rw-r--r--support/make/board-includes/maple_native.mk6
-rw-r--r--support/make/board-includes/olimex_stm32_h103.mk6
-rw-r--r--support/make/target-config.mk48
6 files changed, 33 insertions, 45 deletions
diff --git a/support/make/board-includes/maple.mk b/support/make/board-includes/maple.mk
new file mode 100644
index 0000000..3c83ee7
--- /dev/null
+++ b/support/make/board-includes/maple.mk
@@ -0,0 +1,6 @@
+MCU := STM32F103RB
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOA
+ERROR_LED_PIN := 5
+DENSITY := STM32_MEDIUM_DENSITY
+TARGET_FLAGS += -D$(DENSITY)
diff --git a/support/make/board-includes/maple_RET6.mk b/support/make/board-includes/maple_RET6.mk
new file mode 100644
index 0000000..3f61867
--- /dev/null
+++ b/support/make/board-includes/maple_RET6.mk
@@ -0,0 +1,6 @@
+MCU := STM32F103RE
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOA
+ERROR_LED_PIN := 5
+DENSITY := STM32_HIGH_DENSITY
+TARGET_FLAGS += -D$(DENSITY)
diff --git a/support/make/board-includes/maple_mini.mk b/support/make/board-includes/maple_mini.mk
new file mode 100644
index 0000000..b1afa4f
--- /dev/null
+++ b/support/make/board-includes/maple_mini.mk
@@ -0,0 +1,6 @@
+MCU := STM32F103CB
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOB
+ERROR_LED_PIN := 1
+DENSITY := STM32_MEDIUM_DENSITY
+TARGET_FLAGS += -D$(DENSITY)
diff --git a/support/make/board-includes/maple_native.mk b/support/make/board-includes/maple_native.mk
new file mode 100644
index 0000000..555d71b
--- /dev/null
+++ b/support/make/board-includes/maple_native.mk
@@ -0,0 +1,6 @@
+MCU := STM32F103ZE
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOC
+ERROR_LED_PIN := 15
+DENSITY := STM32_HIGH_DENSITY
+TARGET_FLAGS += -D$(DENSITY)
diff --git a/support/make/board-includes/olimex_stm32_h103.mk b/support/make/board-includes/olimex_stm32_h103.mk
new file mode 100644
index 0000000..6b45c17
--- /dev/null
+++ b/support/make/board-includes/olimex_stm32_h103.mk
@@ -0,0 +1,6 @@
+MCU := STM32F103RB
+PRODUCT_ID := 0003
+ERROR_LED_PORT := GPIOC
+ERROR_LED_PIN := 12
+DENSITY := STM32_MEDIUM_DENSITY
+TARGET_FLAGS += -D$(DENSITY)
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index 2e360ea..fcedd3e 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -2,52 +2,10 @@
TARGET_FLAGS :=
-# Board-specific configuration values. Flash and SRAM sizes in bytes.
+# Board-specific configuration values. Punt these to board-specific
+# include files.
-ifeq ($(BOARD), maple)
- MCU := STM32F103RB
- PRODUCT_ID := 0003
- ERROR_LED_PORT := GPIOA
- ERROR_LED_PIN := 5
- DENSITY := STM32_MEDIUM_DENSITY
- TARGET_FLAGS += -D$(DENSITY)
-endif
-
-ifeq ($(BOARD), maple_native)
- MCU := STM32F103ZE
- PRODUCT_ID := 0003
- ERROR_LED_PORT := GPIOC
- ERROR_LED_PIN := 15
- DENSITY := STM32_HIGH_DENSITY
- TARGET_FLAGS += -D$(DENSITY)
-endif
-
-ifeq ($(BOARD), maple_mini)
- MCU := STM32F103CB
- PRODUCT_ID := 0003
- ERROR_LED_PORT := GPIOB
- ERROR_LED_PIN := 1
- DENSITY := STM32_MEDIUM_DENSITY
- TARGET_FLAGS += -D$(DENSITY)
-endif
-
-ifeq ($(BOARD), maple_RET6)
- MCU := STM32F103RE
- PRODUCT_ID := 0003
- ERROR_LED_PORT := GPIOA
- ERROR_LED_PIN := 5
- DENSITY := STM32_HIGH_DENSITY
- TARGET_FLAGS += -D$(DENSITY)
-endif
-
-ifeq ($(BOARD), olimex_stm32_h103)
- MCU := STM32F103RB
- PRODUCT_ID := 0003
- ERROR_LED_PORT := GPIOC
- ERROR_LED_PIN := 12
- DENSITY := STM32_MEDIUM_DENSITY
- TARGET_FLAGS += -D$(DENSITY)
-endif
+include $(MAKEDIR)/board-includes/$(BOARD).mk
TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \
-DERROR_LED_PORT=$(ERROR_LED_PORT) \