diff --git a/components/esp8266/Kconfig b/components/esp8266/Kconfig index a69952cc..711b2bf1 100644 --- a/components/esp8266/Kconfig +++ b/components/esp8266/Kconfig @@ -63,6 +63,14 @@ config CONSOLE_UART_SWAP_IO help Enable this option, UART0's I/O pins are swaped: TXD <-> RTS, RTX <-> CTS. +config MAIN_TASK_STACK_SIZE + int "Main task stack size" + default 3584 + help + 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 + and its stack memory is freed. + endmenu menu WIFI diff --git a/components/esp8266/source/startup.c b/components/esp8266/source/startup.c index e8b991fe..1adc724f 100644 --- a/components/esp8266/source/startup.c +++ b/components/esp8266/source/startup.c @@ -114,7 +114,7 @@ void call_user_start(size_t start_addr) wifi_os_init(); - assert(wifi_task_create(user_init_entry, "uiT", 2048, NULL, wifi_task_get_max_priority()) != NULL); + assert(wifi_task_create(user_init_entry, "uiT", CONFIG_MAIN_TASK_STACK_SIZE, NULL, wifi_task_get_max_priority()) != NULL); wifi_os_start(); }