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

 
 

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

patch #7769: Write flash fails for AVR910 programmers

Submitter:  Brane Ždralo <branez>
Submitted:  Tue 24 Apr 2012 12:42:13 PM UTC
   
 
Category:  None Priority:  7 - High
Status:  Done Privacy:  Public
Assigned to:  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>
Group administrator
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>
Group administrator
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by magister (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by branez (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-03 joerg_wunsch StatusNone Done
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2012-04-24 branez Attached File- Added avr910.patch, #25719

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code