patchAVR Downloader/UploaDEr - Patches: patch #7769, Write flash fails for AVR910...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

patch #7769: Write flash fails for AVR910 programmers

Submitted by:  Brane Ždralo <branez>
Submitted on:  Tue 24 Apr 2012 12:42:13 PM UTC  
 
Category: NonePriority: 7 - High
Status: DonePrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed

Tue 03 Sep 2013 09:44:10 PM UTC, comment #3:

Applied in SVN r1206. Thanks!

Next time, /please/ submit it as a unified context diff
(diff -u) rather than plain old diff.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Thu 09 May 2013 03:32:48 PM UTC, comment #2:

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.

Fred <magister>
Tue 24 Apr 2012 01:33:45 PM UTC, comment #1:

Given that AVR910 has been around for 9 years now, I find
the accusation of AVRDUDE using the wrong addressing a
little strange. So far, nobody seems to have had problems
with it during all the time.

I'd like to see comments from active AVR910 users before
I'm convinced to change anything in that area.

Please resubmit the patch as a context (or unified context)
diff, i. e. the output of "diff -c" or "diff -u". Plain
ed(1)-style diffs are error-prone whenever something changes
in the file afterwards.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Tue 24 Apr 2012 12:42:13 PM UTC, original submission:

When downloading hex file with AVR910 compatible programmer it increments address by number of bytes not words (programm memory is two bytes wide).

Brane Ždralo <branez>

 

Attached Files
file #25719:  avr910.patch added by branez (416B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by magister (Posted a comment)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by branez (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Sep 2013 09:44:10 PM UTCjoerg_wunschStatusNone=>Done
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Tue 24 Apr 2012 12:42:13 PM UTCbranezAttached File-=>Added avr910.patch, #25719

    Back to the top


    Powered by Savane 3.1-cleanup