Sun 18 Jan 2009 07:38:30 PM UTC, comment #1:
This is not an lwIP problem, but something with your port. pbuf.c does depend on MEM_PBUF_POOL, but that gets defined in memp_std.h which is in turn included from memp.h. What happens si that memp.h defines a macro LWIP_MEMPOOL, which includes memp_std.h multiple times with different values of the LWIP_MEMPOOL macro. In the first one, it is set as this:
typedef enum {
#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
#include "lwip/memp_std.h"
MEMP_MAX
} memp_t;
And in memp_std.h, there is:
#define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc)
and
LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE,
"PBUF_POOL")
Note the use of the preprocessor string concatenation operator. So that's how MEMP_PBUF_POOL gets defined.
Further discussion is better suited to the lwip-users list.
|