patchAVR C Runtime Library - Patches: patch #6718, Optimize the EEPROM functions

 
 

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

patch #6718: Optimize the EEPROM functions

Submitter:  Dmitry Xmelkov <dmix>
Submitted:  Fri 09 Jan 2009 04:05:52 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  dmix Open/Closed:  Closed

Sat 06 Jun 2009 01:22:18 AM UTC, comment #2: 

The patch is applied to HEAD branch.

Dmitry Xmelkov <dmix>
Group administrator
Sun 05 Apr 2009 07:18:36 AM UTC, comment #1: 

The patch is updated to the current HEAD.

To test with any real hardware:
1. apply the head-20090404.diff to HEAD avr-libc copy
2. build the library from scratch
3. test with simulator
4. test with a real AVR the 3 files from tests/simulate/avr/eeprom-*.c

To prepare eeprom-*.c for testing, add the success indication
befor 'return 0' from main().
To indicate a bug, add the function, like:
   void exit (int i)
   {
      < On the RED LED >
      for (;;) ;
   }

Note, the section is stay default (.text) and the copyright notices are
not present always.


(file #17865)

Dmitry Xmelkov <dmix>
Group administrator
Fri 09 Jan 2009 04:05:52 AM UTC, original submission:  

The EEPROM funtions are not the best yet:
  * The multibyte reading is very slow.
  * The space expense is large: inlined byte functions are include
  into each source file, each call of multibyte function adds the
  indirect address arg filling.
  * The indirect call is not work with 256 KW flash chips (Binutils
  bug, now it is workarounded by inlining all functions).

This version does not contain inline: all functions are pure ones
from library.  To obtain a set of different hardwares there is used
the CCP substitution of function names.

Minor changes are:
  * The group of 'update' functions is added: burn only the different
  bytes.
  * The group of 'float' function is added.
  * The XMEGA is realized.

Reading speed is high: there is no check of ready between bytes, no
indirect calls, in case of Xmega the mapping into data space is used.

Space expense is small: for example, all the eeprom_read_word/dword/
block functions use the same code.  Also with small SRAM and/or small
EEPROM chips the code for high address byte or for high counter byte
is omited.

This project was started before the discussion of library per device.
So it is not needed in any GCC or Binutils changes.

Note, there is no any manual work to sort the chips into any groups:
all variants are compiled separatly.

At this moment the XMEGA is not tested.  More, it is not tryed to
compile.

Dmitry Xmelkov <dmix>
Group administrator

 

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

Attached Files
file #17865:  head-20090404.diff.gz added by dmix (12KiB - application/x-gzip)
file #17230:  avr-libc.tar.gz added by dmix (13KiB - application/x-tgz - Sources and all other files thar are changed.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dmix (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-06 dmix StatusNone Done
    2009-06-06 dmix Open/ClosedOpen Closed
    2009-04-05 dmix Attached File- Added head-20090404.diff.gz, #17865
        PrivacyNone Public
    2009-01-09 dmix Attached File- Added avr-libc.tar.gz, #17230

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code