mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 14:03:55 +01:00
Merge pull request #21523 from maribu/build-system/openocd/tigard/tty-detection
build-sytem/openocd: detect serial port TTY
This commit is contained in:
commit
b1296afe58
@ -450,6 +450,9 @@ include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
# include global Makefile.include for `boards` modules
|
||||
include $(RIOTBASE)/boards/Makefile.include
|
||||
|
||||
# Include common programmer logic if available
|
||||
-include $(RIOTMAKE)/tools/$(PROGRAMMER).inc.mk
|
||||
|
||||
# Include common serial logic to define TERMPROG, TERMFLAGS variables based on
|
||||
# the content of RIOT_TERMINAL
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
@ -463,9 +466,6 @@ ifeq (1,$(EMULATE))
|
||||
DEBUGDEPS += $(EMULATORDEPS)
|
||||
endif
|
||||
|
||||
# Include common programmer logic if available
|
||||
-include $(RIOTMAKE)/tools/$(PROGRAMMER).inc.mk
|
||||
|
||||
# Check if programmer is supported by the board, only if PROGRAMMERS_SUPPORTED
|
||||
# is set and if programmer is not iotlab
|
||||
ifneq ($(RIOT_CI_BUILD),1)
|
||||
|
||||
@ -18,3 +18,22 @@ ifeq (swd, $(OPENOCD_TRANSPORT))
|
||||
OPENOCD_ADAPTER_INIT += -c 'ftdi layout_signal SWD_EN -data 0'
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (tigard,$(OPENOCD_FTDI_ADAPTER))
|
||||
# The Tigard provides both (bitbanging) SWD/JTAG debugger and UART adapter.
|
||||
# When freshly connected, the Tigard will provide to UART interface, of
|
||||
# which the first will be used for UART and the second be reconfigured for
|
||||
# bit-banging JTAG/SWD. We assume the UART of the Tigard is used for serial
|
||||
# by default.
|
||||
TTY_BOARD_FILTER ?= --model 'Tigard V1' --iface-num 0
|
||||
|
||||
# The debug adapter and the UART adapter are the same device, so they have
|
||||
# the same serial number
|
||||
DEBUG_ADAPTER_ID_IS_TTY_SERIAL ?= 1
|
||||
|
||||
# If the user provided a programmer serial, we also use that to detect the
|
||||
# TTY.
|
||||
ifneq (,$(SERIAL))
|
||||
TTY_SELECT_CMD += --serial "$(SERIAL)"
|
||||
endif
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user