Selecting embedded operating systems can be a pickle – Why FreeRTOS should be your go-to option

Toni Akkala | 2024/02/20

There is a plethora of embedded operating systems software developers can choose from when starting a new project from scratch. In this blog post, I will review some aspects to consider when selecting such an operating system. I will also describe the features of one that I think suits many different systems.

Why is it so difficult?

An embedded system is usually developed to perform application-specific tasks, including a processor to execute program code and different memories where that program code and variables are stored. Usually, these resources are very limited, and hardware architectures vary significantly, making it difficult to develop a generic operating system for all these different kinds of embedded systems. A software developer needs to select a suitable Real-Time Operating System (RTOS) that best supports developing application software for that specific system and is scalable for future needs.

What to consider when selecting RTOS?

There are many different criteria that you should consider when selecting the RTOS. If you already have hardware for the system you are developing, the first thing to check is the existing hardware architecture support. That allows you to get started without putting extra effort into porting the RTOS to a new architecture. Of course, hardware can also change later, so it might be worth checking how easy it would be to port that RTOS to a new architecture.

Depending on your project requirements and system specifications, other important selection criteria might include: cost or licensing options, different support options, how configurable the RTOS is, development tool integration support, existing driver or networking support, or the learning curve needed to start using the RTOS. You may also need some certifications that might prevent you from selecting the RTOS freely. However, which aspects you should consider more carefully will depend heavily on the project specifications.

FreeRTOS – open-source, diverse, and developer-friendly RTOS for microcontrollers

From the sea of embedded operating systems, you can find many suitable for different purposes, but the most diverse is FreeRTOS. It is an open-source RTOS designed for embedded systems and microcontrollers. FreeRTOS is a perfect choice for any microcontroller-based embedded system that needs to do multiple tasks simultaneously, requires real-time capabilities, and has enough system resources to run the RTOS, which is the case with the most modern microcontrollers.

The small learning curve makes FreeRTOS easy to learn for anyone familiar with the RTOS concepts and provides extensive documentation and active community support for those who are not. The demo applications and examples make it easy to start with any hardware architecture. I think it is also quite trivial to port it to new architectures. And, for modern cloud connectivity, there are AWS cloud integration examples that help you start building your IoT devices.

If you value using open-source, simple but diverse RTOS designed for microcontrollers, FreeRTOS is your number one choice.

FreeRTOS features in more detail

For you to be able to evaluate if FreeRTOS is suitable for your project, it is important to dive deeper into its features.

FreeRTOS is MIT-licensed, i.e., free to use without any restrictions. It has been used in many kinds of projects, including consumer electronics, Internet of Things (IoT), robotics, and being open source; it is often used also in education, hobby, and research projects.

The FreeRTOS kernel provides a rich set of features that are still being actively developed. It has a kernel with real-time capabilities, a small memory footprint, and power-saving modes. Kernel provides tasks with different scheduling options and task synchronization features. Typical kernel image size varies from 6 to 12 Kbytes depending on the configuration, and necessary Random Access Memory (RAM) depends on the number of tasks and other objects being used, starting from a couple of kilobytes.

FreeRTOS offers different methods for stack overflow detection and heap management if dynamic memory management is used. FreeRTOS also supports more complex concepts like Symmetric Multiprocessing (SMP) or memory protection unit (MPU).

FreeRTOS is highly customizable, providing customization options using one header file. These options include but are not limited to clock frequencies, memory sizes, scheduler options, or an option to select between static and dynamic memory management. Static memory management might be used when the size of RAM is small to know the memory usage during development time or to link RTOS objects to a certain memory location.

Modular and MIT-licensed libraries enable the extension of the RTOS features. FreeRTOS Core libraries implement features for connectivity and security (e.g., coreMQTT and corePKCS #11) and have no dependencies on the FreeRTOS kernel but only on standard C libraries. FreeRTOS Plus libraries offer different add-on functionalities for the kernel, like TCP/IP stack or Command Line Interpreter (CLI).

Partners also offer commercial licenses and provide warranty (OpenRTOS) and safety certifications (SafeRTOS) if needed. Some partners also offer development tool support and hardware development kits. For example, there is a trace tool support to be used for trace analysis, which will help with the debugging.

Extensive documentation will help get started and find solutions to possible problems. In addition, there are also books and Frequently Asked Questions to extend that documentation.

Conlusion

After delving into FreeRTOS’s features, it is evident that it serves almost any microcontroller-based project well. Using FreeRTOS with the feature-rich kernel and with those modular libraries to extend that kernel, software developers can build scalable RTOS-based modern embedded systems with reliable and secure connectivity and remote update support for almost any application and for free.

Liked what you read? Check out our other blog posts.

Avainsanat:

Saattaisit olla kiinnostunut myös:

A person with glasses looking at a laptop and another screen with code on them.

Miksi yritysten ei tulisi tinkiä ohjelmiston testauksesta vaikeassakaan tilanteessa?

Mauri Jokela | 2024/04/24

Ohjelmiston testaus ennen julkaisua on liiketoiminnan kannalta kriittistä. Ailahtelevassa markkinassa on viime aikoina näkynyt kuitenkin trendi, jossa osa yrityksistä tinkii ohjelmiston testauksesta ennen julkaisua ja ottaa siten valtavan taloudellisen riskin, jos ohjelmisto ei toimikaan toivotusti.

Lue postaus

Alexander Gudzovskiyn innokkuus ohjelmistoalaa ja uuden oppimista kohtaan on säilynyt

Nora Nirhamo | 2023/12/04

Alexanderilla on takanaan jo vuosia ohjelmistoalalla, mutta innokkuus ohjelmistoalaa kohtaan on säilynyt. Tutustu Alexanderin urapolkuun, kieliosaamiseen, aiempiin projekteihin sekä siihen mikä häntä työssään motivoi.

Lue postaus

Pitkän työuran tehneen Jan Tillanderin kipinä ohjelmistoalaa kohtaan palaa yhä

Nora Nirhamo | 2023/11/03

Meillä työskentelee reilu määrä osaavia tekijöitä, joilla on motivaatiota ja halua kehittyä työssään. Kysyimme asiakkaallamme konsulttina työskentelevältä Senior Software Architect Jan Tillanderilta, millaista on työskennellä konsulttina riveissämme. Tutustu Janin tarinaan ja osaamiseen!

Lue postaus

KONE – Luotettavissa ja osaavissa käsissä

Nora Nirhamo | 2023/10/27

Softabilityn ja KONE:en välinen yli vuosikymmenen kestänyt yhteistyö perustuu luottamukseen, avoimuuteen ja korkeaan laatuun. Softabilityn konsultteja työskentelee KONE:ella erilaisissa projekteissa, erityisesti hissejä liikuttavan ohjelmiston parissa. KONE:en Product Owner Alessio Calcagno korostaa konsulttien osaamisen korkeaa laatua ja heidän vahvaa toimialatuntemustaan teollisuuden laitevalmistuksessa.

Lue postaus

Dnyaneshwar Suryawanshi “Ilman haasteita työ kävisi tylsäksi”

Nora Nirhamo | 2023/09/07

Dnyaneshwar on uransa aikana työskennellyt useissa eri projekteissa, joissa hän on päässyt oppimaan taitavilta tiimikavereiltaan, kehittänyt esiintymistaitoaan ja tutustunut testiautomaatioon. Tutustu Dnyaneshwarin uratarinaan ja siihen, millaisissa projekteissa hän on ollut mukana.

Lue postaus

Tuemme avustustyötä Ukrainassa

Nora Nirhamo | 2023/07/03

Osana yhteiskuntavastuutamme lahjoitimme tänäkin vuonna 2 % liikevaihdostamme Suomen Punaisen Ristin avustustyöhön Ukrainassa.

Lue postaus

Marko Meinander on pitkän linjan ohjelmistokehittäjä

Nora Nirhamo | 2023/05/26

Mitä Marko pitää konsulttina työskentelystä ja millaisia projekteja hänen työpöydällään on vuosien saatossa ollut? Tutustu tällä hetkellä sädehoitoon suunnitellun ohjelmiston parissa työskentelevän pitkän linjan kehittäjämme uratarinaan.

Lue postaus

Ville Helin kirjoitti ensimmäiset koodirivinsä jo 80-luvulla

Nora Nirhamo | 2023/05/22

Tutustu monitaiturikehittäjäämme Villeen, millaisista projekteista hänen työura koostuu sekä minkälaiset teknologiat ja ohjelmointikielet hänellä on hallussaan!

Lue postaus
A person with glasses looking at a laptop and another screen with code on them.

Markus Särkiniemi: “Työssä on kiva kohdata uusia haasteita”

Nora Nirhamo | 2023/04/20

Miten X Factor, kävelytyylit ja koneoppiminen liittyvät toisiinsa? Tutustu pitkän linjan senior softakehittäjämme Markuksen uratarinaan ja ota selvää!

Lue postaus