AnsweredAssumed Answered

Anyone know how to get rid of error for MEMP_TCPIP_MSG_INPKT in tcpip

Question asked by greenwood.greg on Apr 26, 2018

I have a build of the LwIP for F746G-Discovery using the LwIP middleware.  I just noticed that although the build compiles and runs there are errors that pop up long after the compile is finished building the .elf.  It turns up in tcpip.c and the constants MEMP_TCPIP_MSG_INPKT and MEMP_TCPIP_MSG_API are coming up as undefined.  The code where the errors are never executes, if fact I think it is never linked in.  It would be nice to not have the errors there in the first place.  Anyone seen this and know how to kill the errors.  I would have thought that the values would have been defined in the appropriate h file.  The best I could find is a very round about include that is really hard to follow in memp.h which reads:

typedef enum {
#define LWIP_MEMPOOL(name,num,size,desc)  MEMP_##name,
#include "lwip/priv/memp_std.h"
  MEMP_MAX
} memp_t;

 

Then in the memp_std.h is has: (lines 81-84)

#if !LWIP_TCPIP_CORE_LOCKING_INPUT
LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT, sizeof(struct tcpip_msg),      "TCPIP_MSG_INPKT")
#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */
#endif /* NO_SYS==0 */

Outcomes