aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Whittington <john.whittington@cruxproductdesign.com>2017-09-05 14:18:03 +0100
committerJohn Whittington <john.whittington@cruxproductdesign.com>2017-09-05 14:18:03 +0100
commit4519be5bac8d90ce2964595dc7df7ca9434e0207 (patch)
treefb09db18d86bede4fb900aabf2c3c712e3ff3163
parent360db6f27c03781554171daae734aabde05ee3b7 (diff)
Detect Cygwin Python or user installed Windows Python and use according device port
-rw-r--r--Arduino.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/Arduino.mk b/Arduino.mk
index c83ad0d..0b4ed61 100644
--- a/Arduino.mk
+++ b/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