Regarding to firmware

Firmware/software/electronics
Post Reply
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Regarding to firmware

Post 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
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Regarding to firmware

Post 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.
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: Regarding to firmware

Post 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
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Regarding to firmware

Post 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.
Post Reply