Discussion:
[lwip-users] lwip and altera ethernet driver
Lakshmi Ramesh
2011-02-18 05:11:15 UTC
Permalink
I'm doing a project,trying to make altera's neek board to communicate with a
PC.I could build and execute the driver program successfully but when I
tried to create a socket and receive/send data I encountered with several
errors.It required to the changing of NO_SYS from 1 to 0 in lwipopts.h which
lead to further errors like no reference to sys_sem_signal etc.This requires
NO_SYS to be =1 to be defined in sys.h.
can someone please help me with this....
--
View this message in context: http://old.nabble.com/lwip-and-altera-ethernet-driver-tp30955985p30955985.html
Sent from the lwip-users mailing list archive at Nabble.com.
Kieran Mansley
2011-02-18 14:07:32 UTC
Permalink
Post by Lakshmi Ramesh
I'm doing a project,trying to make altera's neek board to communicate with a
PC.I could build and execute the driver program successfully but when I
tried to create a socket and receive/send data I encountered with several
errors.It required to the changing of NO_SYS from 1 to 0 in lwipopts.h which
lead to further errors like no reference to sys_sem_signal etc.This requires
NO_SYS to be =1 to be defined in sys.h.
can someone please help me with this....
If you're changing from NO_SYS=1 (a system without an operating system,
where this abstraction layer isn't needed) to NO_SYS=0 (a system with an
operating system where you will need the sys_* functionality) you've got
some work to do. It's not sufficient to just change lwipopts.h; you'll
need to modify the port to work correctly in that very different
environment.

sys_sem_signal is given a stub definition in sys.h if NO_SYS=1. If
you've change NO_SYS to 0 then it declares the function, and it is up to
you to define it, normally in your sys_arch.c. See for example the unix
port in contrib/ports/unix/sys_arch.c

Are you sure you want to change to NO_SYS=0? I'm assuming you're
starting with a port of lwIP to the hardware and system you've got (for
example, where did you get your copy of lwIP from?) and that someone has
configured it like that on purpose.

Kieran
Bill Auerbach
2011-02-18 17:38:07 UTC
Permalink
Post by Kieran Mansley
Are you sure you want to change to NO_SYS=0? I'm assuming you're
starting with a port of lwIP to the hardware and system you've got (for
example, where did you get your copy of lwIP from?) and that someone has
configured it like that on purpose.
I provided a lwIP (NO_SYS=1) Altera NIOS II port to the Altera community
using stock lwIP code (1.3 or 1.4). It's on the lwIP Wiki.

Bill
Simon Goldschmidt
2011-02-18 18:20:13 UTC
Permalink
Post by Bill Auerbach
I provided a lwIP (NO_SYS=1) Altera NIOS II port to the Altera community
using stock lwIP code (1.3 or 1.4).
They used to ship lwIP some years ago (marked as "legacy stack" last time I checked). But they totally stopped that, did they?

Simon
Bill Auerbach
2011-02-18 19:48:52 UTC
Permalink
Post by Simon Goldschmidt
They used to ship lwIP some years ago (marked as "legacy stack" last
time I checked). But they totally stopped that, did they?
It seems to be removed from the installation some 3 years ago and it was
based on something less than 1 - like lwIP 0.7.

Version 8 of the NIOS II tools has no lwIP support and version 10 is out
currently with 11 coming in May. All versions have Interniche which
requires uC/OS-II. There has been some success in the recent past to get
Interniche's "Superloop" mode (what is like our NO_SYS=1 mode) working but
it's not officially supported.

Their driver makes direct use of Interniche H files and structures. I had
to replace a couple of their files with lwIP addition and Interniche removed
and otherwise the lwIP port uses stock Altera drivers and Altera LIBs.
Other than hardware issues the user would also have with Interniche the lwIP
example builds and runs as is - just follow the step-by-step instructions
included.

Bill

Loading...