bugAVR C Runtime Library - Bugs: bug #22878, eeprom_*_word/dword/block cause...

 
 

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

bug #22878: eeprom_*_word/dword/block cause hang in ATmega256x

Submitter:  Stu Bell <stu_san>
Submitted:  Tue 08 Apr 2008 04:54:50 PM UTC
   
 
Category:  Library Severity:  5 - Blocker
Priority:  9 - Immediate Item Group:  libc code
Status:  Fixed Assigned to:  arcanum
Percent Complete:  100% Open/Closed:  Closed
Release:  1.6.2 Fixed Release:  1.7.0

Mon 18 Aug 2008 11:49:49 PM UTC, comment #2: 

Hi Stu,

Thanks for providing a solution. I wanted to make sure: have you tested your solution out on a real device? If so, then I'll just merge your solution into the <avr/eeprom.h> header. But I'll do this after bug #23969 is fixed, which I'm currently working on.

Thanks,
Eric Weddington

Eric Weddington <arcanum>
Group administrator
Tue 08 Apr 2008 09:36:57 PM UTC, comment #1: 

I'm thinking that if we went back to having it all implemented as C or inline assembly macros, then that would avoid the problem...

Eric Weddington <arcanum>
Group administrator
Tue 08 Apr 2008 04:54:50 PM UTC, original submission:  

The latest eeprom_*_word/dword/block routines will cause an ATmega256x to hang if the precompiled eerd_*/eewr_* functions are in the top half of flash.  This is because the eeprom.h header sends a function pointer to the eerd_* or eewr_* functions, pointing back to the eeprom_*_byte function.  Since the eeprom_*_byte function is inlined, we have a 16-bit pointer to a function that may be in the other half of flash (i.e., needing a 3-byte call instead of 2-byte call).

I have attached a BF&I version of eeprom.h that solves the problem  by inlining the eerd/eewr routines for the ATmega256x processors only.  For all other processors, the original code holds.  This version of eeprom.h will generate more code than the original for the m256x processors, but then those processors have the space to handle it.

Stu Bell <stu_san>

 

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

Attached Files
file #15423:  eeprom.h added by stu_san (11KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by stu_san (Submitted the item)
  •  

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-08-19 arcanum StatusReady For Test Fixed
        Percent Complete90% 100%
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.7.0
    2008-08-19 arcanum StatusNeed Info Ready For Test
        Percent Complete0% 90%
    2008-08-18 arcanum StatusNone Need Info
        Assigned toNone arcanum
    2008-08-11 arcanum Severity4 - Important 5 - Blocker
        Priority5 - Normal 9 - Immediate
    2008-04-08 arcanum Severity3 - Normal 4 - Important
    2008-04-08 stu_san Attached File- Added eeprom.h, #15423

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code