Part Number: MSP432E401Y
HI,
I'm trying to adapt the boot_emac_flash_app_magicpacket_update_MSP_EXP432E401Y_nortos_ccs example to work with a static IP instead of a DHCP server, however I'm running into an error that I'm having difficulty tracking down.
This is most likely an lwip issue rather than TI specific, but still hoping someone may be able to help or advise so as I'm not very familiar with lwip either.
basically, I made these changes:
in enet_lwip.c, I commented out the USING DHCP section and the "wait for IP Address to be acquired" part starting around line 240 and added Static IP values
...
/* USING DHCP */
/* Initialize the lwIP library, using DHCP. */
/* lwIPInit(getSystemClock, pui8MACArray, 0, 0, 0, IPADDR_USE_DHCP); */
/* USING STATIC IP */
ip4_addr_t ipaddr;
ip4_addr_t netmask;
ip4_addr_t gw;
IP4_ADDR(&ipaddr, 192, 168, 1, 50);
IP4_ADDR(&netmask, 255, 255, 255, 0);
IP4_ADDR(&gw, 192, 168, 1, 1);
/* Initialize the lwIP library, using Static IP. */
lwIPInit(getSystemClock, pui8MACArray, ipaddr.addr, netmask.addr, gw.addr,
IPADDR_USE_STATIC);
UARTprintf("\nEntered IP Address: ");
DisplayIPAddress(ipaddr.addr);
/* Wait for the IP Address to be acquired */
// while(!g_bIPAddressAcquired)
// {
// }
/* Print the status message saying that we are ready for another update */
UARTprintf("\n\nDevice ready for detecting Magic Packet on UDP Port 9\n");
...
Then, in lwipopts.h I changed the #define options for LWIP_DHCP and LWIP_AUTOIP from 1 to 0
When I compile I get the following error in the lwip source in file lwiplib.c:
>> Compilation failure
lwip/ports/msp432e4/utils/subdir_rules.mk:16: recipe for target 'lwip/ports/msp432e4/utils/lwiplib.obj' failed
"C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source/third_party/lwip/ports/msp432e4/utils/lwiplib.c", line 448: error #20: identifier "ARP_TMR_INTERVAL" is undefined
"C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source/third_party/lwip/ports/msp432e4/utils/lwiplib.c", line 451: warning #225-D: function "etharp_tmr" declared implicitly
1 error detected in the compilation of "C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source/third_party/lwip/ports/msp432e4/utils/lwiplib.c".
If I change the #define for either LWIP_AUOTIP or LWIP_DHCP back to 1 then this error disappears, but then the IP is never properly acquired and then I can't ever respond to the BOOTP request, even when commenting out the Wait for the IP Address to be acquired section in enet_lwip.c