1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/sam0: only fail on missing device with explicit targets

This commit is contained in:
Alexandre Abadie 2020-07-02 19:13:58 +02:00
parent 2ed76e2d45
commit c7189cfe99
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -5,15 +5,17 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# DEBUG_ADAPTER_ID="ATML..."
# The SERIAL setting is only available for backwards compatibility with older
# settings.
ifneq (,$(SERIAL))
EDBG_ARGS += --serial $(SERIAL)
SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL)))
ifeq (,$(SERIAL_TTY))
$(error Did not find a device with serial $(SERIAL))
# settings. It's only checked when a target is given to the make command.
ifneq (,$(filter debug% flash% %term test,$(MAKECMDGOALS)))
ifneq (,$(SERIAL))
EDBG_ARGS += --serial $(SERIAL)
SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL)))
ifeq (,$(SERIAL_TTY))
$(error Did not find a device with serial $(SERIAL))
endif
PORT_LINUX := $(SERIAL_TTY)
DEBUG_ADAPTER_ID ?= $(SERIAL)
endif
PORT_LINUX := $(SERIAL_TTY)
DEBUG_ADAPTER_ID ?= $(SERIAL)
endif
# setup serial terminal