mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/tools/serial: ensure PORT is set and fail early.
By ensuring the PORT auto-detection worked, we can give meaningful error messages and fail earlier. This uses ensure_value from makefiles/utils/checks.mk. An include was added to Makefile.include to make this fuction available to all other makefiles.
This commit is contained in:
parent
63be700fa7
commit
fe9704dbd6
@ -106,6 +106,9 @@ OS := $(shell uname)
|
||||
# set python path, e.g. for tests
|
||||
PYTHONPATH := $(RIOTBASE)/dist/pythonlibs/:$(PYTHONPATH)
|
||||
|
||||
# Basic utilities included before anything else
|
||||
include $(RIOTMAKE)/utils/checks.mk
|
||||
|
||||
# Include Docker settings near the top because we need to build the environment
|
||||
# command line before some of the variable origins are overwritten below when
|
||||
# using abspath, strip etc.
|
||||
|
@ -1,12 +1,9 @@
|
||||
# set default port depending on operating system
|
||||
OS := $(shell uname)
|
||||
ifeq ($(OS),Linux)
|
||||
PORT ?= $(PORT_LINUX)
|
||||
PORT ?= $(call ensure_value,$(PORT_LINUX),No port set)
|
||||
else ifeq ($(OS),Darwin)
|
||||
PORT ?= $(PORT_DARWIN)
|
||||
endif
|
||||
ifeq ($(PORT),)
|
||||
$(info Warning: no PORT set!)
|
||||
PORT ?= $(call ensure_value,$(PORT_DARWIN),No port set)
|
||||
endif
|
||||
|
||||
export BAUD ?= 115200
|
||||
|
Loading…
Reference in New Issue
Block a user