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

JoonDong
Posts: 11
Joined: Fri Dec 22, 2017 6:38 am

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

Postby JoonDong » Fri Dec 22, 2017 6:47 am

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?

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Fri Dec 22, 2017 2:21 pm

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.

JoonDong
Posts: 11
Joined: Fri Dec 22, 2017 6:38 am

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

Postby JoonDong » Sat Dec 23, 2017 6:49 pm

Thank you.

Who is online

Users browsing this forum: ok-home and 88 guests