[En-Nut-Discussion] Compiling Ethernut with WinAVR

Gert Jan Kruizinga gjk at gjk4all.net
Fri Jan 10 15:46:08 CET 2003

I had the same problem on the linux distribution

This is due to some changes in the eeprom code from the new libc. I had to 
merge the originam libc avr/eeprom.h header file whith te avr/eeprom.h 
header file from the nut/os tree.

After that you're left with one problem in the ifconfig.c, there is a call 
to eeprom_block_read where te address is given as an integer, in the new 
libc this has to be a pointer, so adding a anpassant (&) in front of this 
address variable will solve the problem.

I'm apoligize for possible errors in the above, i'm on my work right now. 
If there is a interrest for it then i can mail the diffs for the lib 
tonight (europe).

Gert Jan Kruizinga.

> I'm having trouble compiling Ethernut 2.5.2 using WinAVR-20021209.  The
> compiler has trouble with the calls to eeprom_wb in init.c, and
> ifconfig.c.  I had no trouble when using the experimental GCC3.2
> release from AVRfreaks.  There is no problem when compiling the library
> files, only when compiling an app.
> Commenting out these calls in the library allows the app to compile
> with no errors.  Replacing the call to eeprom_wb with a call to
> eeprom_write_byte gives an error when compiling the library files.
> I'd stick with the GCC3.2 release from AVRfreaks, but I want to use the
> experimental PPP version, which I think requires a newer version of
> libc. 
> Any ideas???
> Thanks,
> Louis Beaudoin
> C:/egnite/nut/lib/gcc/atmega128/init.o(.text+0x84): In function
> `NutSaveConfig':
> : undefined reference to `eeprom_wb'
> C:/egnite/nut/lib/gcc/atmega128\libnutnet.a(ifconfig.o)(.text+0xc0): In
> function `NutNetSaveConfig':                                           
>                 : undefined reference to `eeprom_wb'                   
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion

More information about the En-Nut-Discussion mailing list