Skip to content

Commit

Permalink
[conf] set /dev/ttyACM0 as default BMP_PORT if FLASH_MODE=SWD
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Sep 18, 2012
1 parent 5cae44e commit 21946e4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions conf/Makefile.stm32
Expand Up @@ -268,7 +268,7 @@ BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_jtag_flash.

upload: $(OBJDIR)/$(TARGET).elf
@echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)"
@echo "Using Black Magic Probe with JTAG"
@echo "Using Black Magic Probe with JTAG on BMP_PORT $(BMP_PORT)"
@echo "Using GDB = $(GDB)"
@echo " BMP\t$<"
$(Q)$(GDB) --batch \
Expand All @@ -280,22 +280,17 @@ endif
# SWD flash mode
else ifeq ($(FLASH_MODE),SWD)
# only works if BMP_PORT is defined
ifneq ($(BMP_PORT),)
BMP_PORT ?= /dev/ttyACM0
BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_swd_flash.scr
upload: $(OBJDIR)/$(TARGET).elf
@echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)"
@echo "Using Black Magic Probe with SWD"
@echo "Using Black Magic Probe with SWD on BMP_PORT $(BMP_PORT)"
@echo "Using GDB = $(GDB)"
@echo " BMP\t$<"
$(Q)$(GDB) --batch \
-ex 'target extended-remote $(BMP_PORT)' \
-x $(BMP_UPLOAD_SCRIPT) \
$<
else
# print error if BMP_PORT not specified
upload:
@echo "BMP_PORT not specified for SWD flash mode"
endif
#
# no known flash mode
else
Expand Down

0 comments on commit 21946e4

Please sign in to comment.