Running the FreeRTOS Scheduler
The prior chapter introduced the FreeRTOS scheduler and tasks. We also introduced the use of our software tools for developing FreeRTOS-based systems, including STM32CubeIDE, Ozone, and SystemView. This chapter continues those topics, in more depth.
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 cover 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...