[Michael Becker] has been using FreeRTOS for about seven years. He decided to start adding some features and has a very interesting C++ class wrapper for the OS available.
Real Time Operating Systems (RTOS) add functionality for single-thread microcontrollers to run multiple programs at the same time without threatening the firmware developer’s sanity. This project adds C++ to the rest of the FreeRTOS benefits. We know that people have strong feelings one way or the other about using C++ in embedded systems. However, as the 24 demo projects illustrate, it is possible.
One nice thing about the library is that it is carefully documented. A large number of examples don’t hurt either. The library is clean with just under 30 classes. It seems to have resisted the trend of having classes for everything. You know the kind of library we mean. To create an Integer object, just build a configuration object to pass to the class factory generator which…. This library doesn’t entertain any of that. It has simple abstractions around threads and timers, queues, and mutexes.
One thing we did find a little surprising was the lack of a “base application.” A common feature of C++ libraries is to have a basic application object that you specialize to create your application. It looks like the wrappers, still require you to use a pretty standard-looking main function and provide some standard callbacks and things. This could easily be put in a class. Of course, the library is young, so perhaps this will be something brought out in a future release.
FreeRTOS is very versatile and runs on a large number of processors and boards. It is also fairly easy to port to new hardware. It can also coexist with a lot of middleware like Mongoose OS, the STM32 HAL library, and much more.