aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/make/target-config.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index 1ca6057..ea81b3b 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -1,3 +1,7 @@
+# TARGET_FLAGS are to be passed while compiling, assembling, linking.
+
+TARGET_FLAGS :=
+
# Board-specific configuration values. Flash and SRAM sizes in bytes.
ifeq ($(BOARD), maple)
@@ -6,6 +10,7 @@ ifeq ($(BOARD), maple)
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
DENSITY := STM32_MEDIUM_DENSITY
+ TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_native)
@@ -14,6 +19,7 @@ ifeq ($(BOARD), maple_native)
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 15
DENSITY := STM32_HIGH_DENSITY
+ TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_mini)
@@ -22,6 +28,7 @@ ifeq ($(BOARD), maple_mini)
ERROR_LED_PORT := GPIOB
ERROR_LED_PIN := 1
DENSITY := STM32_MEDIUM_DENSITY
+ TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_RET6)
@@ -30,6 +37,7 @@ ifeq ($(BOARD), maple_RET6)
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
DENSITY := STM32_HIGH_DENSITY
+ TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), olimex_stm32_h103)
@@ -38,8 +46,13 @@ ifeq ($(BOARD), olimex_stm32_h103)
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 12
DENSITY := STM32_MEDIUM_DENSITY
+ TARGET_FLAGS += -D$(DENSITY)
endif
+TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \
+ -DERROR_LED_PORT=$(ERROR_LED_PORT) \
+ -DERROR_LED_PIN=$(ERROR_LED_PIN)
+
# STM32 family-specific configuration values.
# NB: these only work for STM32F1 performance line chips, but those
@@ -63,3 +76,5 @@ ifeq ($(MEMORY_TARGET), jtag)
LDSCRIPT := $(BOARD)/jtag.ld
VECT_BASE_ADDR := VECT_TAB_BASE
endif
+
+TARGET_FLAGS += -D$(VECT_BASE_ADDR)