Adding the option to target the upload to a specific board by board serial number.

i.e. make AIRCRAFT=LisaLv11_Booz2v12_RC BOARD_SERIAL=LISA000156 clean_ac ap.compile ap.upload
This commit is contained in:
Bernard Davison
2012-02-20 21:26:55 +11:00
parent a1a3dcf1f5
commit 6801d2919b
+4 -1
View File
@@ -82,6 +82,9 @@ OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_D
endif endif
endif endif
ifeq ($(BOARD_SERIAL),)
OOCD_OPTIONS = -c "ft2232_serial $(BOARD_SERIAL)"
endif
LOADER=/home/poine/work/stm32/stm32loader-a3c51c26ad6c/stm32loader.py LOADER=/home/poine/work/stm32/stm32loader-a3c51c26ad6c/stm32loader.py
@@ -258,7 +261,7 @@ upload: $(OBJDIR)/$(TARGET).elf
@echo "Using OOCD = $(OOCD)" @echo "Using OOCD = $(OOCD)"
@echo " OOCD\t$<" @echo " OOCD\t$<"
$(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \ $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
-f board/$(OOCD_BOARD).cfg \ -f board/$(OOCD_BOARD).cfg $(OOCD_OPTIONS) \
-c init \ -c init \
-c "reset halt" \ -c "reset halt" \
-c "reset init" \ -c "reset init" \