Page 1 of 2
RTOS SDK vtaskstartscheduler usage
Posted:
Wed Mar 06, 2019 12:42 pm
by Illivion
I've suspected that freertos examples from SDK don't have vtaskstartscheduler() call on the end of main function. And more, if I include this call in my app, I become crash. If I just create new tasks and timers they work perfectly. Can somebody explain the strange behavior?
Re: RTOS SDK vtaskstartscheduler usage
Posted:
Mon Mar 18, 2019 7:47 pm
by ChrisAus
I also cannot understand this - I see vTaskStartScheduler in the FreeRTOS docs, but it's not in any ESP examples, anyone know what we're supposed to be doing here?
Re: RTOS SDK vtaskstartscheduler usage
Posted:
Mon May 20, 2019 7:56 am
by harslanian
Did you ever find out the answer?
Re: RTOS SDK vtaskstartscheduler usage
Posted:
Thu Aug 29, 2019 4:43 pm
by LPG
It is in the file "ESP8266_RTOS_SDK ▸ components ▸ esp8266 ▸ source ▸ startup.c":
In this startup file, a single task is created and then vTaskStartScheduler() is called. From within this task, your "app_main()" is called. So "app_main()" is already running from a task context, which is why you must not call vTaskStartScheduler() again.