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

 
 

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

patch #7720: Bug in EEPROM write

Submitter:  Hannes Weisbach <hweisbach>
Submitted:  Sun 05 Feb 2012 03:35:17 PM UTC
   
 
Category:  None Priority:  9 - Immediate
Status:  Ready For Test Privacy:  Public
Assigned to:  rliebscher Open/Closed:  Closed

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

fixed in svn revision 1067

Rene Liebscher <rliebscher>
Group Member
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.


  int  (*write_page)    (struct programmer_t * pgm, AVRPART * p, AVRMEM * m,
                          unsigned int page_number, unsigned int n_bytes);
  int  (*read_page)     (struct programmer_t * pgm, AVRPART * p, AVRMEM * m,
                           unsigned int page_number, unsigned int n_bytes);


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>
Group Member
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>
Group 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>
Group Member

 

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

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
  • -email is unavailable- added by rliebscher (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by hweisbach (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 rliebscher Open/ClosedOpen Closed
    2012-02-06 rliebscher StatusNone Ready For Test
        Assigned toNone rliebscher
    2012-02-05 hweisbach Attached File- Added avrftdi_eeprom_write.patch, #24988

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code