Follow-up Comment #2, patch #7769 (project avrdude):

Exactly the same bug as in butterfly (AVR109).

The 'A' command must send the address in word offset, it is currently sent in
byte offset.

For instance with a 128 bytes buffer, avrdude send:

A 00 00
A 00 80
A 01 00
A 01 80
etc

each command followed by 128 bytes of data.

This is wrong, the correct offset is:

A 00 00
A 00 40
A 00 80
A 00 C0
etc

in butterfly.c in the butterfly_set_addr() function, I added a:

addr = addr >> 1;

and bam, it works (for flash)

You have not detected the problem before because of another bug:

Boot loader support auto-increment, so avrdude years ago was sending a simple
"A 00 00" and the bootloader was auto-incrementing the address. Something has
changed since revision 1007, the big "Mega-commit to bring in memory
tagging."

I checked out revision 1006, bootstrap/configure/make/test everything works
fine with AVR109

I checked out revision 1007, bootstrap/configure/make/test
AVR109 fails

The code also check for auto-incrementing command 'a' but does not care by
after and always send an 'A' command, it should not, it's not efficient.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7769>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


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

Reply via email to