I encountered a problem, when I created a new task, the program would stop running.As shown below:
[0;32mI (116) esp_image: segment 0: paddr=0x00010010 vaddr=0x40210010 size=0x5f8cc (391372) map[0m
[0;32mI (257) esp_image: segment 1: paddr=0x0006f8e4 vaddr=0x4026f8dc size=0x102f0 ( 66288) map[0m
[0;32mI (279) esp_image: segment 2: paddr=0x0007fbdc vaddr=0x3ffe8000 size=0x0149c ( 5276) load[0m
[0;32mI (282) esp_image: segment 3: paddr=0x00081080 vaddr=0x40100000 size=0x00bd0 ( 3024) load[0m
[0;32mI (287) esp_image: segment 4: paddr=0x00081c58 vaddr=0x40100bd0 size=0x058e0 ( 22752) load[0m
[0;32mI (303) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (330) system_api: Base MAC address is not set, read default base MAC address from EFUSE[0m
[0;32mI (337) system_api: Base MAC address is not set, read default base MAC address from EFUSE[0m
phy_version: 1159.0, 85b471e, Apr 21 2020, 17:03:08, RTOS new
[0;32mI (393) phy_init: phy ver: 1159_0[0m
[0;32mI (397) reset_reason: RTC reset 2 wakeup 0 store 0, reason is 2[0m
[0;32mI (403) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;32mI (411) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;31mE (419) DBS: Parameter memory format...
[0m
[0;31mE (504) DBS: Parameter memory self-diagnosis pass.
[0m
[0;31mE (509) DBS: Parameter memory load defaults...
[0m
[0;31mE (513) DBS: Parameter memory self-diagnosis start...
[0m
[0;31mE (565) DBS: Parameter memory self-diagnosis pass.
[0m
[0;32mI (570) system_api: Base MAC address is not set, read default base MAC address from EFUSE[0m
esp_read_mac(): ec:fa:bc:b3:89:87
This is ESP8266 chip with 1 CPU cores, WiFi, 2MB external flash
Application start...
Application driver init. finished.
[0;32mI (609) WiFi_STA: wifi_init_sta finished.[0m
[0;32mI (613) WiFi_STA: Waiting for AP connection...[0m
[0;32mI (620) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 [0m
I tried to change "#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 768) " to "#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 1024*5) " , the problem already exists.
I don't know, is it the limit of the number of tasks created or the limit of the stack space?
Below is the task function I created. When I shield the last task, the program can run normally.
xTaskCreate(Button_SmartConfigThread, "SmartConfig", 1024, NULL, 0, NULL); // 按键配网线程
xTaskCreate(Cfg_handleRxThread, "cfg", 512, NULL, 1, NULL); // 参数配置线程
xTaskCreate(Sys_doNetworkThread, "net", 1024*5, NULL, 10, NULL); // 网络线程
xTaskCreate(Sys_HBServiceThread, "hb", 1024*5, NULL, 2, NULL); // 心跳线程
xTaskCreate(Sys_reportAppNotificationThread, "ant", 1024, NULL, 3, NULL); // 监控线程
xTaskCreate(Sys_reportAppParametersThread, "apt", 1024, NULL, 4, NULL); // 应用线程
xTaskCreate(Sys_reportAppFaultsThread, "aft", 1024*4, NULL, 5, NULL); // 故障线程
xTaskCreate(Sys_doDOTAThread,"dota", 1024, NULL, 6, NULL); // OTA线程
xTaskCreate(Sys_syncServerTimeThread,"tsync", 1024*5, NULL, 7, NULL); // 时间线程
xTaskCreate(Sys_reportSelfDiagnonsisFalultThread,"sdfr", 1024*2, NULL, 8, NULL); // 故障上报线程
xTaskCreate(Sys_runNetworkThread,"EDGRX", 1024*5, NULL, 9, NULL); // 数据接收线程
//xTaskCreate(Ned_writeThread,"cmbtx", 1024, NULL, 0, NULL); // 总线线程