From 0e672da1e43eb9f230c7e02132a491d9ba2aa279 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Thu, 17 Oct 2019 09:18:14 +0200 Subject: [PATCH] boards/mulle: remove simple expansion of PORT --- boards/mulle/Makefile.include | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index 1fc475f3df..dc171e2488 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -5,33 +5,13 @@ endif # Default debug adapter choice is to use the Mulle programmer board DEBUG_ADAPTER ?= mulle -# Host OS name -OS := $(shell uname) # Fall back to PROGRAMMER_SERIAL for backwards compatibility DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL) -ifeq ($(PORT),) - # try to find tty name by serial number, only works on Linux currently. - ifeq ($(OS),Linux) - ifneq ($(DEBUG_ADAPTER_ID),) - PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(DEBUG_ADAPTER_ID)$$')) - else - # find-tty.sh will return the first USB tty if no serial is given. - PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh)) - endif - else ifeq ($(OS),Darwin) - ifneq ($(DEBUG_ADAPTER_ID),) - PORT := /dev/tty.usbserial-$(DEBUG_ADAPTER_ID)B - else - PORT := $(firstword $(sort $(wildcard /dev/tty.usbserial*))) - endif - endif -endif -ifeq ($(PORT),) - # fall back to a sensible default - PORT := /dev/ttyUSB0 -endif +# Define the default port depending on the host OS +PORT_LINUX ?= /dev/ttyUSB0 +PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) # We need special handling of the watchdog if we want to speed up the flash # verification by using the MCU to compute the image checksum after flashing.