1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #5036 from jremmert-phytec-iot/serial_flash

pba-d-01-kw2x: enable support to flash board selected by its SERIAL no
This commit is contained in:
Oleg Hahm 2016-03-23 15:27:05 +01:00
commit f4cad45783

View File

@ -29,6 +29,18 @@ export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/kinetis_common/dist/check-fcfield-elf
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# Add board selector (USB serial) to OpenOCD options if specified.
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
# Usage: SERIAL="0200..." BOARD="pba-d-01-kw2x" make flash
ifneq (,$(SERIAL))
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
SERIAL_TTY = $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL))
ifeq (,$(SERIAL_TTY))
$(error Did not find a device with serial $(SERIAL))
endif
PORT_LINUX := $(SERIAL_TTY)
endif
# setup serial terminal
include $(RIOTBOARD)/Makefile.include.serial