Let user skip MONITOR_PORT existance check
Define FORCE_MONITOR_PORT to enable. Useful if one uses 'ssh root@remotemachine avrdude' instead of the usual AVRDUDE command.
This commit is contained in:
parent
dcc7512284
commit
3754e5c012
1 changed files with 9 additions and 4 deletions
13
Arduino.mk
13
Arduino.mk
|
@ -1031,11 +1031,16 @@ else
|
|||
$(call show_config_variable,DEVICE_PATH,[AUTODETECTED])
|
||||
endif
|
||||
|
||||
# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors.
|
||||
ifeq ($(CURRENT_OS), WINDOWS)
|
||||
get_monitor_port = $(COM_STYLE_MONITOR_PORT)
|
||||
ifdef FORCE_MONITOR_PORT
|
||||
# Skips the DEVICE_PATH existance check.
|
||||
get_monitor_port = $(DEVICE_PATH)
|
||||
else
|
||||
get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!))
|
||||
# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors.
|
||||
ifeq ($(CURRENT_OS), WINDOWS)
|
||||
get_monitor_port = $(COM_STYLE_MONITOR_PORT)
|
||||
else
|
||||
get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.
|
||||
|
|
Loading…
Reference in a new issue