The FreeRTOS scheduler takes care of all task switching decisions. The most basic things you can do with an RTOS include creating a few tasks and then starting the scheduler – which is exactly what we'll be doing in this chapter. Creating tasks and getting the scheduler up and running will become something you'll be well accustomed to after some practice. Even though this is straightforward, it doesn't always go smoothly (especially on your first couple of tries), so we'll also be covering some common problems and how to fix them. By the end, you'll be able to set up your own RTOS application from scratch and know how to troubleshoot common problems.
We'll start by covering two different ways of creating FreeRTOS tasks and the advantages each offer. From there, we'll cover how to start the scheduler and what to look...