The development of the Internet of Things and artificial intelligence is inseparable from embedded systems, and embedded operating systems are an important part that cannot be ignored. The requirements for engineers have evolved from being simple and easy to use to also being safe and reliable. With so many embedded operating systems available, which one is truly suitable for engineers’ applications? “Embedded Systems and Applications” has invited several industry experts to share their views on this issue.
Industry Voices
The choice of operating system depends on your application
Jean J. Labrosse, Software Architect at Silicon Labs and Founder of Micrium
Currently, there is no single operating system that can accommodate all different types of embedded applications, although some come very close. Embedded systems vary widely, ranging from simple 8-bit MCUs to highly complex 64-bit multi-core CPUs. Most embedded operating system kernels include a Real-Time Operating System (RTOS), which manages CPU timing and other resources. Additionally, some operating systems provide extra modules to handle communication protocols, data storage, user interfaces, etc. Below is a chart showing the CPU support for some popular embedded RTOS. So far, the most popular RTOS in China are Micrium’s µC/OS-II (OS2) and µC/OS-III (OS3), which are now owned by Silicon Labs. These RTOS can be used for free in non-commercial applications, but require licensing for commercial use. OS2 and OS3 can cover almost all CPUs on the market, which is a rather ideal feature as it helps protect your software investment, allowing your application to easily migrate from one processor architecture to another.
Support for popular RTOS on CPUs
If your application requires RTOS functions for multitasking and resource sharing, then FreeRTOS, a popular open-source RTOS, may be another good choice. Similarly, if you are using Cortex-M processors, ARM provides free RTX. However, if you are designing a commercial product, it is strongly recommended to use a commercial RTOS rather than an open-source solution.
Micrium’s RTOS is easy to understand, and in fact, books have been written about the internal structure of these RTOS, which have been translated into Chinese, as shown in the chart below.
The most popular embedded operating systems in China
Currently, the Internet of Things is a very hot topic, and it depends on which aspect you are discussing. If you are designing a leaf node, you will likely need some form of wireless connection. There are many protocols to choose from, but most embedded operating system providers do not directly provide wireless protocol stacks; you may need to rely on semiconductor manufacturers to provide these solutions. It turns out that only a very few suppliers can provide a complete combination of wireless chips and software.
However, Silicon Labs offers IoT solutions and wireless connectivity, providing complete solutions for the following protocols: Bluetooth, Bluetooth Mesh, ZigBee, Thread, WiFi, and proprietary protocols (i.e., custom protocols). In fact, these protocols are pre-integrated into Silicon Labs’ EFR32 multi-protocol Wireless Gecko SoC series products. These chips not only include wireless protocols but also integrate Micrium’s embedded operating system. This makes it relatively easy to add functionality to products without worrying about the complexities of wireless technology.
More and more applications require the simultaneous use of multiple wireless protocols, and to reduce costs, the same chip must support these protocols. For example, you may want your customers to use Bluetooth to configure a ZigBee and Thread device. Once configured, it is feasible to continue running both protocol stacks simultaneously. Bluetooth can still serve as a beacon device to provide passersby with additional information about the value-added features your device offers. This will be very useful for electronic shelf labels, restaurants, gas stations, or other similar applications.
Another aspect is cloud connectivity. Your embedded device is likely to be part of a larger network of connected devices, and connecting to Amazon Web Services, Microsoft Azure Cloud, IBM Bluemix, or other platforms will no longer be an issue. Embedded operating system providers are increasingly offering cloud connectors and their protocol stacks to support these services.
Of course, IoT solution providers must provide some features to ensure that these devices are secure, reliable, and field-upgradable. Designers need to consider security factors early in the development cycle rather than after the fact. Customers are increasingly demanding that we provide complete, end-to-end solutions. Now this is possible because as part of Silicon Labs, we can not only provide embedded operating systems with extra modules and cloud connection features, but also offer complete wireless MCUs and protocol stacks, allowing engineers to focus more on the uniqueness of product design.
How to choose an operating system for IoT device development?
He Xiaoqing, Secretary-General of the Embedded Systems Association
Commercial embedded operating systems originated in the late 1970s and early 1980s and have gone through four development stages: RTOS kernel, RTOS, general-purpose operating systems embedded (such as embedded Linux and embedded Windows), and application-oriented embedded operating systems represented by Android. A more detailed account of the history of embedded operating systems is provided in my book “Chronicles of Embedded Operating Systems”.
Currently, the new generation of embedded operating systems is represented by IoT applications. When engineers choose, they need to consider several factors: First, the real-time requirements, check whether the project has real-time requirements, which can be divided into hard real-time and soft real-time; μC/OS-III and VxWorks can provide hard real-time, while embedded Linux can provide soft real-time; second, security considerations, choose according to the project’s security requirements; third, open-source considerations, as open-source operating systems have active communities and rich ecosystems, developers prefer open-source operating systems for IoT design; fourth, consideration of tools, check whether the operating system has extensive third-party tool support; fifth, cost considerations, purchasing commercial software incurs costs, while using open-source systems may still require significant investment despite free source code, so open-source is not necessarily free, and should be considered in advance.
A 2016 IoT developer research report indicated that Linux systems account for nearly 70% of existing IoT devices, FreeRTOS accounts for 13%, and other systems do not exceed 5% (such as ARM mbed, Contiki, TinyOS, etc.).
Personally, I believe that there are two pathways for IoT device development: one is based on open-source Linux and FreeRTOS, which have IoT protocol stacks and can connect to the cloud, along with some protocols and drivers developed by IoT chip companies, integrating to support IoT development, which is currently the most used solution; the other is to choose an IoT operating system, which is a one-stop solution, strong specificity, but weak generality, making it cumbersome to cut down if the company no longer pursues IoT projects in the future. These IoT operating systems are more suitable for IoT startup projects, allowing products to be launched quickly.
However, one point developers need to note is that in the IoT era, more and more devices use MCUs, and due to architectural reasons, they can only choose to use RTOS, which is not suitable for using large operating systems like Linux. Therefore, developers should prepare early, quickly familiarize themselves with RTOS and master one RTOS technology, building knowledge reserves that will be helpful for future development. Some IoT operating system kernels are also evolved from RTOS technology, such as Huawei Lite OS and Qingke Mico OS. For future IoT systems, RTOS will become a foundational software platform.
Embedded engineers and makers will also have some differences when choosing an operating system for IoT device development. Makers prefer open-source hardware like Raspberry Pi and Arduino, many of whom have transitioned from internet development and prefer using higher-level programming languages (Python and JavaScript), and they may not understand the embedded bottom layer well but excel in cloud connections, so their focus when choosing embedded operating systems will also differ.
Evaluating embedded operating systems from the perspectives of product, ecosystem, and technical services
Qiu Yi, Co-founder and Vice President of Shanghai Ruisaide Electronics Technology Co., Ltd.
When engineers choose embedded operating systems for learning purposes, they mainly look at whether the system is easy to get started with and whether the resources are rich, generally considering mainstream open-source embedded operating systems; if the purpose is product development, then they can evaluate embedded operating systems from the perspectives of product, ecosystem, and technical services.
First, regarding products. Mature and stable reliability are basic requirements; choosing a system that has been verified for at least 5 years in the industry and widely used across various sectors will provide more assurance. Secondly, selecting systems that are easy to use, facilitate development, and focus on developer experience is crucial. Clear architecture, comprehensive and concise APIs, extensive compiler tool support, and ease of debugging are essential for engineers’ application development. Furthermore, the rise of IoT and artificial intelligence has introduced many new demands, with hardware fragmentation and product diversification being major characteristics. Product development will use different architectures and brands of chip platforms, with a significant range from high-end to low-end products. Therefore, choosing systems that are cross-chip architecture and highly customizable is crucial, as it can avoid a lot of extra work and instability due to changing chip platforms; on the other hand, an operating system suitable for different grades of products can greatly increase software reusability and improve development efficiency.
Additionally, IoT applications impose various requirements on systems, such as connectivity, security, and low power consumption. Thus, choosing a feature-rich system can greatly assist in product development, such as having connectivity, security, low power consumption, reliable storage, and even lightweight GUI graphical interaction capabilities. Network connectivity is core to IoT terminal development; if the operating system can support rich network protocols (like MQTT, LWM2M, Web Socket, etc.) and has completed mainstream IoT cloud platform integrations, it will significantly reduce the development cycle and risks for IoT terminals.
Second, regarding the ecosystem. Engineers need to pay attention to the ecosystem and developer community of the embedded operating system they choose. Developers can both acquire and share technical documents, software modules, third-party tools from a good ecosystem and learn and exchange development experiences in the developer community, even gaining insights into problem-solving, which contributes to product development.
Third, regarding technical services. Engineers typically face pressures of time-to-market and R&D costs during product development, especially for IoT solution development, which is complex and challenging. If they choose embedded operating systems that provide good technical services (including technical support, training, etc.), it will greatly help improve team R&D capabilities, lower R&D costs, and accelerate product launches.
In addition to the three aspects mentioned above, I suggest paying attention to two major trends. First, focus on open-source embedded operating systems; traditional closed embedded operating systems are declining, while open-source embedded operating systems are becoming more widely used, and their ecosystems are gradually improving. Second, pay attention to domestic independent embedded and IoT operating systems, because IoT manufacturing, chips, and markets are all in China, so IoT operating systems must also be in China. For example, RT-Thread is a high-quality, developer-friendly domestic independent operating system that has undergone 11 years of testing, is highly mature, easy to develop, and well-supported by software ecosystems, which also meets the requirements for terminal software systems in the IoT era.
Editorial Perspective
The diversity of embedded system applications determines the variety of embedded operating systems. When choosing, if designing commercial products, try to choose mature commercial products with good ecosystems; if for makers, prioritize emerging, open-source operating systems. Especially for IoT applications, the choice of a suitable operating system is even more critical!
Today is the Qixi Festival, wishing all embedded enthusiasts a happy Chinese Valentine’s Day! Enjoy delicious food, flowers, and chocolates with your partner, and a good article is the holiday gift from the editor! The editor is also very sincere, and there will be several articles written by industry experts about embedded operating systems coming this week, so stay tuned for unexpected surprises!
1.Some say there are two secrets to mastering embedded development: diligence and not being shy.
2.How to make yourself look knowledgeable about artificial intelligence?
3.Let’s explore the mysterious internal world of embedded ARM MMU.
4.Which programming language should be chosen first?
5.Embedded engineers share their experiences on whether hardware engineers or software engineers have better prospects.
6.Embedded software engineers can transition from junior to qualified by following these steps!