Merge pull request #216 from sej7278/master
Really fix $MONITOR_PORT detection. Fix #215
This commit is contained in:
commit
87895de366
2 changed files with 7 additions and 2 deletions
|
@ -866,6 +866,7 @@ LDFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -Wl,--gc-sections -O$(OPTIMIZATION_LEV
|
||||||
SIZEFLAGS ?= --mcu=$(MCU) -C
|
SIZEFLAGS ?= --mcu=$(MCU) -C
|
||||||
|
|
||||||
# for backwards compatibility, grab ARDUINO_PORT if the user has it set
|
# for backwards compatibility, grab ARDUINO_PORT if the user has it set
|
||||||
|
# instead of MONITOR_PORT
|
||||||
MONITOR_PORT ?= $(ARDUINO_PORT)
|
MONITOR_PORT ?= $(ARDUINO_PORT)
|
||||||
|
|
||||||
ifeq ($(CURRENT_OS), WINDOWS)
|
ifeq ($(CURRENT_OS), WINDOWS)
|
||||||
|
@ -879,12 +880,16 @@ ifeq ($(CURRENT_OS), WINDOWS)
|
||||||
DEVICE_PATH = /dev/ttyS$(shell awk 'BEGIN{ print $(COM_PORT_ID) - 1 }')
|
DEVICE_PATH = /dev/ttyS$(shell awk 'BEGIN{ print $(COM_PORT_ID) - 1 }')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MONITOR_PORT
|
ifneq ($(strip $(MONITOR_PORT)),)
|
||||||
|
# set DEVICE_PATH based on user-defined MONITOR_PORT or ARDUINO_PORT
|
||||||
DEVICE_PATH = $(MONITOR_PORT)
|
DEVICE_PATH = $(MONITOR_PORT)
|
||||||
|
$(call show_config_variable,DEVICE_PATH,[COMPUTED],(from MONITOR_PORT))
|
||||||
else
|
else
|
||||||
# If no port is specified, try to guess it from wildcards.
|
# If no port is specified, try to guess it from wildcards.
|
||||||
|
# Will only work if the Arduino is the only/first device matched.
|
||||||
DEVICE_PATH = $(firstword $(wildcard \
|
DEVICE_PATH = $(firstword $(wildcard \
|
||||||
/dev/ttyACM? /dev/ttyUSB? /dev/tty.usbserial* /dev/tty.usbmodem*))
|
/dev/ttyACM? /dev/ttyUSB? /dev/tty.usbserial* /dev/tty.usbmodem*))
|
||||||
|
$(call show_config_variable,DEVICE_PATH,[AUTODETECTED])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors.
|
# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors.
|
||||||
|
|
|
@ -13,7 +13,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
||||||
- Fix: Add missing newlines at end of some echo's (Issue #207) (https://github.com/sej7278)
|
- Fix: Add missing newlines at end of some echo's (Issue #207) (https://github.com/sej7278)
|
||||||
- Fix: Add missing/reorder/reword targets in `make help` (https://github.com/sej7278)
|
- Fix: Add missing/reorder/reword targets in `make help` (https://github.com/sej7278)
|
||||||
- New: Arduino.mk is now compatible with Flymake mode (https://github.com/rbarzic)
|
- New: Arduino.mk is now compatible with Flymake mode (https://github.com/rbarzic)
|
||||||
- Fix: MONITOR_PORT detection (Issue #213) (https://github.com/sej7278)
|
- Fix: MONITOR_PORT detection (Issue #213, #215) (https://github.com/sej7278)
|
||||||
|
|
||||||
### 1.3.3 (2014-04-12)
|
### 1.3.3 (2014-04-12)
|
||||||
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
|
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
|
||||||
|
|
Loading…
Reference in a new issue