diff --git a/components/esp8266/driver/uart.c b/components/esp8266/driver/uart.c index 6573299a..269940b2 100644 --- a/components/esp8266/driver/uart.c +++ b/components/esp8266/driver/uart.c @@ -185,7 +185,7 @@ void uart_init(void) xQueueUart = xQueueCreate(32, sizeof(os_event_t)); - xTaskCreate(uart_task, (uint8_t const*)"uTask", 512, NULL, tskIDLE_PRIORITY + 2, &xUartTaskHandle); + xTaskCreate(uart_task, (uint8_t const*)"uTask", 2048, NULL, tskIDLE_PRIORITY + 2, &xUartTaskHandle); } #endif diff --git a/components/esp8266/lib/VERSION b/components/esp8266/lib/VERSION index 08c0b478..f0df4532 100644 --- a/components/esp8266/lib/VERSION +++ b/components/esp8266/lib/VERSION @@ -1,10 +1,10 @@ gwen: crypto: 8943c89 espnow: 8943c89 - core: 15348a7 - net80211: 68f6a7c - pp: bdb3c08 + core: fdd8880 + net80211: fdd8880 + pp: fdd8880 pwm: 0181338 smartconfig:9ec59b5 wpa: 8943c89 - wps: 8943c89 \ No newline at end of file + wps: fdd8880 \ No newline at end of file diff --git a/components/esp8266/lib/libcore.a b/components/esp8266/lib/libcore.a index 110b9e1d..691eaeb4 100644 Binary files a/components/esp8266/lib/libcore.a and b/components/esp8266/lib/libcore.a differ diff --git a/components/esp8266/lib/libnet80211.a b/components/esp8266/lib/libnet80211.a index 6261c5e7..b5ccd72d 100644 Binary files a/components/esp8266/lib/libnet80211.a and b/components/esp8266/lib/libnet80211.a differ diff --git a/components/esp8266/lib/libpp.a b/components/esp8266/lib/libpp.a index 3a4a0722..c99bfe6d 100644 Binary files a/components/esp8266/lib/libpp.a and b/components/esp8266/lib/libpp.a differ diff --git a/components/esp8266/lib/libwps.a b/components/esp8266/lib/libwps.a index 228fa8d6..29fe51c5 100644 Binary files a/components/esp8266/lib/libwps.a and b/components/esp8266/lib/libwps.a differ diff --git a/components/esp8266/source/event_loop.c b/components/esp8266/source/event_loop.c index 8da4a733..335e4685 100644 --- a/components/esp8266/source/event_loop.c +++ b/components/esp8266/source/event_loop.c @@ -98,7 +98,7 @@ esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx) s_event_queue = wifi_queue_create(32, sizeof(system_event_t)); if(s_event_queue == NULL) return ESP_ERR_NO_MEM; - if(wifi_task_create(esp_event_loop_task, "esp_event_loop_task", 512, NULL, 2) == NULL) { + if(wifi_task_create(esp_event_loop_task, "esp_event_loop_task", 2048, NULL, 2) == NULL) { return ESP_ERR_NO_MEM; } s_event_handler_cb = cb; diff --git a/components/esp8266/source/startup.c b/components/esp8266/source/startup.c index e3d3376e..a7e3b9c8 100644 --- a/components/esp8266/source/startup.c +++ b/components/esp8266/source/startup.c @@ -103,7 +103,7 @@ void call_user_start(void) wifi_os_init(); - assert(wifi_task_create(user_init_entry, "uiT", 512, NULL, wifi_task_get_max_priority()) != NULL); + assert(wifi_task_create(user_init_entry, "uiT", 2048, NULL, wifi_task_get_max_priority()) != NULL); wifi_os_start(); } diff --git a/components/freertos/port/esp8266/include/freertos/FreeRTOSConfig.h b/components/freertos/port/esp8266/include/freertos/FreeRTOSConfig.h index 4d6063d5..7d17f785 100644 --- a/components/freertos/port/esp8266/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/port/esp8266/include/freertos/FreeRTOSConfig.h @@ -86,7 +86,7 @@ #define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 100 ) #define configMAX_PRIORITIES 15 -#define configMINIMAL_STACK_SIZE ( ( unsigned short )176 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 768 ) //#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 0 @@ -106,7 +106,7 @@ #if configUSE_TIMERS #define configTIMER_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define configTIMER_QUEUE_LENGTH (10) -#define configTIMER_TASK_STACK_DEPTH ( ( unsigned short ) 512 ) +#define configTIMER_TASK_STACK_DEPTH ( ( unsigned short ) 2048 ) #endif /* Co-routine definitions. */ diff --git a/components/freertos/port/esp8266/include/freertos/portmacro.h b/components/freertos/port/esp8266/include/freertos/portmacro.h index cedef9cd..6e830a18 100644 --- a/components/freertos/port/esp8266/include/freertos/portmacro.h +++ b/components/freertos/port/esp8266/include/freertos/portmacro.h @@ -105,7 +105,7 @@ extern "C" { #define portDOUBLE double #define portLONG long #define portSHORT short -#define portSTACK_TYPE unsigned portLONG +#define portSTACK_TYPE unsigned char #define portBASE_TYPE long #define BaseType_t portBASE_TYPE diff --git a/components/freertos/port/esp8266/panic.c b/components/freertos/port/esp8266/panic.c index c35b1843..67b16fd4 100644 --- a/components/freertos/port/esp8266/panic.c +++ b/components/freertos/port/esp8266/panic.c @@ -54,8 +54,9 @@ typedef struct task_info StackType_t *pxEndOfStack; } task_info_t; -static void IRAM_ATTR panic_stack(StackType_t *start, StackType_t *end) +static void IRAM_ATTR panic_stack(StackType_t *start_stk, StackType_t *end_stk) { + uint32_t *start = (uint32_t *)start_stk, *end = (uint32_t *)end_stk; size_t i, j; size_t size = end - start + 1; @@ -118,10 +119,10 @@ void IRAM_ATTR panicHandler(void *frame) if (task) { StackType_t *pdata = task->pxStack; - StackType_t *end = task->pxEndOfStack + 1; + StackType_t *end = task->pxEndOfStack + 4; ets_printf("\nTask stack [%s] stack from [%p] to [%p], total [%d] size\n\n", - task->pcTaskName, pdata, end, end - pdata + 1); + task->pcTaskName, pdata, end, end - pdata + 4); panic_stack(pdata, end); diff --git a/components/freertos/port/esp8266/port.c b/components/freertos/port/esp8266/port.c index c09c0164..dde9888c 100644 --- a/components/freertos/port/esp8266/port.c +++ b/components/freertos/port/esp8266/port.c @@ -107,16 +107,16 @@ void _xt_timer_int1(void); /* * See header file for description. */ -portSTACK_TYPE* pxPortInitialiseStack(portSTACK_TYPE* pxTopOfStack, pdTASK_CODE pxCode, void* pvParameters) +StackType_t *pxPortInitialiseStack(StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters) { -#define SET_STKREG(r,v) sp[(r) >> 2] = (portSTACK_TYPE)(v) - portSTACK_TYPE* sp, *tp; +#define SET_STKREG(r,v) sp[(r) >> 2] = (unsigned long)(v) + unsigned long *sp, *tp, *stk = (unsigned long *)pxTopOfStack; /* Create interrupt stack frame aligned to 16 byte boundary */ - sp = (portSTACK_TYPE*)(((INT32U)(pxTopOfStack + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf); + sp = (unsigned long *)(((INT32U)(stk + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf); /* Clear the entire frame (do not use memset() because we don't depend on C library) */ - for (tp = sp; tp <= pxTopOfStack; ++tp) { + for (tp = sp; tp <= stk; ++tp) { *tp = 0; } @@ -135,7 +135,7 @@ portSTACK_TYPE* pxPortInitialiseStack(portSTACK_TYPE* pxTopOfStack, pdTASK_CODE SET_STKREG(XT_STK_PS, PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1)); #endif - return sp; + return (StackType_t *)sp; } void IRAM_ATTR PendSV(char req) @@ -361,7 +361,7 @@ signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode, void *pvParameters, unsigned portBASE_TYPE uxPriority, TaskHandle_t *pxCreatedTask, - portSTACK_TYPE *puxStackBuffer, + StackType_t *puxStackBuffer, const MemoryRegion_t * const xRegions) { (void)puxStackBuffer; diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 77645a7c..a7af0c67 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -387,8 +387,8 @@ endmenu # UDP config TCPIP_TASK_STACK_SIZE int "TCP/IP Task Stack Size" - default 512 - range 512 2048 + default 2048 + range 2048 8192 help 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. diff --git a/examples/protocols/http_request/main/http_request_example_main.c b/examples/protocols/http_request/main/http_request_example_main.c index 8dbce4fb..3f74a913 100644 --- a/examples/protocols/http_request/main/http_request_example_main.c +++ b/examples/protocols/http_request/main/http_request_example_main.c @@ -188,5 +188,5 @@ void app_main() { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); - xTaskCreate(&http_get_task, "http_get_task", 4096, NULL, 5, NULL); + xTaskCreate(&http_get_task, "http_get_task", 16384, NULL, 5, NULL); } diff --git a/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c b/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c index 900664b8..63bde71e 100644 --- a/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c +++ b/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c @@ -336,5 +336,5 @@ void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); - xTaskCreate(&https_get_task, "https_get_task", 2048, NULL, 5, NULL); + xTaskCreate(&https_get_task, "https_get_task", 8192, NULL, 5, NULL); } diff --git a/examples/protocols/https_wolfssl/main/https_wolfssl_example_main.c b/examples/protocols/https_wolfssl/main/https_wolfssl_example_main.c index 38337b4b..8e60ecfe 100644 --- a/examples/protocols/https_wolfssl/main/https_wolfssl_example_main.c +++ b/examples/protocols/https_wolfssl/main/https_wolfssl_example_main.c @@ -58,7 +58,7 @@ extern const uint8_t server_root_cert_pem_end[] asm("_binary_server_root_cert_ "\r\n" #define WOLFSSL_DEMO_THREAD_NAME "wolfssl_client" -#define WOLFSSL_DEMO_THREAD_STACK_WORDS 2048 +#define WOLFSSL_DEMO_THREAD_STACK_WORDS 8192 #define WOLFSSL_DEMO_THREAD_PRORIOTY 6 #define WOLFSSL_DEMO_SNTP_SERVERS "pool.ntp.org" diff --git a/examples/protocols/mqtt/main/MQTTEcho.c b/examples/protocols/mqtt/main/MQTTEcho.c index 6ff21da8..51e8d51f 100644 --- a/examples/protocols/mqtt/main/MQTTEcho.c +++ b/examples/protocols/mqtt/main/MQTTEcho.c @@ -51,7 +51,7 @@ const int CONNECTED_BIT = 1<<0; #define MQTT_PORT 1883 /* MQTT Port*/ #define MQTT_CLIENT_THREAD_NAME "mqtt_client_thread" -#define MQTT_CLIENT_THREAD_STACK_WORDS 2048 +#define MQTT_CLIENT_THREAD_STACK_WORDS 8192 #define MQTT_CLIENT_THREAD_PRIO 8 static const char *TAG = "example"; diff --git a/examples/protocols/openssl_client/main/openssl_client_example_main.c b/examples/protocols/openssl_client/main/openssl_client_example_main.c index 568a61e5..e5740237 100644 --- a/examples/protocols/openssl_client/main/openssl_client_example_main.c +++ b/examples/protocols/openssl_client/main/openssl_client_example_main.c @@ -327,5 +327,5 @@ void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); - xTaskCreate(&openssl_client_task, "openssl_client", 2048, NULL, 6, NULL); + xTaskCreate(&openssl_client_task, "openssl_client", 8192, NULL, 6, NULL); } diff --git a/examples/protocols/openssl_demo/main/openssl_demo_example_main.c b/examples/protocols/openssl_demo/main/openssl_demo_example_main.c index f216b4e1..63136144 100644 --- a/examples/protocols/openssl_demo/main/openssl_demo_example_main.c +++ b/examples/protocols/openssl_demo/main/openssl_demo_example_main.c @@ -255,5 +255,5 @@ void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); initialise_wifi(); - xTaskCreate(&openssl_task, "openssl_task", 2048, NULL, 5, NULL); + xTaskCreate(&openssl_task, "openssl_task", 8192, NULL, 5, NULL); } diff --git a/examples/protocols/openssl_server/main/openssl_server_example_main.c b/examples/protocols/openssl_server/main/openssl_server_example_main.c index 3de3498d..45368716 100644 --- a/examples/protocols/openssl_server/main/openssl_server_example_main.c +++ b/examples/protocols/openssl_server/main/openssl_server_example_main.c @@ -336,5 +336,5 @@ void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); - xTaskCreate(&openssl_server_task, "openssl_server", 2048, NULL, 6, NULL); + xTaskCreate(&openssl_server_task, "openssl_server", 8192, NULL, 6, NULL); } diff --git a/examples/wifi/smart_config/main/user_main.c b/examples/wifi/smart_config/main/user_main.c index 5ec7e753..1aeed5e4 100644 --- a/examples/wifi/smart_config/main/user_main.c +++ b/examples/wifi/smart_config/main/user_main.c @@ -210,6 +210,6 @@ void user_init(void) /* need to set opmode before you set config */ wifi_set_opmode(STATION_MODE); - xTaskCreate(smartconfig_task, "smartconfig_task", 256, NULL, 2, NULL); + xTaskCreate(smartconfig_task, "smartconfig_task", 1024, NULL, 2, NULL); } diff --git a/examples/wifi/wps/main/user_main.c b/examples/wifi/wps/main/user_main.c index b9021ac1..d20ac3fd 100644 --- a/examples/wifi/wps/main/user_main.c +++ b/examples/wifi/wps/main/user_main.c @@ -52,5 +52,5 @@ static void wps_task(void* pvParameters) void user_init(void) { - xTaskCreate(wps_task, "wps_task", 1024, NULL, 4, NULL); + xTaskCreate(wps_task, "wps_task", 4096, NULL, 4, NULL); } diff --git a/tools/unit-test-app/main/app_main.c b/tools/unit-test-app/main/app_main.c index 2ec6932b..e33c9697 100644 --- a/tools/unit-test-app/main/app_main.c +++ b/tools/unit-test-app/main/app_main.c @@ -19,5 +19,5 @@ void unityTask(void *pvParameters) void app_main(void) { wifi_station_set_auto_connect(false); - xTaskCreate(unityTask, "unityTask", 2048, NULL, UNITY_FREERTOS_PRIORITY, NULL); + xTaskCreate(unityTask, "unityTask", 8192, NULL, UNITY_FREERTOS_PRIORITY, NULL); }