MEM_TCP_PCB not declared
MEM_TCP_PCB not declared
I try to compile TelnetClient from STM32Duino STM32Ethernet library.
I also added STM32Duino LwIP to the project.
There is an error message: 'MEM_TCP_PCB' not declared.
In lwipopts_defaults.h, included by default, there is a MEMP_NUM_TCP_PCB defined (and other defines with same prefix, MEMP_NUM_TCP).
Libraries are last released version, respectively 1.2.0 and 2.1.2.
Board is STM32F746 Discovery, core is 1.9.0.
Any clue?
I also added STM32Duino LwIP to the project.
There is an error message: 'MEM_TCP_PCB' not declared.
In lwipopts_defaults.h, included by default, there is a MEMP_NUM_TCP_PCB defined (and other defines with same prefix, MEMP_NUM_TCP).
Libraries are last released version, respectively 1.2.0 and 2.1.2.
Board is STM32F746 Discovery, core is 1.9.0.
Any clue?
It's definitely a Sloeber problem.
In STM32duino_LwIP/src/lwip/memp.h, LWIP_MEMPOOL macro is defined:
This code will define MEMP_TCP_PCB.
I solved it by commenting the pragma added by Sloeber in STM32duino_LwIP/src/lwip/priv/memp_std.h:
So, Arduino IDE is useless to track this kind of problem. I used VSCode, to do it, then solved it in Sloeber.
@fpiSTM, thank you for your help!
Go to full postIn STM32duino_LwIP/src/lwip/memp.h, LWIP_MEMPOOL macro is defined:
Code: Select all
/** Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */
typedef enum {
#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
#include "lwip/priv/memp_std.h"
MEMP_MAX
} memp_t;
I solved it by commenting the pragma added by Sloeber in STM32duino_LwIP/src/lwip/priv/memp_std.h:
Code: Select all
//Added by Sloeber
//#pragma once
@fpiSTM, thank you for your help!
Re: MEM_TCP_PCB not declared
Hi @Patrick
I've tested and have no error.
You used Arduino IDE ?
I've tested and have no error.
You used Arduino IDE ?
Re: MEM_TCP_PCB not declared
No, Eclipse + Sloeber.
But where is declared MEM_TCP_PCB in this case?
But where is declared MEM_TCP_PCB in this case?
Re: MEM_TCP_PCB not declared
I don't know. Did you change lwip options?
Re: MEM_TCP_PCB not declared
No.
Still at work?
Still at work?
Re: MEM_TCP_PCB not declared
No. Anyway I guess something goes wrong with sloeber.
Re: MEM_TCP_PCB not declared
It's definitely a Sloeber problem.
In STM32duino_LwIP/src/lwip/memp.h, LWIP_MEMPOOL macro is defined:
This code will define MEMP_TCP_PCB.
I solved it by commenting the pragma added by Sloeber in STM32duino_LwIP/src/lwip/priv/memp_std.h:
So, Arduino IDE is useless to track this kind of problem. I used VSCode, to do it, then solved it in Sloeber.
@fpiSTM, thank you for your help!
In STM32duino_LwIP/src/lwip/memp.h, LWIP_MEMPOOL macro is defined:
Code: Select all
/** Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */
typedef enum {
#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name,
#include "lwip/priv/memp_std.h"
MEMP_MAX
} memp_t;
I solved it by commenting the pragma added by Sloeber in STM32duino_LwIP/src/lwip/priv/memp_std.h:
Code: Select all
//Added by Sloeber
//#pragma once
@fpiSTM, thank you for your help!
Re: MEM_TCP_PCB not declared
welcome, you made all the jobs
I guess you should raised an issue on Sloeber GitHub. Like this you will have Jantje's feedback.

I guess you should raised an issue on Sloeber GitHub. Like this you will have Jantje's feedback.