I guess these checks should be omitted when using the heap instead of pools.
Simon
Martin Velek wrote:
Hi,
there is a sanity check in init.c
#if (LWIP_UDP&& (MEMP_NUM_UDP_PCB<=0))
#error "If you want to use UDP, you have to define
MEMP_NUM_UDP_PCB>=1 in your lwipopts.h"
#endif
#if (LWIP_TCP&& (MEMP_NUM_TCP_PCB<=0))
#error "If you want to use TCP, you have to define
MEMP_NUM_TCP_PCB>=1 in your lwipopts.h"
#endif
/* There must be sufficient timeouts, taking into account requirements
of the subsystems. */
#if ((NO_SYS==0)&& (MEMP_NUM_SYS_TIMEOUT< (LWIP_TCP + IP_REASSEMBLY
+ LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS +
PPP_SUPPORT)))
#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts"
#endif
etc.
I will try to find if these values have effect.
Martin
On 1 March 2010 10:45, Kieran Mansley<kie...@recoil.org> wrote:
On Sun, 2010-02-28 at 13:16 +0100, Martin Velek wrote:
Hello,
I am running a lwip 1.3.2 with FreeRTOS. I am using own
malloc/free/calloc/realloc memory management. What should I setup in
the lwipopts.h if I would like use only malloc/free... functions for
pbuf's, internal sturctures (arp tables?) and OS support?
Currently I have:
#define SYS_LIGHTWEIGHT_PROT 1
#define NO_SYS 0
#include<stdlib.h> // there are undeclared referneces to free...
#define MEM_LIBC_MALLOC 1
#define MEMP_MEM_MALLOC 1
#define MEM_USE_POOLS 0
Can I do not care about PBUF_POOL_SIZE,
As you've set MEMP_MEM_MALLOC to 1 you will be using malloc instead of
memp_malloc, and so the PBUF_POOL_SIZE is irrelevant.
MEM_SIZE,
This would normally specify the heap size used for mem_malloc, so you
don't need it. You might want to check that mem_init isn't called to
avoid wasting memory.
MEMP_NUM_PBUF,
MEMP_NUM_NETBUF, etc?
As you've defined MEMP_MEM_MALLOC to 1 the other MEMP_ values are all
unused I think. You should probably still set them to zero rather than
undefined though.
If you have problems with any of this let us know as the dependencies
are complex and it wouldn't surprise me if there was a mistake
somewhere.
Kieran
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users