diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index b217592..aaec9aa 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -306,10 +306,12 @@ ifndef AVR_TOOLS_DIR BUNDLED_AVR_TOOLS_DIR := $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr) ifdef BUNDLED_AVR_TOOLS_DIR AVR_TOOLS_DIR = $(BUNDLED_AVR_TOOLS_DIR) - # The avrdude bundled with Arduino can't find it's config - AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf - $(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution)) - + # if AVRDUDE_CONF is already defined, don't overwrite it + ifndef AVRDUDE_CONF + # The avrdude bundled with Arduino can't find it's config + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + $(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution)) + endif else SYSTEMPATH_AVR_TOOLS_DIR := $(call dir_if_exists,$(abspath $(dir $(shell which avr-gcc))/..))