aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2012-09-10 12:29:37 -0700
committerPiotr Esden-Tempski2012-09-10 12:29:37 -0700
commit03807ddd6c3cef98054a9ef771decac6b7468bc4 (patch)
treeb57a6548346579bdd5847c3c77cef67a28b1e814
parent02ea612142fb93d43698b10502a05f6ccd2ec781 (diff)
parent5604182467119ac4a90175b050da64f1de9be146 (diff)
Merge pull request #27 "added a make target stlink-flash to use the stlink on the stm32f4-disovery"
Merge remote-tracking branch 'twaldecker/stlink'
-rw-r--r--examples/stm32/f4/Makefile.include6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include
index b5f0fac..b735aa6 100644
--- a/examples/stm32/f4/Makefile.include
+++ b/examples/stm32/f4/Makefile.include
@@ -26,6 +26,7 @@ LD = $(PREFIX)-gcc
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
GDB = $(PREFIX)-gdb
+FLASH = $(shell which st-flash)
ifeq ($(wildcard ../../../../../lib/libopencm3_stm32f4.a),)
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
else
@@ -103,6 +104,11 @@ clean:
$(Q)rm -f *.srec
$(Q)rm -f *.list
+%.stlink-flash: %.bin
+ @printf " FLASH $<\n"
+ $(Q)$(FLASH) write $(*).bin 0x8000000
+
+
ifeq ($(BMP_PORT),)
ifeq ($(OOCD_SERIAL),)
%.flash: %.hex