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

makefiles/serial.inc.mk: define a default port for linux/darwin

This commit is contained in:
Alexandre Abadie 2020-11-20 10:59:18 +01:00
parent 4c290e1f92
commit 83bbe00d62
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -1,8 +1,12 @@
# Use as default the most commonly used ports on Linux and OSX
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# set default port depending on operating system
ifeq ($(OS),Linux)
PORT ?= $(call ensure_value,$(PORT_LINUX),No port set)
PORT ?= $(PORT_LINUX)
else ifeq ($(OS),Darwin)
PORT ?= $(call ensure_value,$(PORT_DARWIN),No port set)
PORT ?= $(PORT_DARWIN)
endif
# Default PROG_DEV is the same as PORT