Added selection of jtag serial number through make commandline.

This commit is contained in:
Piotr Esden-Tempski 2010-12-22 22:55:56 +01:00
parent 02f6c4a921
commit 7f15dd0fc2
1 changed files with 14 additions and 0 deletions

View File

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