[En-Nut-Discussion] Atmel AVR embedded internet toolkit with CS8900A ethernet chip, e thernut port

Doug Daniels ddaniels at baycomp.com
Tue Aug 26 21:02:29 CEST 2003


Hi, I'm a newbie to using ethernut so maybe I'm just running into some
common problems, but I've looked around and read most of the getting started
ethernut docs and have a couple problems. First of all I'm using an Atmel
Embedded internet toolkit demo board which is very similar to the ethernut
board, we've replaced the atmega103 with an atmega128, and the ethernet chip
is not the Realtek, but instead is a Cyrus, CS8900A ethernut chip. I'm not
sure if anyone else has tried porting/compiling ethernut for use with this
demo board. I know that I was able to acquire a cs8900A driver for ethernut
so hopefully that will work out.
Now my next problem is compiling/linking/uploading ethernut. I've ran the
config and am using WinAVR so I have the object files in my
nut\lib\gcc\atmega128\ folder, but I'm not sure how to proceed I've tried
linking the files there together using this command:
avr-ld init.o nutinit.o libnutnet.a libnutcrt.a libnutcrtf.a libnutdev.a
libnutfs.a libnutos.a libnutpro.a

but I received this error:
nutinit.o: In function `NutIdle':
nutinit.o(.text+0x0): multiple definition of `NutIdle'
init.o(.text+0x0): first defined here
avr-ld: section .init8 [00000c7a -> 00000d03] overlaps section .data
[00000c7a -
> 00000c8d]
init.o: In function `NutIdle':
init.o(.text+0xc): undefined reference to `NutMain'
init.o(.text+0xe): undefined reference to `NutMain'
init.o: In function `NutLoadConfig':
init.o(.text+0x30): undefined reference to `eeprom_read_block'
init.o: In function `NutSaveConfig':
init.o(.text+0x84): undefined reference to `eeprom_write_byte'
libnutos.a(timer.o): In function `NutTimerStart':
timer.o(.text+0x25c): undefined reference to `__udivmodsi4'
timer.o(.text+0x278): undefined reference to `__udivmodsi4'
libnutos.a(timer.o): In function `NutComputeCpuClock':
timer.o(.text+0x466): undefined reference to `sig_OVERFLOW0'
timer.o(.text+0x468): undefined reference to `sig_OVERFLOW0'
timer.o(.text+0x46a): undefined reference to `NutRegisterIrqHandler'
libnutos.a(timer.o): In function `L_w4346':
timer.o(.text+0x4c6): undefined reference to `__mulsi3'
timer.o(.text+0x4e6): undefined reference to `__udivmodsi4'
libnutos.a(thread.o): In function `GetThreadByName':
thread.o(.text+0x3d4): undefined reference to `strcmp'
libnutos.a(heap.o): In function `NutHeapAllocClear':
heap.o(.text+0x108): undefined reference to `memset'

C:\ethernut\nut\lib\gcc\atmega128>avr-ld init.o libnutnet.a libnutcrt.a
libnutcr
tf.a libnutdev.a libnutfs.a libnutos.a libnutpro.a
init.o: In function `NutIdle':
init.o(.text+0xc): undefined reference to `NutMain'
init.o(.text+0xe): undefined reference to `NutMain'
init.o: In function `NutLoadConfig':
init.o(.text+0x30): undefined reference to `eeprom_read_block'
init.o: In function `NutSaveConfig':
init.o(.text+0x84): undefined reference to `eeprom_write_byte'
libnutos.a(timer.o): In function `NutTimerStart':
timer.o(.text+0x25c): undefined reference to `__udivmodsi4'
timer.o(.text+0x278): undefined reference to `__udivmodsi4'
libnutos.a(timer.o): In function `NutComputeCpuClock':
timer.o(.text+0x466): undefined reference to `sig_OVERFLOW0'
timer.o(.text+0x468): undefined reference to `sig_OVERFLOW0'
timer.o(.text+0x46a): undefined reference to `NutRegisterIrqHandler'
libnutos.a(timer.o): In function `L_w4346':
timer.o(.text+0x4c6): undefined reference to `__mulsi3'
timer.o(.text+0x4e6): undefined reference to `__udivmodsi4'
libnutos.a(thread.o): In function `GetThreadByName':
thread.o(.text+0x3d4): undefined reference to `strcmp'
libnutos.a(heap.o): In function `NutHeapAllocClear':
heap.o(.text+0x108): undefined reference to `memset'

-----------------------
I use AVR studio to upload my compiled AVR files, and I've been able to port
Adam Dunkel's uIP to this demo board, but now my company wants a RTOS
ethernet embedded device, and they want to use open source code, so ethernut
was the clear choice. So any help that'd be great. Also how do I go about
compiling the CS8900A driver instead of the Realtek one, I'm assuming I'll
just fool around with the makefiles. I'm sorry if these are simple
questions, i'm a college intern and am just looking to see if the work I'm
doing hasn't already been done.



More information about the En-Nut-Discussion mailing list