This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecos + lwip


Mandeep Sandhu wrote:
On Tue, Sep 1, 2009 at 6:30 PM, Simon Kallweit<simon.kallweit@intefo.ch> wrote:
Mandeep Sandhu wrote:
Well, I had a quick look at the source of netif_add() and netif_find()
and I
can't really see what could potentially go wrong here. Are you sure that
I think netif_add is not being called at all during execution, because I
don't
see any logs corresponding to that.
Well, I think if the synth eth driver is not initialized properly, the netif
will not be added to the list.

But obviously it worked for lwip 1.1.1. Any ideas?

Well, something worked....and something crashed! :P


I replaced lwip_init() with cyg_lwip_sequential_init().

You should not call lwip_init() when using the ecos lwip port. You need to use cyg_lwip_simple_init() or cyg_lwip_sequential_init(). Well, I really should add some documentation I guess.


It's being used in all the test apps). The only difference is, the test apps
call cyg_lwip_thread_new() to create a new thread, while I call sys_thread_new()
(though this is internally calling cyg_lwip_thread_new())

sys_thread_new() will use preallocated memory for the stack, while cyg_lwip_thread_new() will take the stack as an argument. Therefore by default you should use cyg_lwip_thread_new(). When using sys_thread_new() the ecos should fail when all preallocated memory is used.


With this I see the n/w interface being initialized, but the app crashes/hangs
after init-ing the interface:

...
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 11.1.1.1
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 0.0.0.0
netif: added interface et IP addr 11.1.1.1 netmask 255.255.255.0 gw 0.0.0.0
netif: setting default interface et


After this nothing happens. I think the app's crashed here!

What should happen next?


Simon

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]