Page 1 of 1

stack of the user's tasks is allocated on the main stack?

Posted: Fri Dec 22, 2017 6:47 am
by JoonDong
Below error appear when I create a task using xTaskCreate(vBLE_Notification_TaskCode, "NotiTask", 30000, NULL, tskIDLE_PRIORITY+2, &xBLE_Notification_Task);
C:/msys32/home/isp40/esp/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x400889f1 on core 0

I think vBLE_Notification_TaskCode() is very simple.

And menuconfig->Conponent config->ESP32 specific->main stack size is 16000.

Is the user stack larger than the main stack, causing an error?

Re: stack of the user's tasks is allocated on the main stack?

Posted: Fri Dec 22, 2017 2:21 pm
by ESP_Sprite
The 'main' stack you refer to is literally nothing more than the stack allocated for the thread that runs the app_main function. All other tasks that get spin up get their own stack memory.

Re: stack of the user's tasks is allocated on the main stack?

Posted: Sat Dec 23, 2017 6:49 pm
by JoonDong
Thank you.