aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-03 06:00:41 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-03 22:40:39 -0400
commit378c3a70f81ddfbbddf3656977f81b7dfd8f96cd (patch)
tree0d2853cf5d739cdba5a596387e8709eb1969e185 /support
parentb522a442b805507e7a8fc93ba8011068b8b57d96 (diff)
downloadlibrambutan-378c3a70f81ddfbbddf3656977f81b7dfd8f96cd.tar.gz
librambutan-378c3a70f81ddfbbddf3656977f81b7dfd8f96cd.zip
Slightly improve and generify the USB infrastructure.
The good news is that <libmaple/usb.h> and <libmaple/usb_cdcacm.h> did turn out generic enough in what they specify to go on unchanged. However, we can't just go on assuming that there's USB just because we're on an F1. Now that there's value line in the tree, we need to be more careful (value line F1s don't have USB peripherals). To that end, make all the F1 board-includes/*.mk files specify what line their MCU is with an MCU_F1_LINE variable. Use that to hack libmaple/usb/rules.mk so we only try to build the USB module under appropriate circumstances. While we're at it, add a vector_symbols.inc for value line MCUs under support/ld/. We need this to get the target-config.mk modifications implied by the addition of MCU_F1_LINE. We'll fix up some other performance-line-isms under libmaple/stm32f1 in a separate commit. Also in libmaple/usb/: - Move everything into a new stm32f1 directory. Due to aforementioned rules.mk hacks, there is no immediate need for an stm32f2 directory (USB support doesn't exist there). - Update the README for style and content. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'support')
-rw-r--r--support/ld/stm32/series/stm32f1/value/vector_symbols.inc78
-rw-r--r--support/make/board-includes/VLDiscovery.mk1
-rw-r--r--support/make/board-includes/maple.mk1
-rw-r--r--support/make/board-includes/maple_RET6.mk1
-rw-r--r--support/make/board-includes/maple_mini.mk1
-rw-r--r--support/make/board-includes/maple_native.mk1
-rw-r--r--support/make/board-includes/olimex_stm32_h103.mk1
-rw-r--r--support/make/target-config.mk6
8 files changed, 87 insertions, 3 deletions
diff --git a/support/ld/stm32/series/stm32f1/value/vector_symbols.inc b/support/ld/stm32/series/stm32f1/value/vector_symbols.inc
new file mode 100644
index 0000000..f8726f9
--- /dev/null
+++ b/support/ld/stm32/series/stm32f1/value/vector_symbols.inc
@@ -0,0 +1,78 @@
+EXTERN(__msp_init)
+EXTERN(__exc_reset)
+EXTERN(__exc_nmi)
+EXTERN(__exc_hardfault)
+EXTERN(__exc_memmanage)
+EXTERN(__exc_busfault)
+EXTERN(__exc_usagefault)
+EXTERN(__stm32reservedexception7)
+EXTERN(__stm32reservedexception8)
+EXTERN(__stm32reservedexception9)
+EXTERN(__stm32reservedexception10)
+EXTERN(__exc_svc)
+EXTERN(__exc_debug_monitor)
+EXTERN(__stm32reservedexception13)
+EXTERN(__exc_pendsv)
+EXTERN(__exc_systick)
+
+EXTERN(__irq_wwdg)
+EXTERN(__irq_pvd)
+EXTERN(__irq_tamper)
+EXTERN(__irq_rtc)
+EXTERN(__irq_flash)
+EXTERN(__irq_rcc)
+EXTERN(__irq_exti0)
+EXTERN(__irq_exti1)
+EXTERN(__irq_exti2)
+EXTERN(__irq_exti3)
+EXTERN(__irq_exti4)
+EXTERN(__irq_dma1_channel1)
+EXTERN(__irq_dma1_channel2)
+EXTERN(__irq_dma1_channel3)
+EXTERN(__irq_dma1_channel4)
+EXTERN(__irq_dma1_channel5)
+EXTERN(__irq_dma1_channel6)
+EXTERN(__irq_dma1_channel7)
+EXTERN(__irq_adc1)
+EXTERN(__stm32reservedexception14)
+EXTERN(__stm32reservedexception15)
+EXTERN(__stm32reservedexception16)
+EXTERN(__stm32reservedexception17)
+EXTERN(__irq_exti9_5)
+EXTERN(__irq_tim1_brk)
+EXTERN(__irq_tim1_up)
+EXTERN(__irq_tim1_trg_com)
+EXTERN(__irq_tim1_cc)
+EXTERN(__irq_tim2)
+EXTERN(__irq_tim3)
+EXTERN(__irq_tim4)
+EXTERN(__irq_i2c1_ev)
+EXTERN(__irq_i2c1_er)
+EXTERN(__irq_i2c2_ev)
+EXTERN(__irq_i2c2_er)
+EXTERN(__irq_spi1)
+EXTERN(__irq_spi2)
+EXTERN(__irq_usart1)
+EXTERN(__irq_usart2)
+EXTERN(__irq_usart3)
+EXTERN(__irq_exti15_10)
+EXTERN(__irq_rtcalarm)
+EXTERN(__irq_cec)
+EXTERN(__irq_tim12)
+EXTERN(__irq_tim13)
+EXTERN(__irq_tim14)
+EXTERN(__stm32reservedexception18)
+EXTERN(__stm32reservedexception19)
+EXTERN(__irq_fsmc)
+EXTERN(__stm32reservedexception20)
+EXTERN(__irq_tim5)
+EXTERN(__irq_spi3)
+EXTERN(__irq_uart4)
+EXTERN(__irq_uart5)
+EXTERN(__irq_tim6)
+EXTERN(__irq_tim7)
+EXTERN(__irq_dma2_channel1)
+EXTERN(__irq_dma2_channel2)
+EXTERN(__irq_dma2_channel3)
+EXTERN(__irq_dma2_channel4_5)
+EXTERN(__irq_dma2_channel5) /* on remap only */
diff --git a/support/make/board-includes/VLDiscovery.mk b/support/make/board-includes/VLDiscovery.mk
index 82d1b23..441f078 100644
--- a/support/make/board-includes/VLDiscovery.mk
+++ b/support/make/board-includes/VLDiscovery.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 9
MCU_SERIES := stm32f1
+MCU_F1_LINE := value
diff --git a/support/make/board-includes/maple.mk b/support/make/board-includes/maple.mk
index d31ad83..4de4bab 100644
--- a/support/make/board-includes/maple.mk
+++ b/support/make/board-includes/maple.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
MCU_SERIES := stm32f1
+MCU_F1_LINE := performance
diff --git a/support/make/board-includes/maple_RET6.mk b/support/make/board-includes/maple_RET6.mk
index d06f068..104ae08 100644
--- a/support/make/board-includes/maple_RET6.mk
+++ b/support/make/board-includes/maple_RET6.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
MCU_SERIES := stm32f1
+MCU_F1_LINE := performance
diff --git a/support/make/board-includes/maple_mini.mk b/support/make/board-includes/maple_mini.mk
index 835adc3..70ef506 100644
--- a/support/make/board-includes/maple_mini.mk
+++ b/support/make/board-includes/maple_mini.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOB
ERROR_LED_PIN := 1
MCU_SERIES := stm32f1
+MCU_F1_LINE := performance
diff --git a/support/make/board-includes/maple_native.mk b/support/make/board-includes/maple_native.mk
index 3e88e7b..86746a6 100644
--- a/support/make/board-includes/maple_native.mk
+++ b/support/make/board-includes/maple_native.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 15
MCU_SERIES := stm32f1
+MCU_F1_LINE := performance
diff --git a/support/make/board-includes/olimex_stm32_h103.mk b/support/make/board-includes/olimex_stm32_h103.mk
index 96d6976..31f2c04 100644
--- a/support/make/board-includes/olimex_stm32_h103.mk
+++ b/support/make/board-includes/olimex_stm32_h103.mk
@@ -3,3 +3,4 @@ PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 12
MCU_SERIES := stm32f1
+MCU_F1_LINE := performance
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index 48a33de..e13504d 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -15,9 +15,9 @@ TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \
LD_SERIES_PATH := $(LDDIR)/stm32/series/$(MCU_SERIES)
ifeq ($(MCU_SERIES), stm32f1)
- # Hack: force F1 to performance line; this will need to change if
- # you add connectivity etc. line support.
- LD_SERIES_PATH := $(LD_SERIES_PATH)/performance
+# Due to the Balkanization on F1, we need to specify the line when
+# making linker decisions.
+LD_SERIES_PATH := $(LD_SERIES_PATH)/$(MCU_F1_LINE)
endif
LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(MCU_SERIES)