aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2010-12-22 22:55:56 +0100
committerPiotr Esden-Tempski2010-12-22 22:55:56 +0100
commit7f15dd0fc2d268eb02f9649d625dd0e6f1069b42 (patch)
tree2e03da23cf755cdb8cce7debba421b0cb220f202
parent02f6c4a921b3376dfb07013a7cb6301ea7b8e942 (diff)
Added selection of jtag serial number through make commandline.
-rw-r--r--examples/Makefile.include14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/Makefile.include b/examples/Makefile.include
index 4916851..85c6638 100644
--- a/examples/Makefile.include
+++ b/examples/Makefile.include
@@ -93,6 +93,7 @@ clean:
@printf " CLEAN *.list\n"
$(Q)rm -f *.list
+ifeq ($(OOCD_SERIAL),)
%.flash: %.hex
@printf " FLASH $<\n"
@# IMPORTANT: Don't use "resume", only "reset" will work correctly!
@@ -103,5 +104,18 @@ clean:
-c "flash write_image $(*).hex" \
-c "reset" \
-c "shutdown" $(NULL)
+else
+%.flash: %.hex
+ @printf " FLASH $<\n"
+ @# IMPORTANT: Don't use "resume", only "reset" will work correctly!
+ $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
+ -f board/$(OOCD_BOARD).cfg \
+ -c "ft2232_serial $(OOCD_SERIAL)" \
+ -c "init" -c "reset init" \
+ -c "stm32x mass_erase 0" \
+ -c "flash write_image $(*).hex" \
+ -c "reset" \
+ -c "shutdown" $(NULL)
+endif
.PHONY: images clean