From 0c50b65a34cd6b3954f7435193411a88adb49cb0 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 13 Oct 2017 15:50:24 +1100 Subject: [PATCH] lwip: Increase minimum TCP/IP task stack size if log level is Debug or Verbose ... unless nano formatting is enabled. Fixes stack overflow in tcpip_adapter at the default level, as reported on forum: https://esp32.com/viewtopic.php?f=2&t=3250&p=15538#p15447 --- components/lwip/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 708a7bd14..fea85aaf1 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -316,9 +316,13 @@ endmenu # UDP config TCPIP_TASK_STACK_SIZE int "TCP/IP Task Stack Size" default 2560 + # for high log levels, tcpip_adapter API calls can end up + # a few calls deep and logging there can trigger a stack overflow + range 2560 65536 if LOG_DEFAULT_LEVEL < 4 || NEWLIB_NANO_FORMAT + range 3072 65536 if LOG_DEFAULT_LEVEL >= 4 && !NEWLIB_NANO_FORMAT help Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations. - The default is 2560 bytes, setting this stack too small will result in stack overflow crashes. + Setting this stack too small will result in stack overflow crashes. menuconfig PPP_SUPPORT bool "Enable PPP support (new/experimental)"