From 35d55def21b78dc9f1416a19edd98b48c53754ee Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 21 Nov 2011 17:12:45 -0500 Subject: 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 --- support/make/target-config.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'support') 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) -- cgit v1.2.3