bugAVR Downloader/UploaDEr - Bugs: bug #52963, -U option with flash memory...


You are not allowed to post comments on this tracker with your current authentication level.

bug #52963: -U option with flash memory doesn't perform chip erase with arduino programmer

Submitter:  None
Submitted:  Tue 23 Jan 2018 11:13:18 PM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  Britton Kerin
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  6.3 Programmer hardware:  arduino
Device type: 

Tue 23 Jan 2018 11:30:15 PM UTC, comment #1: 

IMHO this is entirely an issue of the bootloader but not
AVRDUDE. AVRDUDE requests the programmer to issue a chip
erase, and obviously, a bootloader would be stupid to execute
it in a way to erase itself. ;-)  Anyway, simply ignoring the
erase request is certainly not the correct way to handle it.
It could either erase the entire application memory region,
or it could just remember it was asked to perform an erase,
and then erase each page just before reprogramming it.

The Xmega way cannot be used by AVRDUDE on other devices as
there are simply no commands to perform page-wise erases on

This is deja-vu, I seem to remember we've been discussing
this bootloader bug before.  Please complain to Arduino about

Joerg Wunsch <joerg_wunsch>
Group administrator
Tue 23 Jan 2018 11:13:18 PM UTC, original submission:  

It can't because that would blow away the bootlaoder.
The -D option description currently says this:

  -D      Disable auto erase for flash.  When the -U option with flash
  memory is specified, avrdude will perform a chip erase before
  starting any of the programming operations, since it generally is a
  mistake to program the flash without performing an erase first.  This
  option disables that.  Auto erase is not used for ATxmega devices as
  these devices can use page erase before writing each page so no
  explicit chip erase is required.  Note however that any page not
  affected by the current operation will retain its previous contents.

If exceptions for ATxmega deserve a mention that the arduino programmer
exception certainly does too.  It can matter because e.g. EEPROM doesn't end up
getting cleared like documentation in chip datasheet says it does for chip
erase (assuming EESAVE not programmed).



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-23 joerg_wunsch StatusNone Invalid
        Assigned toNone joerg_wunsch

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code