How to enable memory pools is lwip?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to enable memory pools is lwip?

ソリューションへジャンプ
1,760件の閲覧回数
freddy_ben-zeev
Contributor IV

I've tried to set MEM_USE_POOLS to 1 - it complains that it also needs MEMP_USE_CUSTOM_POOLS. I've set MEMP_USE_CUSTOM_POOLS also to 1, it fails to compile memp_priv.h in this section:

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/priv/memp_std.h"
) ,
/* 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/priv/memp_std.h"
)
} memp_pool_helper_t;


Any ideas?

Freddy

タグ(2)
0 件の賞賛
1 解決策
1,550件の閲覧回数
freddy_ben-zeev
Contributor IV

Found the problem...

The file lwippools.h (generated by ProcessorExpert). starts with:
#ifndef LWIP_LWIPPOOLS_H
#define LWIP_LWIPPOOLS_H
And ends with:
#endif /* LWIP_LWIPPOOLS_H */
Unfortunately this file needs to be included multiple times to create the pools.
Please remove (or comment out) those three lines.

This would not have happened if I didn't used ProcessorExpert generated file as my starting point (the generated file do not use memory pools).

Freddy

元の投稿で解決策を見る

0 件の賞賛
1 返信
1,551件の閲覧回数
freddy_ben-zeev
Contributor IV

Found the problem...

The file lwippools.h (generated by ProcessorExpert). starts with:
#ifndef LWIP_LWIPPOOLS_H
#define LWIP_LWIPPOOLS_H
And ends with:
#endif /* LWIP_LWIPPOOLS_H */
Unfortunately this file needs to be included multiple times to create the pools.
Please remove (or comment out) those three lines.

This would not have happened if I didn't used ProcessorExpert generated file as my starting point (the generated file do not use memory pools).

Freddy

0 件の賞賛