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.

Keywords:

You might be interested:

Do We Already Know Everything There Is to Know About Software Testing?

Kari Hakulinen | 2024/05/29

One of the ancient early books of the biblical canon already knew it: “Nihil novi sub sole,” or as put in modern English, “There is nothing new under the sun,” meaning there is nothing truly novel in existence.

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

Compromising on software testing is the last thing companies should do in a fluctuating market 

Mauri Jokela | 2024/04/24

Pre-release software testing is a business-critical phase of software development. However, in a fluctuating market, we’ve seen a trend where some companies compromise on software testing, thereby taking a huge financial risk if the software doesn’t perform as expected.

Read post

Keuda Logistics – pallet loading as a VR Exercise

Mikael Bowellan | 2024/04/10

Softability XR Studio developed a VR exercise on the VR Builder platform in collaboration with Keuda to support logistics education at Keuda.

Read post

Adopting Agile Methodologies in industrial sectors – advantages and common pitfalls

Richa Chavada | 2024/01/16

Agile development is a methodology and mindset in software development that prioritizes cross-functional collaboration and continuous improvement flexibility, collaboration, customer satisfaction, and iterative progress.

Read post

Jan Tillander still holds a strong passion for the software industry

Nora Nirhamo | 2023/12/15

We have a team of skilled individuals who are motivated and eager to develop in their work. We asked Senior Software Architect Jan Tillander, working as a consultant for our client, about his experience working within Softability. Get to know Jan’s story and expertise!

Read post

Alexander Gudzovskiy’s enthusiasm for the software industry and learning new things is still going strong 

Nora Nirhamo | 2023/12/04

Alexander has years of experience in the software industry behind him, but his enthusiasm towards the software industry is still going strong. Learn more about Alexander’s career path, his proficiency with programming languages, projects and what motivates him at work.

Read post

XR-SPACE: Harnessing the potential of XR technologies and leveraging video communication to enhance remote support and training

Daniel Haldan | 2023/11/23

In this blog post we’ll explore the key aspects of XReach’s participation in the XR-SPACE project, delving into how this collaboration positions our solution at the forefront of innovation in the realm of remote support and training.

Read post

KONE – In skilled and reliable hands

Nora Nirhamo | 2023/10/27

The cooperation between Softability and KONE, which has lasted more than a decade, is based on trust, openness and high quality. Softability’s consultants work at KONE in various projects, especially with the software that moves the elevators. KONE’s Product Owner Alessio Calcagno emphasizes the high quality of the consultants’ expertise and their strong industry knowledge in industrial equipment manufacturing.

Read post

Dnyaneshwar Suryawanshi “Work would be boring if it weren’t a challenge”

Nora Nirhamo | 2023/09/07

During his career, Dnyaneshwar has worked on several different projects where he has been able to learn from his skilled teammates, develop his presentation skills, and learn more about how test automation work. Learn more about Dnyaneshwar’s career.

Read post