avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [EEPROM] patch take 3: Fix mis-feature of lacking EEPROM


From: Björn Haase
Subject: [avr-libc-dev] [EEPROM] patch take 3: Fix mis-feature of lacking EEPROM support for many targets / rewrite of eeprom functions
Date: Sun, 31 Jul 2005 14:43:28 +0200
User-agent: KMail/1.7.1

Dmitry K. wrote on Sonntag, 31. Juli 2005 06:34 :
> Hi, Björn and all.
>
> Many thanks!
>
> Notes about 'eeprom_patch_take2.patch':
>
>    1. eeprom_read_block: operands sequence is changed.
OK, fixed in take 3
>    2. function definitions: 'static inline' must before type of return
> value.  Compiler give warnings.
Now fixed as well.
>    3. My opinion is debatable.
> You are right, that, as a rule, the size of the block less than 256 and is
> a constant. But it is often, the wrapper functions are used. It interferes
> with the compiler to define the size of the block and it inserts into the
> program a cycle.  
> ...
> Other approach - to transfer all actions to library functions. I shall try
> to compare these two variants.
>
> Dmitry.
Hi Dimitry,

according to your request, I have spend the time to make the remaining block 
transfers more efficient. The price to pay had been to make the inline asm 
parts (i.e. the parts I would prefer to avoid completely) bigger and less 
readable. Mainly the branching condition is evaluated much more efficiently. 
I think that the new inline loop is correct, but it still deserves some 
testing.

Differing from my initial suggestion, I now agree with you that two dedicated 
write word and read word functions are useful. Take 3 implements them.

Joerg, 

please have also a look at the .section directives in the eeprom.S file that 
are supposed to force the individual eeprom functions to be linked closely 
together. Take 3 now always make use of the rcall instructions for calling 
the fundamental read_byte and write_byte functions.

In take 3 I also have tried to remove whitespace changes as much as possible.

Yours,

Björn


2005-30-07  Bjoern Haase <address@hidden>

        * include/avr/eeprom.h: re-write of all functions
        and documentation update. EEMEM, add.
        * include/avr/iocan128.h: __EEPROM_REG_LOCATIONS__ define
        * include/avr/iom165.h, include/avr/iom169.h: Ditto.
        * include/avr/iom325.h, include/avr/iom3250.h: Ditto.
        * include/avr/iom645.h, include/avr/iom6450.h: Ditto.
        * include/avr/iomx8.h: Ditto.
        * libc/misc/Makefile.am:
        lib_a_asm_sources modify, eeprom_asm_sources add,
        lib_a_LIBADD add, lib_a_DEPENDENCIES add
        rule "%.1C1D1E.o: %.S" add, rule "%.1F2021.o: %.S" add
        * libc/misc/eeprom.S: complete re-write

Attachment: eeprom_patch_take3.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]