Don't overwrite AVRDUDE_CONF if AVR_TOOLS_DIR is not set.
If one likes to use avrdude from outside of Arduino together with Arduino-bundled gcc crosstolchain, the setting of AVRDUDE_CONF got overwritten.
This commit is contained in:
parent
74882aa13a
commit
25a31afbd9
1 changed files with 6 additions and 4 deletions
|
@ -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))/..))
|
||||
|
|
Loading…
Reference in a new issue