diff options
-rw-r--r-- | libmaple/stm32f2-f4/adc.c (renamed from libmaple/stm32f2/adc.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/dma.c (renamed from libmaple/stm32f2/dma.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/exti.c (renamed from libmaple/stm32f2/exti.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/fsmc.c (renamed from libmaple/stm32f2/fsmc.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/gpio.c (renamed from libmaple/stm32f2/gpio.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/i2c.c (renamed from libmaple/stm32f2/i2c.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/adc.h (renamed from libmaple/stm32f2/include/series/adc.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/dac.h (renamed from libmaple/stm32f2/include/series/dac.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/dma.h (renamed from libmaple/stm32f2/include/series/dma.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/exti.h (renamed from libmaple/stm32f2/include/series/exti.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/flash.h (renamed from libmaple/stm32f2/include/series/flash.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/gpio.h (renamed from libmaple/stm32f2/include/series/gpio.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/i2c.h (renamed from libmaple/stm32f2/include/series/i2c.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/nvic.h (renamed from libmaple/stm32f2/include/series/nvic.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/pwr.h (renamed from libmaple/stm32f2/include/series/pwr.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/rcc.h (renamed from libmaple/stm32f2/include/series/rcc.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/spi.h (renamed from libmaple/stm32f2/include/series/spi.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/stm32.h (renamed from libmaple/stm32f2/include/series/stm32.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/timer.h (renamed from libmaple/stm32f2/include/series/timer.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/include/series/usart.h (renamed from libmaple/stm32f2/include/series/usart.h) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/isrs.S (renamed from libmaple/stm32f2/isrs.S) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/rcc.c (renamed from libmaple/stm32f2/rcc.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/rules.mk (renamed from libmaple/stm32f2/rules.mk) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/spi.c (renamed from libmaple/stm32f2/spi.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/syscfg.c (renamed from libmaple/stm32f2/syscfg.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/timer.c (renamed from libmaple/stm32f2/timer.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/usart.c (renamed from libmaple/stm32f2/usart.c) | 0 | ||||
-rw-r--r-- | libmaple/stm32f2-f4/vector_table.S (renamed from libmaple/stm32f2/vector_table.S) | 0 | ||||
-rw-r--r-- | support/ld/stm32/series/stm32f2-f4/vector_symbols.inc (renamed from support/ld/stm32/series/stm32f2/vector_symbols.inc) | 0 | ||||
-rw-r--r-- | support/make/target-config.mk | 22 | ||||
-rw-r--r-- | wirish/rules.mk | 17 | ||||
-rw-r--r-- | wirish/stm32f2-f4/boards_setup.cpp (renamed from wirish/stm32f2/boards_setup.cpp) | 0 | ||||
-rw-r--r-- | wirish/stm32f2-f4/util_hooks.c (renamed from wirish/stm32f2/util_hooks.c) | 0 | ||||
-rw-r--r-- | wirish/stm32f2-f4/wirish_debug.cpp (renamed from wirish/stm32f2/wirish_debug.cpp) | 0 | ||||
-rw-r--r-- | wirish/stm32f2-f4/wirish_digital.cpp (renamed from wirish/stm32f2/wirish_digital.cpp) | 0 |
35 files changed, 24 insertions, 15 deletions
diff --git a/libmaple/stm32f2/adc.c b/libmaple/stm32f2-f4/adc.c index a400d7b..a400d7b 100644 --- a/libmaple/stm32f2/adc.c +++ b/libmaple/stm32f2-f4/adc.c diff --git a/libmaple/stm32f2/dma.c b/libmaple/stm32f2-f4/dma.c index 26e87b9..26e87b9 100644 --- a/libmaple/stm32f2/dma.c +++ b/libmaple/stm32f2-f4/dma.c diff --git a/libmaple/stm32f2/exti.c b/libmaple/stm32f2-f4/exti.c index 208415f..208415f 100644 --- a/libmaple/stm32f2/exti.c +++ b/libmaple/stm32f2-f4/exti.c diff --git a/libmaple/stm32f2/fsmc.c b/libmaple/stm32f2-f4/fsmc.c index ec41720..ec41720 100644 --- a/libmaple/stm32f2/fsmc.c +++ b/libmaple/stm32f2-f4/fsmc.c diff --git a/libmaple/stm32f2/gpio.c b/libmaple/stm32f2-f4/gpio.c index a26edaa..a26edaa 100644 --- a/libmaple/stm32f2/gpio.c +++ b/libmaple/stm32f2-f4/gpio.c diff --git a/libmaple/stm32f2/i2c.c b/libmaple/stm32f2-f4/i2c.c index 42fd427..42fd427 100644 --- a/libmaple/stm32f2/i2c.c +++ b/libmaple/stm32f2-f4/i2c.c diff --git a/libmaple/stm32f2/include/series/adc.h b/libmaple/stm32f2-f4/include/series/adc.h index 175fe11..175fe11 100644 --- a/libmaple/stm32f2/include/series/adc.h +++ b/libmaple/stm32f2-f4/include/series/adc.h diff --git a/libmaple/stm32f2/include/series/dac.h b/libmaple/stm32f2-f4/include/series/dac.h index 0a578ca..0a578ca 100644 --- a/libmaple/stm32f2/include/series/dac.h +++ b/libmaple/stm32f2-f4/include/series/dac.h diff --git a/libmaple/stm32f2/include/series/dma.h b/libmaple/stm32f2-f4/include/series/dma.h index 43bd1a2..43bd1a2 100644 --- a/libmaple/stm32f2/include/series/dma.h +++ b/libmaple/stm32f2-f4/include/series/dma.h diff --git a/libmaple/stm32f2/include/series/exti.h b/libmaple/stm32f2-f4/include/series/exti.h index 4643fcf..4643fcf 100644 --- a/libmaple/stm32f2/include/series/exti.h +++ b/libmaple/stm32f2-f4/include/series/exti.h diff --git a/libmaple/stm32f2/include/series/flash.h b/libmaple/stm32f2-f4/include/series/flash.h index a3c3933..a3c3933 100644 --- a/libmaple/stm32f2/include/series/flash.h +++ b/libmaple/stm32f2-f4/include/series/flash.h diff --git a/libmaple/stm32f2/include/series/gpio.h b/libmaple/stm32f2-f4/include/series/gpio.h index 4d0d98c..4d0d98c 100644 --- a/libmaple/stm32f2/include/series/gpio.h +++ b/libmaple/stm32f2-f4/include/series/gpio.h diff --git a/libmaple/stm32f2/include/series/i2c.h b/libmaple/stm32f2-f4/include/series/i2c.h index b231256..b231256 100644 --- a/libmaple/stm32f2/include/series/i2c.h +++ b/libmaple/stm32f2-f4/include/series/i2c.h diff --git a/libmaple/stm32f2/include/series/nvic.h b/libmaple/stm32f2-f4/include/series/nvic.h index dc03806..dc03806 100644 --- a/libmaple/stm32f2/include/series/nvic.h +++ b/libmaple/stm32f2-f4/include/series/nvic.h diff --git a/libmaple/stm32f2/include/series/pwr.h b/libmaple/stm32f2-f4/include/series/pwr.h index 96353a4..96353a4 100644 --- a/libmaple/stm32f2/include/series/pwr.h +++ b/libmaple/stm32f2-f4/include/series/pwr.h diff --git a/libmaple/stm32f2/include/series/rcc.h b/libmaple/stm32f2-f4/include/series/rcc.h index 441a5a8..441a5a8 100644 --- a/libmaple/stm32f2/include/series/rcc.h +++ b/libmaple/stm32f2-f4/include/series/rcc.h diff --git a/libmaple/stm32f2/include/series/spi.h b/libmaple/stm32f2-f4/include/series/spi.h index 7b9f94a..7b9f94a 100644 --- a/libmaple/stm32f2/include/series/spi.h +++ b/libmaple/stm32f2-f4/include/series/spi.h diff --git a/libmaple/stm32f2/include/series/stm32.h b/libmaple/stm32f2-f4/include/series/stm32.h index 180ab30..180ab30 100644 --- a/libmaple/stm32f2/include/series/stm32.h +++ b/libmaple/stm32f2-f4/include/series/stm32.h diff --git a/libmaple/stm32f2/include/series/timer.h b/libmaple/stm32f2-f4/include/series/timer.h index a7ac276..a7ac276 100644 --- a/libmaple/stm32f2/include/series/timer.h +++ b/libmaple/stm32f2-f4/include/series/timer.h diff --git a/libmaple/stm32f2/include/series/usart.h b/libmaple/stm32f2-f4/include/series/usart.h index 8936efa..8936efa 100644 --- a/libmaple/stm32f2/include/series/usart.h +++ b/libmaple/stm32f2-f4/include/series/usart.h diff --git a/libmaple/stm32f2/isrs.S b/libmaple/stm32f2-f4/isrs.S index 5baaf8b..5baaf8b 100644 --- a/libmaple/stm32f2/isrs.S +++ b/libmaple/stm32f2-f4/isrs.S diff --git a/libmaple/stm32f2/rcc.c b/libmaple/stm32f2-f4/rcc.c index 7fc7eb0..7fc7eb0 100644 --- a/libmaple/stm32f2/rcc.c +++ b/libmaple/stm32f2-f4/rcc.c diff --git a/libmaple/stm32f2/rules.mk b/libmaple/stm32f2-f4/rules.mk index 4c62cc2..4c62cc2 100644 --- a/libmaple/stm32f2/rules.mk +++ b/libmaple/stm32f2-f4/rules.mk diff --git a/libmaple/stm32f2/spi.c b/libmaple/stm32f2-f4/spi.c index cfd9995..cfd9995 100644 --- a/libmaple/stm32f2/spi.c +++ b/libmaple/stm32f2-f4/spi.c diff --git a/libmaple/stm32f2/syscfg.c b/libmaple/stm32f2-f4/syscfg.c index 19e932e..19e932e 100644 --- a/libmaple/stm32f2/syscfg.c +++ b/libmaple/stm32f2-f4/syscfg.c diff --git a/libmaple/stm32f2/timer.c b/libmaple/stm32f2-f4/timer.c index a85bea0..a85bea0 100644 --- a/libmaple/stm32f2/timer.c +++ b/libmaple/stm32f2-f4/timer.c diff --git a/libmaple/stm32f2/usart.c b/libmaple/stm32f2-f4/usart.c index 1472d13..1472d13 100644 --- a/libmaple/stm32f2/usart.c +++ b/libmaple/stm32f2-f4/usart.c diff --git a/libmaple/stm32f2/vector_table.S b/libmaple/stm32f2-f4/vector_table.S index 147e516..147e516 100644 --- a/libmaple/stm32f2/vector_table.S +++ b/libmaple/stm32f2-f4/vector_table.S diff --git a/support/ld/stm32/series/stm32f2/vector_symbols.inc b/support/ld/stm32/series/stm32f2-f4/vector_symbols.inc index d275ec3..d275ec3 100644 --- a/support/ld/stm32/series/stm32f2/vector_symbols.inc +++ b/support/ld/stm32/series/stm32f2-f4/vector_symbols.inc diff --git a/support/make/target-config.mk b/support/make/target-config.mk index 0e3a2c2..ac5845d 100644 --- a/support/make/target-config.mk +++ b/support/make/target-config.mk @@ -24,17 +24,27 @@ include $(BOARD_INCLUDE_DIR)/$(BOARD).mk # Configuration derived from $(BOARD).mk -LD_SERIES_PATH := $(LDDIR)/stm32/series/$(MCU_SERIES) +TARGET_SERIES_MODULE := $(MCU_SERIES) + +# Override TARGET_SERIES_MODULE for STM32F2 and STM32F4, which are +# basically the same and thus share a module. +ifeq ($(MCU_SERIES), stm32f2) +TARGET_SERIES_MODULE := stm32f2-f4 +endif +ifeq ($(MCU_SERIES), stm32f4) +TARGET_SERIES_MODULE := stm32f2-f4 +endif + +LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(TARGET_SERIES_MODULE) +LD_SERIES_PATH := $(LDDIR)/stm32/series/$(TARGET_SERIES_MODULE) LD_MEM_PATH := $(LDDIR)/stm32/mem/$(LD_MEM_DIR) + ifeq ($(MCU_SERIES), stm32f1) +TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m # 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 - -ifeq ($(MCU_SERIES), stm32f1) -TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m -endif ifeq ($(MCU_SERIES), stm32f2) TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m endif @@ -50,5 +60,3 @@ TARGET_FLAGS += -mthumb -DBOARD_$(BOARD) -DMCU_$(MCU) \ -DERROR_LED_PORT=$(ERROR_LED_PORT) \ -DERROR_LED_PIN=$(ERROR_LED_PIN) \ -D$(VECT_BASE_ADDR) - -LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(MCU_SERIES) diff --git a/wirish/rules.mk b/wirish/rules.mk index 1cac74a..3a1fb81 100644 --- a/wirish/rules.mk +++ b/wirish/rules.mk @@ -4,12 +4,13 @@ dirstack_$(sp) := $(d) d := $(dir) BUILDDIRS += $(BUILD_PATH)/$(d) -# Add board directory and MCU-specific directory to BUILDDIRS. These -# are in subdirectories, but they're logically part of the Wirish -# submodule. +# Add board directory and target-specific directory to +# BUILDDIRS. These are in subdirectories, but they're logically part +# of the Wirish submodule. That's a bit inconsistent with libmaple +# proper, and should be fixed. WIRISH_BOARD_PATH := boards/$(BOARD) BUILDDIRS += $(BUILD_PATH)/$(d)/$(WIRISH_BOARD_PATH) -BUILDDIRS += $(BUILD_PATH)/$(d)/$(MCU_SERIES) +BUILDDIRS += $(BUILD_PATH)/$(d)/$(TARGET_SERIES_MODULE) # Safe includes for Wirish. WIRISH_INCLUDES := -I$(d)/include -I$(d)/$(WIRISH_BOARD_PATH)/include @@ -21,7 +22,7 @@ CFLAGS_$(d) := $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -I$(d) sSRCS_$(d) := start.S cSRCS_$(d) := start_c.c cSRCS_$(d) += syscalls.c -cSRCS_$(d) += $(MCU_SERIES)/util_hooks.c +cSRCS_$(d) += $(TARGET_SERIES_MODULE)/util_hooks.c cppSRCS_$(d) := boards.cpp cppSRCS_$(d) += cxxabi-compat.cpp cppSRCS_$(d) += ext_interrupts.cpp @@ -38,9 +39,9 @@ cppSRCS_$(d) += wirish_digital.cpp cppSRCS_$(d) += wirish_math.cpp cppSRCS_$(d) += wirish_shift.cpp cppSRCS_$(d) += wirish_time.cpp -cppSRCS_$(d) += $(MCU_SERIES)/boards_setup.cpp -cppSRCS_$(d) += $(MCU_SERIES)/wirish_digital.cpp -cppSRCS_$(d) += $(MCU_SERIES)/wirish_debug.cpp +cppSRCS_$(d) += $(TARGET_SERIES_MODULE)/boards_setup.cpp +cppSRCS_$(d) += $(TARGET_SERIES_MODULE)/wirish_digital.cpp +cppSRCS_$(d) += $(TARGET_SERIES_MODULE)/wirish_debug.cpp cppSRCS_$(d) += $(WIRISH_BOARD_PATH)/board.cpp sFILES_$(d) := $(sSRCS_$(d):%=$(d)/%) diff --git a/wirish/stm32f2/boards_setup.cpp b/wirish/stm32f2-f4/boards_setup.cpp index 5764dd0..5764dd0 100644 --- a/wirish/stm32f2/boards_setup.cpp +++ b/wirish/stm32f2-f4/boards_setup.cpp diff --git a/wirish/stm32f2/util_hooks.c b/wirish/stm32f2-f4/util_hooks.c index 1b519ab..1b519ab 100644 --- a/wirish/stm32f2/util_hooks.c +++ b/wirish/stm32f2-f4/util_hooks.c diff --git a/wirish/stm32f2/wirish_debug.cpp b/wirish/stm32f2-f4/wirish_debug.cpp index af6c78b..af6c78b 100644 --- a/wirish/stm32f2/wirish_debug.cpp +++ b/wirish/stm32f2-f4/wirish_debug.cpp diff --git a/wirish/stm32f2/wirish_digital.cpp b/wirish/stm32f2-f4/wirish_digital.cpp index 4d46f1c..4d46f1c 100644 --- a/wirish/stm32f2/wirish_digital.cpp +++ b/wirish/stm32f2-f4/wirish_digital.cpp |