Articles and News

November 16, 2025

embedded: switching rtos & uart  

Currently, the Embedded sub-team’s main focus is on a major transition within the embedded software stack: moving their real-time operating system (RTOS) from MbedOS to FreeRTOS. 

A real-time operating system is a (crucial) software layer that sits between the hardware and  application-level code. Its purpose is to manage tasks, scheduling, and hardware interactions in a way that allows multiple operations to run efficiently and predictably. Because embedded systems often need to respond to events within strict timing constraints, choosing the right RTOS is essential. 

The shift from MbedOS to FreeRTOS is driven by several factors. First, MbedOS is being deprecated, making long-term support seem uncertain. FreeRTOS, on the other hand, is lightweight, widely adopted in industry, and provides developers with more direct control over system behavior. This switch means we have greater freedom to tailor the system to our needs while also gaining experience with tools and patterns that are standard in professional embedded development.

While the RTOS transition is the overarching project, our current day-to-day work involves building high-level drivers in C++ on top of FreeRTOS. These drivers support functions such as UART communication, logging, analog input handling, and other interfaces the hardware relies on. Because FreeRTOS does not provide these abstractions out of the box, our work is critical in ensuring the application layer has clean, reliable, and accessible tools. 

High-level drivers are necessary because the microcontroller manufacturer (STM in our case) only supplies low-level C drivers. These low-level drivers interact directly with the hardware but are often cumbersome to use in larger applications. By writing our own C++, we wrap this low-level functionality into cleaner, safer, and more intuitive interfaces. This not only improves code readability and maintainability but also speeds up development for everyone who will interact with the hardware through FreeRTOS moving forward.