[En-Nut-Discussion] Ethernut 3.9.9 - error on build
William Basser
wbasser at cyberinteg.com
Mon Dec 12 16:25:45 CET 2005
Some additional information, this was necessary as I am using EEPROM in my
code and it conflicts with the config storage area.
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of William Basser
Sent: Monday, December 12, 2005 10:20 AM
To: En-Nut-Discussion at egnite.de
Subject: [En-Nut-Discussion] Ethernut 3.9.9 - error on build
If the EEPROM base address is moved from 0 in the config file, an error is
generated in file
Nut/os/confoos.c, line 76. the code exceprt is shown below. It complains
that the second argument in eeprom_read_block is not properly cast.
I added the specific cast, int* to the function and got a clean build.
ASIS:
int NutLoadConfig(void)
{
#if !defined(__linux__) && !defined(__APPLE__) && !defined(__CYGWIN__) &&
!defined(__arm__)
eeprom_read_block(&confos, (CONFOS_EE_OFFSET), sizeof(CONFOS));
if (confos.size != sizeof(CONFOS) || confos.magic[0] != 'O' ||
confos.magic[1] != 'S') {
return -1;
}
#endif
return 0;
}
MOD:
int NutLoadConfig(void)
{
#if !defined(__linux__) && !defined(__APPLE__) && !defined(__CYGWIN__) &&
!defined(__arm__)
eeprom_read_block(&confos, ((int*)CONFOS_EE_OFFSET), sizeof(CONFOS));
if (confos.size != sizeof(CONFOS) || confos.magic[0] != 'O' ||
confos.magic[1] != 'S') {
return -1;
}
#endif
return 0;
}
Bill Basser
_______________________________________________
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