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

 
 

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

Submitted by:  Stu Bell <stu_san>
Submitted on:  Tue 08 Apr 2008 04:54:50 PM UTC  
 
Category: LibrarySeverity: 5 - Blocker
Priority: 9 - ImmediateItem Group: libc code
Status: FixedPercent Complete: 100%
Assigned to: Eric Weddington <arcanum>Open/Closed: Closed
Release: 1.6.2Fixed Release: 1.7.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by arcanum (Posted a comment)
  • -unavailable- added by stu_san (Submitted the item)
  •  

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

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Aug 2008 10:10:54 PM UTCarcanumStatusReady For Test=>Fixed
      Percent Complete90%=>100%
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.7.0
    Tue 19 Aug 2008 09:22:05 PM UTCarcanumStatusNeed Info=>Ready For Test
      Percent Complete0%=>90%
    Mon 18 Aug 2008 11:49:49 PM UTCarcanumStatusNone=>Need Info
      Assigned toNone=>arcanum
    Mon 11 Aug 2008 02:50:09 AM UTCarcanumSeverity4 - Important=>5 - Blocker
      Priority5 - Normal=>9 - Immediate
    Tue 08 Apr 2008 09:36:57 PM UTCarcanumSeverity3 - Normal=>4 - Important
    Tue 08 Apr 2008 04:54:50 PM UTCstu_sanAttached File-=>Added eeprom.h, #15423

    Back to the top


    Powered by Savane 3.1-cleanup1