From a5175b3e54581f1da11d607faf5739a35c0d9041 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Tue, 1 Aug 2017 14:39:28 +0200 Subject: [PATCH] stm32f0: add support for stm32flash tool --- scripts/Makefile.stm32f0 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/Makefile.stm32f0 b/scripts/Makefile.stm32f0 index 6b33d73..4e416b2 100644 --- a/scripts/Makefile.stm32f0 +++ b/scripts/Makefile.stm32f0 @@ -33,6 +33,12 @@ $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a: $(BUILD)/tbm: $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a +$(BUILD)/tbm.bin: $(BUILD)/tbm + $(PREFIX)objcopy -Obinary $< $@ + +$(BUILD)/tbm.hex: $(BUILD)/tbm + $(PREFIX)objcopy -Oihex $< $@ + run: $(BUILD)/tbm @echo "GDB $<" @$(GDB) --batch \ @@ -40,4 +46,7 @@ run: $(BUILD)/tbm -x flash.scr \ $< +flash: $(BUILD)/tbm.bin + stm32flash -g 0x8000000 -w $< $(STM32_PORT) + .PHONY: run