diff --git a/arduino-mk/chipKIT.mk b/arduino-mk/chipKIT.mk index fd7a0d2..2d9abb4 100644 --- a/arduino-mk/chipKIT.mk +++ b/arduino-mk/chipKIT.mk @@ -72,9 +72,17 @@ endif AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools -AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools -AVRDUDE = $(AVRDUDE_DIR)/avrdude -AVRDUDE_CONF = $(AVRDUDE_DIR)/avrdude.conf +# The same as in Arduino, the Linux distribution contains avrdude and +# avrdude.conf in a different location. +ifeq ($(CURRENT_OS),LINUX) + AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools + AVRDUDE = $(AVRDUDE_DIR)/avrdude + AVRDUDE_CONF = $(AVRDUDE_DIR)/avrdude.conf +else + AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools/avr + AVRDUDE = $(AVRDUDE_DIR)/bin/avrdude + AVRDUDE_CONF = $(AVRDUDE_DIR)/etc/avrdude.conf +endif ALTERNATE_CORE = pic32 ALTERNATE_CORE_PATH = $(MPIDE_DIR)/hardware/pic32