Software is a living entity, even the embedded software.
There often comes a point where bare-metal software can no longer keep up with the growing complexity of an application. It doesn’t scale at the same rate, and over time, the project can devolve into an unmanageable mess.
In the early days, microcontrollers were heavily constrained in terms of resources—limited FLASH, RAM, clock speeds, and so on. But that’s no longer the case. Today, for just a couple of dollars, you can get a microcontroller with 512 KB of FLASH and 32 KB of RAM, running at 64 MHz or more. Pretty amazing, right? And if you spend a little more, you can get a powerhouse of a microcontroller.
Back then, these limitations made it difficult to integrate an operating system—it simply wouldn’t fit in memory. But with modern MCUs offering plenty of headroom, we as developers can focus more on application design rather than obsessing over every byte or CPU cycle. Twenty years ago, that kind of optimization was the norm. I remember it well: you’d write a procedure in assembly and then count the bytes and cycles it used. Just look at the old COP8 datasheets for a reminder!
Today, operating systems with small footprints—like FreeRTOS—can easily fit on most modern microcontrollers without consuming excessive resources. Linux and RTLinux, on the other hand, are suited for a different class of embedded systems. Linux is a full-featured OS and is overkill unless your application truly requires its capabilities.
Why using a RTOS is a good idea?
An RTOS like FreeRTOS provides a structured framework for your application: tasks, inter-task communication, synchronization mechanisms, and more. This structure allows applications to scale more easily than traditional bare-metal designs. Of course, using any framework requires careful planning before writing code—but that’s actually a benefit, not a drawback.
Even better, combining FreeRTOS with C++ unlocks additional advantages. While most RTOSes are written in C and typically used that way, C++ brings higher-level abstractions such as templates and interfaces, which can make your code more expressive, modular, and maintainable.
In short RTOSs, and in particularly FreeRTOS, promote better structure, scalability, and maintainability for new projects where long-term growth, reliability, and clarity are essential even when one thinks only in the first version of the application (and that it will be the only
).