|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-users] Initialization problem upgrading from 1.4.1 to 2.0.3 |
Date: | Thu, 5 Apr 2018 21:05:54 +0200 |
I am trying to use lwip on ARM cortex M4. My development software is Atollic Truestudio on Win10. So far I have gotten lwip 1.4.1 to work using raw api and a simple multitasking OS.
Now I am trying to change over to lwip 2.0.3, and am having trouble with initialization. My initialization code is as follows:
#include "lwipopts.h"
#include "lwip/tcpip.h"
#include "lwip/tcp.h"
struct netif wiznetif; // network interface struct for wiznet
...
static void initialize_lwip(void) {
struct ip_addr ipaddr, netmask, gateway;
IP4_ADDR(&ipaddr, setup.ip_address[0], setup.ip_address[1], setup.ip_address[2], setup.ip_address[3]);
IP4_ADDR(&netmask, setup.subnet[0], setup.subnet[1], setup.subnet[2], setup.subnet[3]);
IP4_ADDR(&gateway, setup.gateway[0], setup.gateway[1], setup.gateway[2], setup.gateway[3]);
tcpip_init(NULL, NULL);
netif_add(&wiznetif, &ipaddr, &netmask, &gateway, NULL, ðernetif_init, &tcpip_input);
netif_set_up(&wiznetif);
}
This works with lwip 1.4.1, but with 2.0.3 I get an compile error, storage size of 'ipaddr' isn't known. Apparently struct ip_addr isn't defined. I must be missing an include. Or maybe the ip address is defined differently in 2.0.3? I can't seem to find a simple example of initialization code for 2.0.3. BTW, I use ipv4 only, no ipv6.
Also, any other raw api or sys_arch changes I need to watch out for in 2.0.3?
Keith
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |