On Wed, Sep 2, 2009 at 11:45 AM, Mandeep Sandhu<[email protected]> wrote: >> >> You need to wait for cyg_lwip_sequential_init() to return before creating >> user threads. > > That should be happening since I'm calling cyg_lwip_sequential_init() before > even creating my own thread! > > <snip> > > cyg_lwip_sequential_init(); > > cyg_lwip_thread_new( "My thread", m_main, (void *)"My thread", > my_stack, 0x1000, 5 ); > ... > ... > <snip> > > I'll enable more debugs to see where it's getting stuck.
Hi Simon, I think I've partially fixed the issue. While going through the default config I noticed that the TCPIP thread's default priority is set to 8. Which was lower than my threads prio - 5. After changing it to 2, it's able to find the interface (et0) with all the right settings. Now another problem has cropped up! :) Sorry. My app's actually a DHCP server. So it receives DHCP packets with 0.0.0.0 as the src IP. However, the stack is dropping them with the following message: ip_input: iphdr->dest 0xffffffff netif->ip_addr 0x101010b (0xffffff, 0x1010b, 0xff000000) ip_input: packet accepted on interface et ip_input: packet source is not valid. I've enabled the following in my config: * Support broadcast filter * Receive support Is anything else needed? Just one more thing: While tracing the path from cyg_lwip_sequential_init() to see what all happens, I saw that we end up calling lwip_init() twice! Once in cyg_lwip_sequential_init() and then again in tcpip_init(). Why do we do it twice? The only function called between these 2 calls is cyg_semaphore_init(). I think we can remove one of these. Or am I missing something? Thanks, -mandeep > >> >> 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
