Skip to content

Adding the "dont_erase" option to board preferences #78

Closed
wants to merge 2 commits into from

4 participants

@s-leroux

Some AVR require to be erased before uploading a new program. But
the Arduino IDE always pass the '-D' (dont erase) option to avrdude.

This patch allow to disable this feature on a per-board basis.

s-leroux added some commits Apr 25, 2012
@s-leroux s-leroux Add the "dont_erase" option to board preferences
Some AVR require to be erased before uploading a new program. But
the Arduino IDE always pass the '-D' (dont erase) option to avrdude.

This patch allow to disable this feature on a per-board basis.
252a6f6
@s-leroux s-leroux Reversed the meaning of the "dont_erase" flag
When the "dont_erase" preference flag in not set or
is set to "true" (case insensitive) add the -D flag ("normal" behavior).

If the flag is set to anything but "true",
don't append the '-D' option to avrdude ("new" behavior).
3a4eb27
@ffissore ffissore added the New label Feb 27, 2014
@matthijskooijman matthijskooijman removed the New label Sep 11, 2014
@ffissore

When uploading via bootloader, no erase is performed any more, only when uploading via external programmer.

@ffissore ffissore closed this May 11, 2015
@ffissore

Erase is performed, I missed the end of the command line

@ffissore ffissore reopened this May 11, 2015
@ffissore

You can achieve the same result taking advantage of the current boards/platforms definitions (txt files)

Create a custom core with a custom board (for example: a copy of the Arduino Leonardo called "my leonardo") and replace avrdude with a custom uploader (for example "non_erasing_avrdude"). Create a new platform.txt (copying arduino one and change command line params

Select "my leonardo" from the Boards list and upload a sketch

@ffissore ffissore closed this May 11, 2015
@ffissore ffissore modified the milestone: Release 1.6.5 May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.