Detect Cygwin Python or user installed Windows Python and use according device port
This commit is contained in:
parent
360db6f27c
commit
4519be5bac
1 changed files with 10 additions and 0 deletions
10
Arduino.mk
10
Arduino.mk
|
@ -744,13 +744,23 @@ ifndef RESET_CMD
|
|||
endif
|
||||
ifneq ($(CATERINA),)
|
||||
ifneq (,$(findstring CYGWIN,$(shell uname -s)))
|
||||
# confirm user is using default cygwin unix Python (which uses ttySx) and not Windows Python (which uses COMx)
|
||||
ifeq ($(shell which python),/usr/bin/python)
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) --caterina $(ARD_RESET_OPTS) $(DEVICE_PATH)
|
||||
else
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) --caterina $(ARD_RESET_OPTS) $(call get_monitor_port)
|
||||
endif
|
||||
else
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) --caterina $(ARD_RESET_OPTS) $(call get_monitor_port)
|
||||
endif
|
||||
else
|
||||
ifneq (,$(findstring CYGWIN,$(shell uname -s)))
|
||||
# confirm user is using default cygwin unix Python (which uses ttySx) and not Windows Python (which uses COMx)
|
||||
ifeq ($(shell which python),/usr/bin/python)
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) $(ARD_RESET_OPTS) $(DEVICE_PATH)
|
||||
else
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) $(ARD_RESET_OPTS) $(call get_monitor_port)
|
||||
endif
|
||||
else
|
||||
RESET_CMD = $(ARD_RESET_ARDUINO) $(ARD_RESET_OPTS) $(call get_monitor_port)
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue