Follow-up Comment #4, bug #30061 (project avrdude):

My guess is that the problem lies in the Arduino bootloader.

Remember, the STK500 protocol does not have any "page erase"
command, but a bootloader can only perform page erases
(otherwise, it would ultimately erase itself).

So, when AVRDUDE starts, it sends a "device erase" to the
STK500 (i.e., to the Arduino bootloader).  The expectation
for a bootloader would be that it emulates a device erase
as much as possible, e.g. it erases the entire application
area.  Of course, AVRDUDE does not care about /when/ the
programmer actually performs the erase, but the result should
look /as if/ a device erase has happened.  Now, I guess the
bootloader defers erasing each page until actual data arrive
for the page itself, but AVRDUDE (in the assumption the device
has been erased already anyway) does not send page data for
pages entirely consisting of 0xff.  As the bootloader deferred
erasing the pages, you are now hosed: it skips erasing some
pages.

IMHO, the bootloader should simply erase the entire
application area by the time it is told to erase the device.
There's not much point in deferring the job.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30061>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to