Skip to content

Commit 3198aea

Browse files
committed
Merge pull request #385 from sej7278/master
Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is manually set
2 parents 7efd0cc + 44fe227 commit 3198aea

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Arduino.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,12 @@ ifndef AVR_TOOLS_DIR
452452
else
453453
$(call show_config_variable,AVR_TOOLS_DIR,[USER])
454454

455-
# Check in Windows as Cygwin is being used, that the configuration file for the AVRDUDE is set
456-
# Check if it works on MAC
457-
ifeq ($(CURRENT_OS),WINDOWS)
458-
ifndef AVRDUDE_CONF
459-
AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf
455+
# ensure we can still find avrdude.conf
456+
ifndef AVRDUDE_CONF
457+
ifeq ($(shell expr $(ARDUINO_VERSION) '>' 157), 1)
458+
AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf
459+
else
460+
AVRDUDE_CONF = $(AVR_TOOLS_DIR)/../avrdude.conf
460461
endif
461462
endif
462463

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
1818
- Tweak: Updated Fedora instructions (https://github.com/sej7278)
1919
- Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278)
2020
- Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand)
21+
- Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278)
2122

2223
### 1.5 (2015-04-07)
2324
- New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e)

0 commit comments

Comments
 (0)