[En-Nut-Discussion] Save Data to the EEPROM
Harald Kipp
harald.kipp at egnite.de
Wed Jun 2 12:26:23 CEST 2004
No problem, 0x80 is be fine. I usually recommend to
start at 0x200 to be on the save side. But right now
the system uses a fraction of the currently reserved
space. Actually two things should be considered for
future enhancements:
1. Defining a NUTAPP_EE_OFFSET
2. Moving the system part to the end of the EEPROM
by default
The upcoming configuration tool will allow to
modify these settings anyway.
A first screenshot is here
http://www.ethernut.de/img/nutconfscreen.png
The software is based on the eCos configuration
tool and the wxWidgets class library available
on Linux, Win and OSX. In opposite to eCos, I
use Lua instead of tcl for the configuration
scripts.
Harald
At 10:35 02.06.2004 +0800, you wrote:
>Content-Type: multipart/alternative;
> boundary="----_=_NextPart_001_01C4484A.3639FA11"
>Content-class: urn:content-classes:message
>
>thats what i have done. started my db at 0x81 in eeprom.
>
>
>----------
>From: en-nut-discussion-bounces at egnite.de
>[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Zheng Anding
>Sent: Wednesday, June 02, 2004 10:18 AM
>To: Ethernut User Chat (English)
>Subject: Re: [En-Nut-Discussion] Save Data to the EEPROM
>
>I thought the first 64 bytes of EEPROM are reserved by Nut/OS and the next
>64 bytes are reserved by Nut/Net, we can use the remaining 3968 bytes,
>according to the software manual...
>
>Harald Kipp <harald.kipp at egnite.de> wrote:
>Joerg,
>
>
>
>
>
> >I found the commands EEPROM_READ and EEPROM_WRITE.
> >
> >#define EEPROM_WRITE(addr,src)
> >
> >My problem now is to get the value for "addr". There are some constant
> >value in the examples like CONFNET_EE_OFFSET, but whats the value I need?
>
>There's no pre-defined value, AFAIK. I recommend to
>start at address 512. Anything from 0 to 511 is
>weakly reserved for Nut/OS.
>
> >Perhaps anybody knows a another way to save the Data?
>
>No, EEPROM is the right place. Have a look into
>nut/os/confos.c, NutLoadConfig() and NutSaveConfig().
>This works with ICC and GCC. Note, that the value
>is read before writing, which reduces wear out.
>(Was it Alexander, who gave this hint?)
>
>Harald
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>Do you Yahoo!?
>Friends. Fun. <http://messenger.yahoo.com/>Try the all-new Yahoo! Messenger
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
More information about the En-Nut-Discussion
mailing list