admin管理员组文章数量:1221301
I have defined the following in lwipopts.h
:
#define MEM_USE_POOLS 1
#define MEMP_USE_CUSTOM_POOLS 1
#define MEMP_NUM_PBUF DRV_ETH_LWIP_BUF_TX_NUM
#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
In lwippools.h
I have:
/// @file lwippools.h
///
/// Define three pools with sizes 256, 512, and DRV_ETH_LWIP_BUF_RX_SIZE bytes
LWIP_MALLOC_MEMPOOL_START
LWIP_MALLOC_MEMPOOL(35, 256)
LWIP_MALLOC_MEMPOOL(30, 512)
LWIP_MALLOC_MEMPOOL(9, DRV_ETH_LWIP_BUF_RX_SIZE)
LWIP_MALLOC_MEMPOOL_END
/*
/// Enable below if sys arch uses memory pools
LWIP_MEMPOOL(SYS_MBOX, 22, sizeof(struct sys_mbox_struct), "SYS_MBOX")
LWIP_MEMPOOL(SYS_SEM, 12, sizeof(struct sys_sem_struct), "SYS_SEM")
*/
How can I relocate the MALLOC pool into my custom section .eth_lwip_heap_section
?
I need to do so for DMA reasons.
I tried to use __attribute__((section(".eth_lwip_heap_section"))) extern u8_t memp_memory_MALLOC_base[];
but it doesn't work.
There must be a different way to do it with the malloc pool. Simply defining LWIP_RAM_HEAP_POINTER
does not work either.
I am also unsure if I need a custom PBUF pool too if I have the malloc pool.
本文标签: cLWIP relocate a custom malloc mempoolStack Overflow
版权声明:本文标题:c - LWIP relocate a custom malloc mempool - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739357642a2159673.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论