mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #12483 from fjmolinas/pr_mulle_PORT
boards/mulle: remove custom PORT handling
This commit is contained in:
commit
ad51f7d6b8
@ -5,33 +5,13 @@ endif
|
|||||||
|
|
||||||
# Default debug adapter choice is to use the Mulle programmer board
|
# Default debug adapter choice is to use the Mulle programmer board
|
||||||
DEBUG_ADAPTER ?= mulle
|
DEBUG_ADAPTER ?= mulle
|
||||||
# Host OS name
|
|
||||||
OS := $(shell uname)
|
|
||||||
|
|
||||||
# Fall back to PROGRAMMER_SERIAL for backwards compatibility
|
# Fall back to PROGRAMMER_SERIAL for backwards compatibility
|
||||||
DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL)
|
DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL)
|
||||||
|
|
||||||
ifeq ($(PORT),)
|
# Define the default port depending on the host OS
|
||||||
# try to find tty name by serial number, only works on Linux currently.
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
ifeq ($(OS),Linux)
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||||
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
|
|
||||||
|
|
||||||
# We need special handling of the watchdog if we want to speed up the flash
|
# 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.
|
# verification by using the MCU to compute the image checksum after flashing.
|
||||||
|
Loading…
Reference in New Issue
Block a user