From d674b3a80c1fbcb5a10752e960e2399f51e5359c Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 17 Jan 2024 09:14:38 +0100 Subject: [PATCH] makefiles/tools/openocd.inc.mk: Improve transport handling Allow setting `OPENOCD_TRANSPORT` to `default` for when a transport to not explicitly set the transport. This is useful when the target or interface script already specify the transport. --- makefiles/tools/openocd.inc.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index f86c1bd4d9..4d01fb0174 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -13,7 +13,9 @@ RESET_FLAGS ?= reset ifneq (,$(OPENOCD_DEBUG_ADAPTER)) include $(RIOTMAKE)/tools/openocd-adapters/$(OPENOCD_DEBUG_ADAPTER).inc.mk - OPENOCD_ADAPTER_INIT += -c 'transport select $(OPENOCD_TRANSPORT)' + ifneq (default,$(OPENOCD_TRANSPORT)) + OPENOCD_ADAPTER_INIT += -c 'transport select $(OPENOCD_TRANSPORT)' + endif endif OPENOCD_CONFIG ?= $(BOARDDIR)/dist/openocd.cfg