avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [patch #7769] Write flash fails for AVR910 programmers


From: Fred
Subject: [avrdude-dev] [patch #7769] Write flash fails for AVR910 programmers
Date: Thu, 09 May 2013 15:32:48 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

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/




reply via email to

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