avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #30061] stk500 skips writing blocks of 0xff, even if


From: Joerg Wunsch
Subject: [avrdude-dev] [bug #30061] stk500 skips writing blocks of 0xff, even if the part/page wasn't erased
Date: Tue, 08 Jun 2010 04:18:48 +0000
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) 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
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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]