We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7b11860 + 1dce271 commit 9629867Copy full SHA for 9629867
2 files changed
Arduino.mk
@@ -1282,13 +1282,22 @@ ifndef AVRDUDE_OPTS
1282
AVRDUDE_OPTS = -q -V
1283
endif
1284
1285
-AVRDUDE_COM_OPTS = $(AVRDUDE_OPTS) -p $(MCU)
+# Decouple the mcu between the compiler options (-mmcu) and the avrdude options (-p).
1286
+# This is needed to be able to compile for attiny84a but specify the upload mcu as attiny84.
1287
+# We default to picking the -mmcu flag, but you can override this by setting
1288
+# AVRDUDE_MCU in your makefile.
1289
+ifndef AVRDUDE_MCU
1290
+ AVRDUDE_MCU = $(MCU)
1291
+endif
1292
+
1293
+AVRDUDE_COM_OPTS = $(AVRDUDE_OPTS) -p $(AVRDUDE_MCU)
1294
ifdef AVRDUDE_CONF
1295
AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF)
1296
1297
1298
# -D - Disable auto erase for flash memory
-# (-D is needed for Mega boards. See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005)
1299
+# Note: -D is needed for Mega boards.
1300
+# (See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005)
1301
AVRDUDE_ARD_OPTS = -D -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P
1302
ifeq ($(CURRENT_OS), WINDOWS)
1303
# get_monitor_port checks to see if the monitor port exists, assuming it is
@@ -1353,6 +1362,9 @@ ifndef AVRDUDE_ISP_FUSES_POST
1353
1362
1354
1363
1355
1364
1365
+# Note: setting -D to disable flash erase before programming may cause issues
1366
+# with some boards like attiny84a, making the program not "take",
1367
+# so we do not set it by default.
1356
1368
AVRDUDE_ISP_OPTS = -c $(ISP_PROG) -b $(AVRDUDE_ISP_BAUDRATE)
1357
1369
1358
1370
ifndef $(ISP_PORT)
HISTORY.md
@@ -10,6 +10,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
10
- Tweak: Various spelling/grammar/typo fixes (https://github.com/dcousens)
11
- Tweak: Clarified some 1.5+ issues in docs (Issue #352) (https://github.com/sej7278)
12
- Tweak: Added some more Continuous Integration tests (https://github.com/sej7278)
13
+- New: Add option to split avrdude MCU from avr-gcc MCU (Issue #357) (https://github.com/hhgarnes)
14
15
### 1.5 (2015-04-07)
16
- New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e)
0 commit comments