mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
esp32/lwip: adjust task stack size according 'nano' print
1. Adjust tcpip/main/event/timer task stack size according 'nano' print 2. If 'nano' print is disabled the task stack size reduces 512 bytes
This commit is contained in:
@@ -281,13 +281,13 @@ config SYSTEM_EVENT_QUEUE_SIZE
|
|||||||
|
|
||||||
config SYSTEM_EVENT_TASK_STACK_SIZE
|
config SYSTEM_EVENT_TASK_STACK_SIZE
|
||||||
int "Event loop task stack size"
|
int "Event loop task stack size"
|
||||||
default 4096
|
default 2048
|
||||||
help
|
help
|
||||||
Config system event task stack size in different application.
|
Config system event task stack size in different application.
|
||||||
|
|
||||||
config MAIN_TASK_STACK_SIZE
|
config MAIN_TASK_STACK_SIZE
|
||||||
int "Main task stack size"
|
int "Main task stack size"
|
||||||
default 4096
|
default 3584
|
||||||
help
|
help
|
||||||
Configure the "main task" stack size. This is the stack of the task
|
Configure the "main task" stack size. This is the stack of the task
|
||||||
which calls app_main(). If app_main() returns then this task is deleted
|
which calls app_main(). If app_main() returns then this task is deleted
|
||||||
@@ -310,7 +310,7 @@ config IPC_TASK_STACK_SIZE
|
|||||||
|
|
||||||
config TIMER_TASK_STACK_SIZE
|
config TIMER_TASK_STACK_SIZE
|
||||||
int "High-resolution timer task stack size"
|
int "High-resolution timer task stack size"
|
||||||
default 4096
|
default 3584
|
||||||
range 2048 65536
|
range 2048 65536
|
||||||
help
|
help
|
||||||
Configure the stack size of esp_timer/ets_timer task. This task is used
|
Configure the stack size of esp_timer/ets_timer task. This task is used
|
||||||
|
@@ -35,21 +35,23 @@
|
|||||||
/* controller */
|
/* controller */
|
||||||
#define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 2)
|
#define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 2)
|
||||||
#ifdef CONFIG_NEWLIB_NANO_FORMAT
|
#ifdef CONFIG_NEWLIB_NANO_FORMAT
|
||||||
#define BT_TASK_EXTRA_STACK_SIZE (0)
|
#define TASK_EXTRA_STACK_SIZE (0)
|
||||||
#else
|
#else
|
||||||
#define BT_TASK_EXTRA_STACK_SIZE (512)
|
#define TASK_EXTRA_STACK_SIZE (512)
|
||||||
#endif
|
#endif
|
||||||
#define ESP_TASK_BT_CONTROLLER_STACK (3584 + BT_TASK_EXTRA_STACK_SIZE)
|
|
||||||
|
#define BT_TASK_EXTRA_STACK_SIZE TASK_EXTRA_STACK_SIZE
|
||||||
|
#define ESP_TASK_BT_CONTROLLER_STACK (3584 + TASK_EXTRA_STACK_SIZE)
|
||||||
|
|
||||||
|
|
||||||
/* idf task */
|
/* idf task */
|
||||||
#define ESP_TASK_TIMER_PRIO (ESP_TASK_PRIO_MAX - 3)
|
#define ESP_TASK_TIMER_PRIO (ESP_TASK_PRIO_MAX - 3)
|
||||||
#define ESP_TASK_TIMER_STACK CONFIG_TIMER_TASK_STACK_SIZE
|
#define ESP_TASK_TIMER_STACK (CONFIG_TIMER_TASK_STACK_SIZE + TASK_EXTRA_STACK_SIZE)
|
||||||
#define ESP_TASKD_EVENT_PRIO (ESP_TASK_PRIO_MAX - 5)
|
#define ESP_TASKD_EVENT_PRIO (ESP_TASK_PRIO_MAX - 5)
|
||||||
#define ESP_TASKD_EVENT_STACK CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE
|
#define ESP_TASKD_EVENT_STACK (CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE + TASK_EXTRA_STACK_SIZE)
|
||||||
#define ESP_TASK_TCPIP_PRIO (ESP_TASK_PRIO_MAX - 7)
|
#define ESP_TASK_TCPIP_PRIO (ESP_TASK_PRIO_MAX - 7)
|
||||||
#define ESP_TASK_TCPIP_STACK CONFIG_TCPIP_TASK_STACK_SIZE
|
#define ESP_TASK_TCPIP_STACK (CONFIG_TCPIP_TASK_STACK_SIZE + TASK_EXTRA_STACK_SIZE)
|
||||||
#define ESP_TASK_MAIN_PRIO (ESP_TASK_PRIO_MIN + 1)
|
#define ESP_TASK_MAIN_PRIO (ESP_TASK_PRIO_MIN + 1)
|
||||||
#define ESP_TASK_MAIN_STACK CONFIG_MAIN_TASK_STACK_SIZE
|
#define ESP_TASK_MAIN_STACK (CONFIG_MAIN_TASK_STACK_SIZE + TASK_EXTRA_STACK_SIZE)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -308,11 +308,11 @@ endmenu # UDP
|
|||||||
|
|
||||||
config TCPIP_TASK_STACK_SIZE
|
config TCPIP_TASK_STACK_SIZE
|
||||||
int "TCP/IP Task Stack Size"
|
int "TCP/IP Task Stack Size"
|
||||||
default 2560
|
default 2048
|
||||||
# for high log levels, tcpip_adapter API calls can end up
|
# for high log levels, tcpip_adapter API calls can end up
|
||||||
# a few calls deep and logging there can trigger a stack overflow
|
# a few calls deep and logging there can trigger a stack overflow
|
||||||
range 2560 65536 if LOG_DEFAULT_LEVEL < 4 || NEWLIB_NANO_FORMAT
|
range 2048 65536 if LOG_DEFAULT_LEVEL < 4
|
||||||
range 3072 65536 if LOG_DEFAULT_LEVEL >= 4 && !NEWLIB_NANO_FORMAT
|
range 2560 65536 if LOG_DEFAULT_LEVEL >= 4
|
||||||
help
|
help
|
||||||
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
|
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
|
||||||
Setting this stack too small will result in stack overflow crashes.
|
Setting this stack too small will result in stack overflow crashes.
|
||||||
|
Reference in New Issue
Block a user