mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/tools/serial.inc.mk: Use TTY_BOARD_FILTER
When `MOST_RECENT_PORT` is set to `1`, the most recently added USB serial is selected. This is a crude but surprisingly effective filter. However, for the CC2560-Launchpad this doesn't work, as it provides two USB serials. The first USB serial interface is the targeted UART bridge and the second controls the debugger. Since the second is added a tiny fraction after the first, this reliably selects the wrong interface. Allowing the board to filter USB serials first can avoid this issue. This is also useful as e.g. an STM Nucleo board can easily be told apart from an `samr21-xpro` or an nRF52840dk using such filters.
This commit is contained in:
parent
22aed458d5
commit
e706468a5a
@ -1,6 +1,7 @@
|
||||
# Select the most recently attached tty interface
|
||||
ifeq (1,$(MOST_RECENT_PORT))
|
||||
PORT ?= $(shell $(RIOTTOOLS)/usb-serial/ttys.py --most-recent --format path)
|
||||
TTYS_FLAGS := --most-recent --format path $(TTY_BOARD_FILTER)
|
||||
PORT ?= $(shell $(RIOTTOOLS)/usb-serial/ttys.py $(TTYS_FLAGS))
|
||||
endif
|
||||
# Otherwise, use as default the most commonly used ports on Linux and OSX
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
|
Loading…
Reference in New Issue
Block a user