I am trying to use LwIP for the first time, and am having trouble
figuring out what I need to do to properly initialize it.
I am trying to run LwIP version 1.4.1 on an STM23F427 Arm processor, but
I am NOT using the on-chip ethernet interface. I am using it with a
Wiznet W810MJ ethernet module in mac-raw mode. I wish to use the netconn
api in a multi-threaded system. My operating system is a very simple
cooperative multitasking system with no preemption and no task priorities.
So far I have implemented the sys_arch with semaphores, mailboxes,
thread creation and sys_now. I have also written the basic low level
driver interface for my Wiznet ethernet module, including hardware
iniitialization and sending/receiving ethernet frames. For this I
followed the "skeleton" driver sample code.
Now I am trying to get LwIP 1.4.1 initialized. I am doing the following:
tcp_init(NULL,NULL);
netif_add(&wiznetif,&ipaddr,&netmask,&gateway,NULL,ðernetif_init,&tcpip_input);
Where wiznetif is a netif struct, and the IP addresses are initiallized
to my desired static IP, netmask and gateway. When I run my code, I get
as far as calling netif_add, but netif_add never returns. It seems to be
hung in sys_arch_mbox_fetch where it is waiting for a message to be
posted to a mailbox. The mailbox is empty, and nothing is getting posted
to it, which is not surprising since the only LwIP related thread
running is the tcp_ip thread.
I suspect I am doing something wrong in my initialization sequence. Can
someone give me a hint/clue/example of how to initialize LwIP 1.4.1 in a
simple multi-threaded environment?
Keith
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users