patchAVR Downloader/UploaDEr - Patches: patch #7720, Bug in EEPROM write

 
 

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

patch #7720: Bug in EEPROM write

Submitted by:  Hannes Weisbach <hweisbach>
Submitted on:  Sun 05 Feb 2012 03:35:17 PM UTC  
 
Category: NonePriority: 9 - Immediate
Status: Ready For TestPrivacy: Public
Assigned to: Rene Liebscher <rliebscher>Open/Closed: Closed

Mon 06 Feb 2012 07:42:57 PM UTC, comment #3:

fixed in svn revision 1067

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.
Mon 06 Feb 2012 07:36:40 AM UTC, comment #2:

If the interface of paged_load/write is outdated, so may be better retire them and put some write/read_page function at their places.

If you always write/read whole pages the n_bytes parameter can be discarded too.

Main reason to change the names of the functions are the patches in the patch tracker and and in other places at the web which would all fail to work if using still the old interface (anybody really cares about the compiler warnings?). The same problem we had already when paged_load/write changed their interfaces. Using new names, people get at least a compiler error and must fix this to be able to use paged functions again.

Rene Liebscher <rliebscher>
Project MemberIn charge of this item.
Sun 05 Feb 2012 10:25:12 PM UTC, comment #1:

> Do get the pgm->paged_write and pgm->paged_load functions
> get called for every page?


As you've already guessed, this recently changed.

The reason for this is that AVRDUDE now properly keeps track of which
data actually came from an input file. With respect to the page
programming algorithm, this means the upper layer first checks whether
the page in question actually contains data that came from an input
file, and only calls the backend for "interesting" data. Maintaining
the previous scheme would have duplicated the check for interesting
data in each backend driver, as opposed to implement that check only
once in the next higher layer.

> What is the reason to pass page_size as own parameter? How it is
> different from AVRMEM->page_size?


I can't tell you for sure. There's a lot of historical ballast around
here, in particular in the EEPROM area. Sometimes, EEPROM is handled
as being paged, sometimes it isn't even though that particular
device's EEPROM could be treated as paged.

Joerg Wunsch <joerg_wunsch>
Project Administrator
Sun 05 Feb 2012 03:35:17 PM UTC, original submission:

This bug is like the flash page write for which I posted a patch a few days ago.
EEPROM programming has the same issue and I attached a patch.

I have a general question to page programming. Do get the pgm->paged_write and pgm->paged_load functions get called for every page? I was somehow under the impression, the page write and read function are just called once and read or write the entire memory. Or was this behaviour changed? If so, and the paged_* functions get called for every page the avrftdi flash write and read functions can be significantly simplified.

What is the reason to pass page_size as own parameter? How it is different from AVRMEM->page_size?

Anyway, patch for the wrong initialisation in EEPROM programming against SVN rev 1065 is attached.

Hannes Weisbach <hweisbach>
Project Member

 

Attached Files
file #24988:  avrftdi_eeprom_write.patch added by hweisbach (390B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rliebscher (Posted a comment)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by hweisbach (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 08:00:49 PM UTCrliebscherOpen/ClosedOpen=>Closed
    Mon 06 Feb 2012 07:42:57 PM UTCrliebscherStatusNone=>Ready For Test
      Assigned toNone=>rliebscher
    Sun 05 Feb 2012 03:35:17 PM UTChweisbachAttached File-=>Added avrftdi_eeprom_write.patch, #24988

    Back to the top


    Powered by Savane 3.1-cleanup