Merge pull request #586 from SearchAThing-forks/master
allow to enable AVRDUDE_AUTOERASE_FLASH
This commit is contained in:
commit
3f1ef10d40
2 changed files with 23 additions and 1 deletions
|
@ -1542,7 +1542,11 @@ endif
|
|||
# -D - Disable auto erase for flash memory
|
||||
# Note: -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 ($(AVRDUDE_AUTOERASE_FLASH), yes)
|
||||
else
|
||||
AVRDUDE_ARD_OPTS = -D
|
||||
endif
|
||||
AVRDUDE_ARD_OPTS += -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P
|
||||
ifeq ($(CURRENT_OS), WINDOWS)
|
||||
# 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
|
||||
|
|
|
@ -1308,6 +1308,24 @@ AVRDUDE_CONF = /usr/share/arduino/hardware/tools/avrdude.conf
|
|||
|
||||
----
|
||||
|
||||
### AVRDUDE_AUTOERASE_FLASH
|
||||
|
||||
**Description:**
|
||||
|
||||
Enable autoerase flash.
|
||||
|
||||
By default disabled.
|
||||
|
||||
**Example:**
|
||||
|
||||
```Makefile
|
||||
AVRDUDE_AUTOERASE_FLASH = yes
|
||||
```
|
||||
|
||||
**Requirement:** *Optional*
|
||||
|
||||
----
|
||||
|
||||
### AVR_TOOLS_PATH
|
||||
|
||||
**Description:**
|
||||
|
|
Loading…
Reference in a new issue