A New Open Source Embedded Operating System | Linux China

A New Open Source Embedded Operating System | Linux China
Introduction: RT-Thread Smart is dedicated to open source in the field of IoT and edge computing.                       
Word count: 2728, estimated reading time: 4 minutes
LCTT Translator: tendertime
🌟
A New Open Source Embedded Operating System | Linux China
Translation: 1.0 articles

|

Contribution: 2 days
2022-05-04
2022-05-05
https://linux.cn/lctt/tendertime

Currently, there is a huge demand for embedded operating systems🔗 opensource.com. The operating system you build should ideally be open source. The development team of the RT-Thread🔗 www.rt-thread.io project has spent two years developing the latest achievement of this project: RT-Thread Smart. This is a microkernel operating system mainly targeted at mid-to-high-end processors, such as RISC-V or Arm Cortex-A with Memory Management Unit (MMU), providing a competitive, POSIX-based software platform for all industries in the embedded field.

A New Open Source Embedded Operating System | Linux China

Who needs RT-Thread Smart?

RT-Thread Smart is a professional, high-performance microkernel operating system for real-time applications. It provides an open-source foundation for embedded devices in all markets, such as security (IP cameras), industrial control, automotive devices, consumer electronics, and other embedded technology applications, covering all scenarios. Its significance lies in the fact that unlike traditional IoT operating systems, a microkernel operating system can fill the gap between traditional real-time operating systems (RTOS) and relatively large operating systems like Linux, achieving the best balance among real-time performance, cost, safety, boot speed, and other aspects.

A New Open Source Embedded Operating System | Linux China

Architecture of RT-Thread Smart

RT-Thread Smart divides the system into kernel mode and user mode through MMU and system calls, distinguishing the address space for each mode (a 32-bit system can provide 4G address space).

A New Open Source Embedded Operating System | Linux China

RT-Thread Smart Architecture

(RT-Thread, CC BY-SA 4.0🔗 creativecommons.org)

The RT-Thread Smart kernel includes the basic functions of the platform and supports customization. The user application environment of RT-Thread Smart uses musl libc🔗 musl.libc.org to provide POSIX🔗 opensource.com interface calls and runtime support for C language. It also inherits the original RT-Thread ecosystem, using SCons🔗 scons.org or other compilation tools like Autotools🔗 opensource.com, Makefile, CMake🔗 opensource.com, etc., to support development, as well as RT-Thread’s out-of-the-box online software packages (over 342 at the time of writing). You can even port Linux applications (like wget/cURL, BusyBox, OpenSSL, and Simple DirectMedia Layer) to your platform.

The compressed RT-Thread Smart kernel is only 217 KB, paired with a 127 KB root file system. It occupies about 2 MB of storage. It includes complete support for file systems, network protocols, and multimedia. RT-Thread only takes 3 to 5 seconds to complete booting, while RT-Thread Smart requires less than 500ms for startup and preparation when not running other functional components.

Through its integrated Persimmon User Interface (UI) component, RT-Thread Smart takes about 1 second from power-up to running the UI. In other words, this is a very lightweight and fast system. Of course, “real-time” does not refer to startup, but to the consistency of the system’s performance over time. For RT-Thread, real-time performance needs to be prioritized, with interrupt latency of less than 1μs, meeting the requirements of most scenarios with strict real-time requirements.

A New Open Source Embedded Operating System | Linux China

RT-Thread Smart vs. RT-Thread

You might wonder about the differences between RT-Thread Smart and RT-Thread. In simple terms, RT-Thread Smart is an operating system based on RT-Thread RTOS, but it integrates user-space processing. The kernel part of RT-Smart is essentially RT-Thread RTOS, running on virtual addresses, adding process management, using inter-process communication mechanisms (IPC), virtual memory/address space management, ELF loader, etc. All these features are implemented within RT-Thread RTOS, and when these components are disabled, RT-Smart reverts to RT-Thread RTOS.

Here is a comparison:

< Swipe left/right if not fully displayed >
RT-Thread RT-Thread Smart
Supported Chips Cortex-M/R, RISC-V RV32IMAC (and similar), Cortex-A MPU Cortex-A and other MPU with MMU
Compilation Kernel and application compiled into one image Kernel and application can be compiled and run separately
Storage Uses linear address space (even with MMU), virtual addressing using physical addresses Runs on a 32-bit operating system with over 1GB kernel occupancy, with complete 4G address space for user-space processes isolated from each other, peripheral drivers must access peripherals via virtual addresses
Runtime Errors When an application fails, the entire system crashes When an application fails, it does not affect the execution of the kernel and other processes
Running Mode Multithreaded model Multiprocess model (supports multithreading within processes, kernel threads supported by the kernel)
User Model Single-user model Single-user model
API RT-Thread API, POSIX PSE52 RT-Thread API (kernel and user mode), and complete POSIX API
Real-time Preemptive hard real-time system Preemptive hard real-time system
Resource Usage Very small Relatively small
Debugging Typically requires simulator debugging Supports GDB debugging, no simulator required

RT-Thread RTOS is very compact; all its applications and subsystems are compiled into the image, and multithreaded applications run and share the same address space.

RT-Thread Smart is independent. The system and applications are compiled and run separately. Applications have complete and mutually isolated address spaces. It also inherits RT-Thread’s excellent real-time performance while also having the characteristics of a POSIX environment.

Similarly, they are both compatible with the RT-Thread API. Applications of RT-Thread RTOS can be smoothly ported to RT-Thread Smart.

A New Open Source Embedded Operating System | Linux China

Embedded Open Source

RT-Thread Smart is an open-source project, project address: GitHub🔗 github.com. You can download the code and documentation, give it a try, and submit comments and feedback, spreading the project to more open-source advocates. Embedded systems belong to their users; there are too many embedded developers who have not found many usable embedded systems.

If you are a developer, please help improve RT-Thread Smart. As the RT-Thread project continues to advance, we hope to create an exciting open-source world for IoT and edge computing.

via: https://opensource.com/article/21/7/rt-thread-smart

Author: Zhu Tianlong Topic: lujun9972 Translator: tendertime Proofreader: wxy

This article is originally compiled by LCTT and honorably launched by Linux China

A New Open Source Embedded Operating System | Linux China
Welcome to reprint according to the CC-BY-SA agreement,
If you need to reprint, please leave a message under the article “Reprint: Public Account Name”,
We will add you to the whitelist, authorizing “Reprint articles can be modified”.

Leave a Comment

×