[ECOS] Trouble using lwIP (driver crash...)

Michael Grimard michaelg@maxt.com
Mon Apr 3 13:14:00 GMT 2006


Hi,
  I have downloaded the latest source for eCos with the ported version of
lwIP (1.1.1) and I have some trouble with it.

With the eCos Configuration Tool, I choose i386 PC target with i82559
ethernet template with the lwip_eth package and this configuration doesn’t
compile. I got “cyg/fileio/limits.h: No such file or directory” error. In
fact, the directory cyg/fileio has not been created by the config tool. I
added the POSIX File IO compatibility layer package and now eCos builds
without errors. I guess that this package should be included by default


I never used lwIP so I wanted to start with the nc_test_xxx examples to test
it, but nc_test_master.c is not given, so I started porting it to use lwIP.
The biggest problem I had with the code was that gethostbyname() and struct
hostent that are undefined.

struct hostent is defined in netdb.h or dns.h. I don’t have dns.h (the
directory “ns” has not been created by the config tool), so I must use
netdb.h, but by doing this, gethostbyname() gets defined to a function
returning NULL
 That’s not really what I was expecting


Does lwIP supports a call to gethostbyname()? If yes, how can I do it?

For now, I’m using the IP4_ADDR macro and nc_test_master compiles.

Now
 my real problem. Is anybody have used lwIP with the i82559 driver?

When I run nc_test_master, the first packet sent triggers the ARP Protocol.
An ARP Request is sent, the reply from the slave is sent and the master
sends the first packet (NC_REQUEST_TCP_ECHO), but when the master receives
the ACK from the slave, I got:

ASSERT FAIL: <5>if_i82559.c [2008]PacketRxReady() No prev EL

Can anyone help me with this?

If someone has already the nc_test_master.c file modified for lwIP and can
send it to me, I will try it to see if it is the modification I made to the
nc_test_master.c file that causes this or something else (maybe eth_drv.c?).


Thanks,
Michael



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list