mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7194 from mikaleppanen/lwip_debug_stack
Increased LWIP main worker thread stack size for debug buildspull/7224/head
commit
a588d15ab4
|
@ -90,15 +90,22 @@
|
|||
#define DEFAULT_RAW_RECVMBOX_SIZE 8
|
||||
#define DEFAULT_ACCEPTMBOX_SIZE 8
|
||||
|
||||
// Thread stacks use 8-byte alignment
|
||||
#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos))
|
||||
|
||||
// Thread stack size for lwip tcpip thread
|
||||
#ifndef MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE
|
||||
#define MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE 1200
|
||||
#endif
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#define TCPIP_THREAD_STACKSIZE MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2
|
||||
// For LWIP debug, double the stack
|
||||
#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2, 8)
|
||||
#elif MBED_DEBUG
|
||||
// When debug is enabled on the build increase stack 25 percent
|
||||
#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE + MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE / 4, 8)
|
||||
#else
|
||||
#define TCPIP_THREAD_STACKSIZE MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE
|
||||
#define TCPIP_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE, 8)
|
||||
#endif
|
||||
|
||||
#define TCPIP_THREAD_PRIO (osPriorityNormal)
|
||||
|
@ -114,11 +121,11 @@
|
|||
#endif
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#define DEFAULT_THREAD_STACKSIZE MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2
|
||||
#define PPP_THREAD_STACK_SIZE MBED_CONF_LWIP_PPP_THREAD_STACKSIZE*2
|
||||
#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2, 8)
|
||||
#define PPP_THREAD_STACK_SIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_PPP_THREAD_STACKSIZE*2, 8)
|
||||
#else
|
||||
#define DEFAULT_THREAD_STACKSIZE MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE
|
||||
#define PPP_THREAD_STACK_SIZE MBED_CONF_LWIP_PPP_THREAD_STACKSIZE
|
||||
#define DEFAULT_THREAD_STACKSIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE, 8)
|
||||
#define PPP_THREAD_STACK_SIZE LWIP_ALIGN_UP(MBED_CONF_LWIP_PPP_THREAD_STACKSIZE, 8)
|
||||
#endif
|
||||
|
||||
#define MEMP_NUM_SYS_TIMEOUT 16
|
||||
|
|
Loading…
Reference in New Issue