i use the board frdm-kw36z i find the freertos file fsl_os_abstraction_free_rtos.c this is the main function entrance as belows excerpt
int main (void)
{
/* Initialize MCU clock */
hardware_init();
OSA_TaskCreate(OSA_TASK(startup_task), NULL);
vTaskStartScheduler();
return 0;
}
if i want to create another self define task how to add and make it works ,do i need to write a similary function
OSA_TaskCreate(OSA_TASK(my_task), NULL);
and give some definition like this
#ifndef gMainThreadStackSize_c
#define gMainThreadStackSize_c 1024
#endif
#ifndef gMainThreadPriority_c
#define gMainThreadPriority_c 7
#endif
than write a thread func in the realization of my_task. is it that right ,or some one give tips or demo on how to add a self define task.. thanks a lot!
Hi yuan:
xTaskCreate is an API to create a new task and add it to the list of tasks that are ready to run.
Please refer to below link and hello world demo for more details
OSA_TaskCreate is a wrapper, it is also right to create a new task.
Regards
Daniel