diff options
| author | Sudar <sudar@sudarmuthu.com> | 2014-03-16 06:30:51 -0700 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2014-03-16 06:30:51 -0700 |
| commit | 64e90740424226418b2a16a4a241f64c05827664 (patch) | |
| tree | 91b26d26fc82415b35f10026a832f829c1bfdaae /Arduino.mk | |
| parent | f1a79dbb3f6a5d06e9d6ddbacc8d6a378dcaec47 (diff) | |
| parent | ce89531226ea89bf5750bf5236eec2304119ebdf (diff) | |
Merge pull request #177 from geoffholden/master
Consider usb... to be a valid ISP_PORT
Diffstat (limited to 'Arduino.mk')
| -rw-r--r-- | Arduino.mk | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -836,7 +836,7 @@ endif get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!)) # Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors. -get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(error ISP port $(ISP_PORT) not found!)) +get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(if $(findstring Xusb,X$(ISP_PORT)),$(ISP_PORT),$(error ISP port $(ISP_PORT) not found!))) # Command for avr_size: do $(call avr_size,elffile,hexfile) ifneq (,$(findstring AVR,$(shell $(SIZE) --help))) @@ -1075,8 +1075,12 @@ endif AVRDUDE_ISP_OPTS = -c $(ISP_PROG) -b $(AVRDUDE_ISP_BAUDRATE) -ifneq ($(strip $(ISP_PROG)),$(filter $(ISP_PROG), usbasp usbtiny gpio)) - AVRDUDE_ISP_OPTS += -P $(call get_isp_port) +ifndef $(ISP_PORT) + ifneq ($(strip $(ISP_PROG)),$(filter $(ISP_PROG), usbasp usbtiny gpio)) + AVRDUDE_ISP_OPTS += -P $(call get_isp_port) + endif +else + AVRDUDE_ISP_OPTS += -P $(call get_isp_port) endif ifndef ISP_EEPROM |
