File tree Expand file tree Collapse file tree 4 files changed +8
-24
lines changed Expand file tree Collapse file tree 4 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ export LINKFLAGS += -ffunction-sections
69
69
70
70
# set the tap interface for term/valgrind
71
71
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
72
- export PORT ?= tap0
72
+ PORT ?= tap0
73
73
else
74
- export PORT =
74
+ PORT =
75
75
endif
76
76
77
77
TERMFLAGS := $(PORT) $(TERMFLAGS)
Original file line number Diff line number Diff line change @@ -41,29 +41,14 @@ solution):
41
41
# Add serial matching command
42
42
ifneq ($(PROGRAMMER_SERIAL),)
43
43
OOCD_BOARD_FLAGS += -c 'ftdi_serial $(PROGRAMMER_SERIAL)'
44
-
45
- ifeq ($(PORT),)
46
- # try to find tty name by serial number, only works on Linux currently.
47
- ifeq ($(OS),Linux)
48
- PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh "^$(PROGRAMMER_SERIAL)$$"))
49
- endif
50
- endif
51
44
endif
52
45
53
- # Fallback PORT if no serial was specified or if the specified serial was not found
54
- ifeq ($(PORT),)
55
- ifeq ($(OS),Linux)
56
- PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh))
57
- else ifeq ($(OS),Darwin)
58
- PORT := $(shell ls -1 /dev/tty.SLAB_USBtoUART* | head -n 1)
59
- endif
60
- endif
46
+ PORT_LINUX_EXACT = $(if $(PROGRAMMER_SERIAL),$(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh "^$(PROGRAMMER_SERIAL)$$")),)
47
+
48
+ PORT_LINUX = $(if $(PORT_LINUX_EXACT),$(PORT_LINUX_EXACT),$(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh)))
49
+
50
+ PORT_DARWIN = $(shell ls -1 /dev/tty.SLAB_USBtoUART* | head -n 1)
61
51
62
- # TODO: add support for windows as host platform
63
- ifeq ($(PORT),)
64
- $(info CAUTION: No terminal port for your host system found!)
65
- endif
66
- export PORT
67
52
68
53
69
54
Limitations
Original file line number Diff line number Diff line change 8
8
ifeq ($(PORT ) ,)
9
9
$(info Warning : no PORT set!)
10
10
endif
11
- export PORT
12
11
13
12
export BAUD ?= 115200
14
13
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export GIT_CACHE_DIR # path to git-cache cache directory
75
75
export FLASH_ADDR # Define an offset to flash code into ROM memory.
76
76
# TERMPROG # The command to call on "make term".
77
77
# TERMFLAGS # Additional parameters to supply to TERMPROG.
78
- export PORT # The port to connect the TERMPROG to.
78
+ # PORT # The port to connect the TERMPROG to.
79
79
export ELFFILE # The unstripped result of the compilation.
80
80
export HEXFILE # The 'intel hex' stripped result of the compilation.
81
81
# BINFILE # The 'binary' stripped result of the compilation.
You can’t perform that action at this time.
0 commit comments