Add support for attiny84a
Attiny84a requires two things: -Support for rewriting the avrdude mcu to attiny84 even if the gcc mmcu parameter stays as attiny84a -Removal of the avrdude -D flag. Without this, no uploaded sketch would ever take on the attiny84a (determined by experimentation and comparison of parameters with the arduino ide)
This commit is contained in:
parent
7b11860ba8
commit
bf0ada9653
1 changed files with 16 additions and 4 deletions
20
Arduino.mk
20
Arduino.mk
|
@ -1282,14 +1282,26 @@ ifndef AVRDUDE_OPTS
|
||||||
AVRDUDE_OPTS = -q -V
|
AVRDUDE_OPTS = -q -V
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AVRDUDE_COM_OPTS = $(AVRDUDE_OPTS) -p $(MCU)
|
# We avrdude uses attiny84 to upload to the 84a, but we want to be able to set the gcc mmcu flag to attiny84a.
|
||||||
|
ifeq ($(MCU), attiny84a)
|
||||||
|
AVRDUDE_MCU = attiny84
|
||||||
|
else
|
||||||
|
AVRDUDE_MCU = $(MCU)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# -D - Disable auto erase for flash memory
|
||||||
|
# -D is needed for Mega boards. (See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005)
|
||||||
|
# -D must not be present for attiny84a (unknown for attiny84)
|
||||||
|
ifneq ($(AVRDUDE_MCU), attiny84)
|
||||||
|
AVRDUDE_OPTS += -D
|
||||||
|
endif
|
||||||
|
|
||||||
|
AVRDUDE_COM_OPTS = $(AVRDUDE_OPTS) -p $(AVRDUDE_MCU)
|
||||||
ifdef AVRDUDE_CONF
|
ifdef AVRDUDE_CONF
|
||||||
AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF)
|
AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# -D - Disable auto erase for flash memory
|
AVRDUDE_ARD_OPTS = -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P
|
||||||
# (-D is needed for Mega boards. See https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005)
|
|
||||||
AVRDUDE_ARD_OPTS = -D -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P
|
|
||||||
ifeq ($(CURRENT_OS), WINDOWS)
|
ifeq ($(CURRENT_OS), WINDOWS)
|
||||||
# get_monitor_port checks to see if the monitor port exists, assuming it is
|
# get_monitor_port checks to see if the monitor port exists, assuming it is
|
||||||
# a file. In Windows, avrdude needs the port in the format 'com1' which is
|
# a file. In Windows, avrdude needs the port in the format 'com1' which is
|
||||||
|
|
Loading…
Reference in a new issue