aboutsummaryrefslogtreecommitdiffstats
path: root/support/make
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2015-03-02 23:54:43 -0800
committerbnewbold <bnewbold@robocracy.org>2015-03-03 00:14:43 -0800
commitc5d73925fcc06ec03fe21b290e2783e3e07ba9f1 (patch)
tree55189ea357846b3af921bfca24fdaa15336b024a /support/make
parent2b6d1cd0fa25b1ea2a8068182d9d14ec7e70ccfa (diff)
downloadlibrambutan-c5d73925fcc06ec03fe21b290e2783e3e07ba9f1.tar.gz
librambutan-c5d73925fcc06ec03fe21b290e2783e3e07ba9f1.zip
stm32f4: series-specific linker flags
Also refactors STM32F2-F4 linker files into sub-series directories.
Diffstat (limited to 'support/make')
-rw-r--r--support/make/target-config.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/support/make/target-config.mk b/support/make/target-config.mk
index ac5845d..9f7ce7b 100644
--- a/support/make/target-config.mk
+++ b/support/make/target-config.mk
@@ -46,16 +46,18 @@ TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
LD_SERIES_PATH := $(LD_SERIES_PATH)/$(MCU_F1_LINE)
endif
ifeq ($(MCU_SERIES), stm32f2)
+LD_SERIES_PATH := $(LD_SERIES_PATH)/stm32f2
TARGET_FLAGS += -mcpu=cortex-m3 -march=armv7-m
endif
ifeq ($(MCU_SERIES), stm32f4)
TARGET_FLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16
+LD_SERIES_PATH := $(LD_SERIES_PATH)/$(MCU_F4_LINE)
endif
TARGET_LDFLAGS += -Xlinker -T$(LD_SCRIPT_PATH) \
-L $(LD_SERIES_PATH) \
-L $(LD_MEM_PATH) \
- -L $(LDDIR)
+ -L $(LDDIR) $(TARGET_FLAGS) -mthumb
TARGET_FLAGS += -mthumb -DBOARD_$(BOARD) -DMCU_$(MCU) \
-DERROR_LED_PORT=$(ERROR_LED_PORT) \
-DERROR_LED_PIN=$(ERROR_LED_PIN) \