aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-13 01:32:09 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-09-13 02:22:15 -0400
commitaf9c6c9f7143067fb48f5bb3eb1474003dcb5017 (patch)
tree777805f9533b7e8712a6818f4710881551e6dde1 /support
parent4ae5f1d1818b6c00d49c00393b4b4339b3c72c48 (diff)
downloadlibrambutan-af9c6c9f7143067fb48f5bb3eb1474003dcb5017.tar.gz
librambutan-af9c6c9f7143067fb48f5bb3eb1474003dcb5017.zip
[make] Factor out target/board configuration.
Comment the Makefile more verbosely. It's been causing confusion on the forums. Add target-config.mk, this contains build configuration depending on the BOARD and MEMORY_TARGET variables. Its contents were cluttering up the Makefile and making it harder to read.
Diffstat (limited to 'support')
-rw-r--r--support/make/target-config.mk56
1 files changed, 56 insertions, 0 deletions
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
new file mode 100644
index 0000000..a30a5da
--- /dev/null
+++ b/support/make/target-config.mk
@@ -0,0 +1,56 @@
+# Board-specific configuration values. Flash and SRAM sizes in bytes.
+
+ifeq ($(BOARD), maple)
+ MCU := STM32F103RB
+ PRODUCT_ID := 0003
+ ERROR_LED_PORT := GPIOA
+ ERROR_LED_PIN := 5
+ DENSITY := STM32_MEDIUM_DENSITY
+ FLASH_SIZE := 131072
+ SRAM_SIZE := 20480
+endif
+
+ifeq ($(BOARD), maple_native)
+ MCU := STM32F103ZE
+ PRODUCT_ID := 0003
+ ERROR_LED_PORT := GPIOC
+ ERROR_LED_PIN := 15
+ DENSITY := STM32_HIGH_DENSITY
+ FLASH_SIZE := 524288
+ SRAM_SIZE := 65536
+endif
+
+ifeq ($(BOARD), maple_mini)
+ MCU := STM32F103CB
+ PRODUCT_ID := 0003
+ ERROR_LED_PORT := GPIOB
+ ERROR_LED_PIN := 1
+ DENSITY := STM32_MEDIUM_DENSITY
+ FLASH_SIZE := 131072
+ SRAM_SIZE := 20480
+endif
+
+ifeq ($(BOARD), maple_RET6)
+ MCU := STM32F103RE
+ PRODUCT_ID := 0003
+ ERROR_LED_PORT := GPIOA
+ ERROR_LED_PIN := 5
+ DENSITY := STM32_HIGH_DENSITY
+ FLASH_SIZE := 524288
+ SRAM_SIZE := 65536
+endif
+
+# Memory target-specific configuration values
+
+ifeq ($(MEMORY_TARGET), ram)
+ LDSCRIPT := $(BOARD)/ram.ld
+ VECT_BASE_ADDR := VECT_TAB_RAM
+endif
+ifeq ($(MEMORY_TARGET), flash)
+ LDSCRIPT := $(BOARD)/flash.ld
+ VECT_BASE_ADDR := VECT_TAB_FLASH
+endif
+ifeq ($(MEMORY_TARGET), jtag)
+ LDSCRIPT := $(BOARD)/jtag.ld
+ VECT_BASE_ADDR := VECT_TAB_BASE
+endif