From 19290fe8b7b45cd6274bfe5d96ae6ca59ab25323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 2 Sep 2019 14:21:11 +0200 Subject: [PATCH] boards/pba-d-01-kw2x: rely on the common adapter selection code Do not set 'OPENOCD_EXTRA_INIT' but rely on 'openocd/openocd-adapters/dap.inc.mk' to select the adapter. Using 'OPENOCD_EXTRA_INIT' for this was deprecated. When 'DEBUG_ADAPTER_ID' was set it was already the case but not with 'SERIAL'. The compatibility with using 'SERIAL' is maintained. --- boards/pba-d-01-kw2x/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index a98603a903..7e05adc1d2 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -9,7 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) export OPENOCD_PRE_VERIFY_CMDS += \ -c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \ -c 'resume 0x20000000' -export OPENOCD_EXTRA_INIT export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh DEBUG_ADAPTER ?= dap @@ -18,7 +17,8 @@ DEBUG_ADAPTER ?= dap # 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)" + # Trigger adapter selection on SERIAL in 'openocd-adapters' + DEBUG_ADAPTER_ID ?= $(SERIAL) SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL))) ifeq (,$(SERIAL_TTY)) $(error Did not find a device with serial $(SERIAL))