RTOS supported by es32 SDK
Many embedded applications are small systems based on microcontrollers (mcu/ MCU), most of which do not use OS and do not have the basic framework of applications. This leads to serious fragmentation of embedded software and low development efficiency. With the advent of aiot era, embedded software becomes more and more complex, and the traditional “scattered” development model is facing unprecedented challenges. An excellent real-time operating system (RTOS) will make complex embedded system software development simple and reliable, and easy to upgrade and maintain.
The SDK of Neusoft carrier microelectronics es32 series products already supports three RTOS: FreeRTOS, RT thread nano and Huawei liteos, and provides rich kernel use cases.
Es32 SDK download address: (copy to the browser to open)
http://www.essemi.com/index/product/detail ？ id=799
Users can find the use cases of the three RTOS in the following folders of the es32 SDK:
ES32_ SDK\Projects\Book2_ Example\FreeRTOS
ES32_ SDK\Projects\Book2_ Example\RT-Thread-Nano
ES32_ SDK\Projects\Book2_ Example\LiteOS
Introduction to FreeRTOS, RT thread and Huawei liteos
Freertosfreertos was released by Richard Barry of the United States in 2003. It cooperates closely with many semiconductor manufacturers and is the RTOS with the highest market share at present. Follow the gplv2+ license agreement.
FreeRTOS is only an operating system kernel, which requires the expansion of third-party GUI (graphical user interface), tcp/ip protocol stack, FS (file system) and other components to achieve a more complex system. Unlike RT thread, which has a rich ecosystem of components and software packages, it can quickly implement rich and diverse IOT systems.
The copyright of RT threadrt thread belongs to Shanghai ruisaide Electronic Technology Co., Ltd. It was first released in January2006. The initial version number is 0.1.0. After more than 10 years of development, the main version number has been upgraded to 4.0.3. The cumulative number of developers has reached millions. The installed capacity of products in all walks of life has reached an amazing hundreds of millions, occupying the top of domestic RTOS. It follows the apache-2.0 open source licensing model.
The overall structure of RT thread is as follows:
It specifically includes the following parts:
- Kernel layer: RT thread kernel is the core part of RT thread, including the implementation of objects in the kernel system, such as multithreading and its scheduling, semaphores, mailboxes, message queues, memory management, timers, etc; Libcpu/bsp (chip migration related files / board level support packages) is closely related to hardware and consists of peripheral drivers and CPU migration.
- Component and service layer: components are upper layer software based on RT thread kernel, such as virtual file system, fish command line interface, network framework, device framework, etc. Modular design is adopted to achieve high cohesion within components and low coupling between components.
- RT thread software package: a general software component running on the RT thread IOT operating system platform and facing different application fields, which is composed of description information, source code or library files. RT thread provides an open software package platform, where software packages provided by the official or developers are stored. This platform provides developers with many choices of reusable software packages, which is also an important part of RT thread ecology. Software package ecology is very important for the selection of an operating system, because these software packages have strong reusability and high degree of modularity, which greatly facilitates application developers to create their desired system in the shortest time. The number of packages supported by RT thread has reached 300+.
- IDE：RT-Thread Studio
The RT thread kernel structure is as follows:
The kernel is above the hardware layer, and the kernel part includes kernel library and real-time kernel implementation.
The kernel library is a small subset of C library like function implementation to ensure that the kernel can run independently. The built-in C library of this part varies according to the compiler. When using the GNU gcc compiler, more standard C library implementations will be carried.
Huawei liteos is an “open source and free” real-time operating system. It is a lightweight IOT operating system in the IOT field. It is widely used in smart home, personal wear, Internet of vehicles, urban public services, manufacturing and other fields, greatly reducing equipment layout and maintenance costs, effectively reducing the development threshold and shortening the development cycle. Comply with the bsd-3 open source license agreement.
The overall structure of liteos is as follows:
It mainly includes the following components:
- Basic kernel: including non tailorable minimal kernel and other tailorable modules. The minimal kernel includes task management, memory management, interrupt management, exception management and system clock. The tailorable modules include semaphores, mutexes, queue management, event management, software timers, etc.
- Kernel enhancement: Based on the basic functions of the kernel, further enhancements are provided, including c+++ support, debugging components, etc. The debugging component provides powerful problem location and debugging capabilities, including shell commands, trace event tracking, obtaining CPU utilization, LMS, etc.
- File system: provide a set of lightweight file system interfaces to support the basic functions of the file system, including VFS, ramfs, FatFs, etc.
- System library interfaces: provide a series of system library interfaces to improve the portability and compatibility of the operating system, including libc/libm/posix and CMSIS adaptation layer interfaces.
- Network protocol stack: provide rich network protocol stacks to support a variety of network functions, including coap/lwm2m, mqtt, etc.
- Business components: a series of business components or frameworks built on the above components to support richer user scenarios, including OTA, GUI, AI, sensing framework, etc.
- IDE：Huawei LiteOS Studio。
Huawei liteos kernel structure is as follows:
Since the release of the open source community, Huawei liteos has built an open source IOT ecosystem around the Nb IOT IOT market from multi-dimensional enabling partners such as technology, ecology, solutions and commercial support. At present, Huawei liteos has gathered 50+mcu and solution partners to jointly launch a number of open source development kits and industry solutions, helping customers in many industries to quickly launch IOT terminals and services. Customers cover many industries, Provide developers with a “one-stop” complete software platform, effectively reduce the development threshold and shorten the development cycle.
Huawei liteos basic kernel includes non tailorable minimal kernel and other tailorable modules. The minimal kernel includes task management, memory management, interrupt management, exception management and system clock. The tailorable modules include semaphores, mutexes, queue management, event management, software timers, etc. Huawei liteos supports up (single core) and SMP (multi-core) modes, that is, it supports running in a single core or multi-core environment.
Comparison of FreeRTOS, RT thread and liteos kernels
RTOS kernel use cases supported by es32 SDK
The es32 SDK provides users with the kernel use cases of FreeRTOS, RT thread nano and Huawei liteos, as shown in the following figure. Users can learn the use of RTOS through these use cases.