[ECOS] ecos + lwip
Tue Sep 1 15:20:00 GMT 2009
On Tue, Sep 1, 2009 at 7:08 PM, Simon Kallweit<firstname.lastname@example.org> wrote:
> Mandeep Sandhu wrote:
> 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.
Yes. Documentation would help a lot. Thanks.
>> It's being used in all the test apps). The only difference is, the test
>> call cyg_lwip_thread_new() to create a new thread, while I call
>> (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.
But sys_thread_new() also takes stacksize as an argument. It passes
the same value
to cyg_lwip_thread_new() after validating it. So I guess it should be ok.
>> With this I see the n/w interface being initialized, but the app
>> after init-ing the interface:
>> netif_set_ipaddr: netif address being changed
>> netif: IP address of interface set to 126.96.36.199
>> 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 188.8.131.52 netmask 255.255.255.0 gw
>> netif: setting default interface et
Whoops! Sorry. I guess its not obvious to others on what happens next! :)
Well, after this I should see debug o/p of my thread. Here's the code:
(void *)"My thread",
m_main( void *arg )
LOG(LOG_DEBUG,"%s started...", (char *)arg);
So I'm expecting "My thread started" as the next o/p.
Same code works fine with 1.1.1
>> After this nothing happens. I think the app's crashed here!
> What should happen next?
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