added a make target stlink-flash to use the stlink on the stm32f4-disovery

This commit is contained in:
Thomas Waldecker 2012-09-06 11:33:01 +02:00
parent 11727f56c9
commit 5604182467

View File

@ -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