mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #3078 from infinnovation/lwip-config
lwip: Allow several configuration macros to be set externally (bis)pull/3182/head
commit
8b05a2a02b
|
@ -105,12 +105,54 @@
|
||||||
|
|
||||||
#define LWIP_RAM_HEAP_POINTER lwip_ram_heap
|
#define LWIP_RAM_HEAP_POINTER lwip_ram_heap
|
||||||
|
|
||||||
|
// Number of pool pbufs.
|
||||||
|
// Each requires 684 bytes of RAM.
|
||||||
|
#ifndef PBUF_POOL_SIZE
|
||||||
#define PBUF_POOL_SIZE 5
|
#define PBUF_POOL_SIZE 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// One tcp_pcb_listen is needed for each TCPServer.
|
||||||
|
// Each requires 72 bytes of RAM.
|
||||||
|
#ifdef MBED_CONF_LWIP_TCP_SERVER_MAX
|
||||||
|
#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX
|
||||||
|
#else
|
||||||
#define MEMP_NUM_TCP_PCB_LISTEN 4
|
#define MEMP_NUM_TCP_PCB_LISTEN 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// One is tcp_pcb needed for each TCPSocket.
|
||||||
|
// Each requires 196 bytes of RAM.
|
||||||
|
#ifdef MBED_CONF_LWIP_TCP_SOCKET_MAX
|
||||||
|
#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX
|
||||||
|
#else
|
||||||
#define MEMP_NUM_TCP_PCB 4
|
#define MEMP_NUM_TCP_PCB 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// One udp_pcb is needed for each UDPSocket.
|
||||||
|
// Each requires 84 bytes of RAM (total rounded to multiple of 512).
|
||||||
|
#ifdef MBED_CONF_LWIP_UDP_SOCKET_MAX
|
||||||
|
#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX
|
||||||
|
#else
|
||||||
#define MEMP_NUM_UDP_PCB 4
|
#define MEMP_NUM_UDP_PCB 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Number of non-pool pbufs.
|
||||||
|
// Each requires 92 bytes of RAM.
|
||||||
|
#ifndef MEMP_NUM_PBUF
|
||||||
#define MEMP_NUM_PBUF 8
|
#define MEMP_NUM_PBUF 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each netbuf requires 64 bytes of RAM.
|
||||||
|
#ifndef MEMP_NUM_NETBUF
|
||||||
#define MEMP_NUM_NETBUF 8
|
#define MEMP_NUM_NETBUF 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// One netconn is needed for each UDPSocket, TCPSocket or TCPServer.
|
||||||
|
// Each requires 236 bytes of RAM (total rounded to multiple of 512).
|
||||||
|
#ifdef MBED_CONF_LWIP_SOCKET_MAX
|
||||||
|
#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX
|
||||||
|
#else
|
||||||
|
#define MEMP_NUM_NETCONN 4
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TCP_QUEUE_OOSEQ 0
|
#define TCP_QUEUE_OOSEQ 0
|
||||||
#define TCP_OVERSIZE 0
|
#define TCP_OVERSIZE 0
|
||||||
|
|
|
@ -16,6 +16,22 @@
|
||||||
"addr-timeout": {
|
"addr-timeout": {
|
||||||
"help": "On dual stack system how long to wait preferred stack's address in seconds",
|
"help": "On dual stack system how long to wait preferred stack's address in seconds",
|
||||||
"value": 5
|
"value": 5
|
||||||
|
},
|
||||||
|
"socket-max": {
|
||||||
|
"help": "Maximum number of open TCPServer, TCPSocket and UDPSocket instances allowed, including one used internally for DNS. Each requires 236 bytes of pre-allocated RAM",
|
||||||
|
"value": 4
|
||||||
|
},
|
||||||
|
"tcp-server-max": {
|
||||||
|
"help": "Maximum number of open TCPServer instances allowed. Each requires 72 bytes of pre-allocated RAM",
|
||||||
|
"value": 4
|
||||||
|
},
|
||||||
|
"tcp-socket-max": {
|
||||||
|
"help": "Maximum number of open TCPSocket instances allowed. Each requires 196 bytes of pre-allocated RAM",
|
||||||
|
"value": 4
|
||||||
|
},
|
||||||
|
"udp-socket-max": {
|
||||||
|
"help": "Maximum number of open UDPSocket instances allowed, including one used internally for DNS. Each requires 84 bytes of pre-allocated RAM",
|
||||||
|
"value": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue