[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #30061] stk500 skips writing blocks of 0xff, even if
[avrdude-dev] [bug #30061] stk500 skips writing blocks of 0xff, even if the part/page wasn't erased
Tue, 08 Jun 2010 04:18:48 +0000
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:188.8.131.52) Gecko/20100331 Firefox/3.5.9
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
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:
Message sent via/by Savannah