Dear all, I defined MEM_USE_POOLS=1 and MEMP_USE_CUSTOM_POOLS=1 in lwipopts.h, also created lwippools.h as below
#ifndef __LWIPPOOLS_H__ #define __LWIPPOOLS_H__ /* OPTIONAL: Pools to replace heap allocation * Optional: Pools can be used instead of the heap for mem_malloc. If * so, these should be defined here, in increasing order according to * the pool element size. * * LWIP_MALLOC_MEMPOOL(number_elements, element_size) */ #if MEM_USE_POOLS LWIP_MALLOC_MEMPOOL_START LWIP_MALLOC_MEMPOOL(100, 256) LWIP_MALLOC_MEMPOOL(50, 512) LWIP_MALLOC_MEMPOOL(20, 1024) LWIP_MALLOC_MEMPOOL(20, 1536) LWIP_MALLOC_MEMPOOL_END #endif /* MEM_USE_POOLS */ /* Optional: Your custom pools can go here if you would like to use * lwIP's memory pools for anything else. */ //LWIP_MEMPOOL(SYS_MBOX, 22, 100, "SYS_MBOX") #endif /* __LWIPPOOLS_H__ */ But when i compile i got some error messages: Error : (Serious) C2291E: <expression> expected but found ')' memp.h line 60 Error : (Serious) C2291E: <expression> expected but found ')' memp.h line 69 This is memp.h file where error message was found typedef enum { /* Get the first (via: MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/ MEMP_POOL_HELPER_FIRST = ((u8_t) #define LWIP_MEMPOOL(name,num,size,desc) #define LWIP_MALLOC_MEMPOOL_START 1 #define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0 #define LWIP_MALLOC_MEMPOOL_END #include "lwip/memp_std.h" ) , //<--------------- line 60 /* Get the last (via: MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */ MEMP_POOL_HELPER_LAST = ((u8_t) #define LWIP_MEMPOOL(name,num,size,desc) #define LWIP_MALLOC_MEMPOOL_START #define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size * #define LWIP_MALLOC_MEMPOOL_END 1 #include "lwip/memp_std.h" ) //<--------------- line 69 } memp_pool_helper_t; Anyone faced or knew how to solve it please advise! Thanks a lot Thien
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users