Page 1 of 1

Regarding to firmware

Posted: Mon Apr 13, 2020 4:59 pm
by RyanMco
Hi guys, could anyone please tell me what xtaskcreate function api in the firmware of bitcraze is about and why I need it? it sounds that it creates tasks for firmware .. why I need to make those task .. are those tasks is like threads? if so then the firmware itself must have its own Operating system FreeRtos no? all what I need to understand how functions that are interface to OS of FreeRtos works and understand how they are working .


thanks

Re: Regarding to firmware

Posted: Tue Apr 14, 2020 12:22 pm
by kimberly
xtaskcreate function is a function of the Freertos operating system that runs on the crazyflie. Like on a normal computer, this also schedules all the tasks of the drivers, controllers and estimators for the crazyflie, so we do not have to program a scheduler ourselves.

Freertos is not developed by bitcraze so please read the documentation of freertos to understand more about the functionalities: https://www.freertos.org/Documentation/RTOS_book.html.

Re: Regarding to firmware

Posted: Tue Apr 14, 2020 2:32 pm
by RyanMco
THANKS, what is confusing me who once I use xthread or xseamphore in freeRtos , then it goes to OS of PC or on the chip of the drone or it goes to go to software OS -FREERTOS- that's found on the chip of the drone

Re: Regarding to firmware

Posted: Wed Apr 15, 2020 6:50 am
by kristoffer
Tasks and threads are similar concepts, for more details I suggest you check out the FreeRTOS docs and literature on computer science. In this forum we can help you with how tasks are used in the Crazyflie, but the basic OS functionality is described better in the FreeRTOS docs.