-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building with MEM_USE_POOLS=1 #11
Comments
if I change makes sense because ((volatile uint32)0x600011FC) is not a static value now the compilation dies at lwip/netif/etharp.c: In function 'etharp_query': |
in lwip/netif/etharp.c line 116 needs to be memp_free(MEMP_ARP_QUEUE, old); |
ld: address 0x4000e118 of build/app.out section can see from my linker map that memp is eating up the RAM: .bss 0x000000003fff0c40 0x1b34c liblwip_open.a(memp.o) any suggestions? |
No real idea - sorry. As the code is actually from the esp-open-sdk I assume, that never anybody has tried to compile this with this option for the ESP. I would read the last error: .bbs not within dram as: too much RAM allocated for static variables (buffers)? |
anyone succeed in building with MEM_USE_POOLS=1 to avoid memory fragmentation?
tried to removed attr/DMEM_ATTR parameters in meme_std.h and creating a lwippools.h with:
#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 */
but still get error when compiling:
In file included from lwip/core/memp.c:141:0:
include/lwip/memp_std.h:42:1: error: initializer element is not constant
LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB")
^
include/lwip/memp_std.h:42:1: error: (near initialization for 'memp_num[2]')
lwip/core/memp.c:160:47: error: variably modified 'memp_memory_TCP_PCB_base' at file scope
#define LWIP_MEMPOOL(name,num,size,desc) u8_t memp_memory_ ## name ## _base
^
include/lwip/memp_std.h:42:1: note: in expansion of macro 'LWIP_MEMPOOL'
LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB")
^
think I don't quite understand how the LWIP_MEMPOOL macro stuff works
any clues?
The text was updated successfully, but these errors were encountered: