diff options
| author | Sudar Muthu <sudar@sudarmuthu.com> | 2019-06-19 09:05:02 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-19 09:05:02 +0530 |
| commit | 3f1ef10d40ca30ffc4c75402723af82b4d080536 (patch) | |
| tree | 84a06c2f5b3cd28c0cf1db240fcc5892623e9e83 | |
| parent | cf5d016746c82e72c501ee10dfd55be6bf937d83 (diff) | |
| parent | ec1947a7cda724b4de7783a1f74abf31ae59e955 (diff) | |
Merge pull request #586 from SearchAThing-forks/master
allow to enable AVRDUDE_AUTOERASE_FLASH
| -rw-r--r-- | Arduino.mk | 6 | ||||
| -rw-r--r-- | arduino-mk-vars.md | 18 |
2 files changed, 23 insertions, 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 diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index 3ee05d0..85fbd9f 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -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:** |
