aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-11-21 17:12:45 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:52 -0400
commit35d55def21b78dc9f1416a19edd98b48c53754ee (patch)
tree7a8cf63294ce6801897480a2c308252d6606963c /support
parentdf223dde202f340f3885dafe60d1de22a13b27d9 (diff)
downloadlibrambutan-35d55def21b78dc9f1416a19edd98b48c53754ee.tar.gz
librambutan-35d55def21b78dc9f1416a19edd98b48c53754ee.zip
Rename GLOBAL_FLAGS to TARGET_FLAGS, remove from Makefile.
Move into target-config.mk. Build it up bit-by-bit as the build goes on. Repeat the DENSITY defines once per board in target-config.mk, since they don't make sense on STM32F2. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
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)