Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Shaun Jackman
Hi all, I like the rewrite. It looks good. My only concern is possibly code size. I haven't tested it, but it looks as though __eeprom_write_byte_address_word should generate about 10 instructions, which means __eeprom_write_dword_address_word will generate 40 instructions, or 80 bytes. It seems

RE: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Weddington, Eric
-Original Message- From: Shaun Jackman [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 7:45 AM To: Weddington, Eric Cc: Wouter van Gulik; avr-libc-dev@nongnu.org; Joerg Wunsch Subject: Re: [avr-libc-dev] [RFC] New eeprom.h Hi all, I like the rewrite. It looks

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Shaun Jackman
Hello Eric, I agree: correct code first, optimization second. I am not complaining that eeprom_write_dword is an 80 byte function. I agree that reading/writing a 32-bit word will take a bunch of code on an AVR. I am arguing that it is a design flaw that eeprom_write_dword takes 80 bytes *per

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Rick Altherr
On Feb 28, 2008, at 6:53 AM, Weddington, Eric wrote: -Original Message- From: Shaun Jackman [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 7:45 AM To: Weddington, Eric Cc: Wouter van Gulik; avr-libc-dev@nongnu.org; Joerg Wunsch Subject: Re: [avr-libc-dev] [RFC] New

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Shaun Jackman
The solution you're recommending is possible, and in fact probably the only solution with the current architecture. The only catch is that it requires one device-specific function for each location of the EEPROM registers. How many EEPROM register locations are there across the AVR product line?

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Rick Altherr
On Feb 28, 2008, at 10:23 AM, Shaun Jackman wrote: The solution you're recommending is possible, and in fact probably the only solution with the current architecture. The only catch is that it requires one device-specific function for each location of the EEPROM registers. How many EEPROM

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Shaun Jackman
Well, your suggestion would solve the code size issue, but the function wouldn't be particularly fast if all the EEPROM register accesses were indirectly addressed. In most applications, EEPROM writes aren't usually time critical; although I can imagine that exceptions exist. Do the EEPROM

Re: [avr-libc-dev] [RFC] New eeprom.h

2008-02-28 Thread Rick Altherr
On Feb 28, 2008, at 9:23 PM, Dmitry K. wrote: Hi all. I like the rewrite. It looks good. My only concern is not only code size. There is a second question: this functions are not a normal C functions. That is: . No argument type control at compile time. For expamle, the expressions like