Hi,
First of all, the dlan-greenphy-sdk code is third party code, pls check yourself.
For the DHCP based on LWIP stack whose function is that the ethernet can be assigned an IP address, pls download the LPCopen from the link:
https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...
pls refer to the webserver_freertos example.
C:\DriveE\LPCOpen\lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769.zip\webserver_freertos
there is example of DHCP as the following code:
/* LWIP kickoff and PHY link monitor thread */
static void vSetupIFTask(void *pvParameters) {
ip_addr_t ipaddr, netmask, gw;
volatile s32_t tcpipdone = 0;
uint32_t physts;
static int prt_ip = 0;
DEBUGSTR("LWIP HTTP Web Server FreeRTOS Demo...\r\n");
/* Wait until the TCP/IP thread is finished before
continuing or wierd things may happen */
DEBUGSTR("Waiting for TCPIP thread to initialize...\r\n");
tcpip_init(tcpip_init_done_signal, (void *) &tcpipdone);
while (!tcpipdone) {
msDelay(1);
}
DEBUGSTR("Starting LWIP HTTP server...\r\n");
/* Static IP assignment */
#if LWIP_DHCP
IP4_ADDR(&gw, 0, 0, 0, 0);
IP4_ADDR(&ipaddr, 0, 0, 0, 0);
IP4_ADDR(&netmask, 0, 0, 0, 0);
#else
IP4_ADDR(&gw, 10, 1, 10, 1);
IP4_ADDR(&ipaddr, 10, 1, 10, 234);
IP4_ADDR(&netmask, 255, 255, 255, 0);
#endif
Hope it can help you
BR
XiangJun Rong