RT-Thread RTOS Introduction

When you are working on the embedded system domain, you must hear the word RTOS. RTOS is nothing but, Real-Time Operating System. We have already created the basics tutorial to learn the concept of RTOS. You can find the tutorials below.

You can read the above tutorials to get an idea about RTOS. There are many RTOS available in the market like FreeRTOS, NuttX RTOS, Zephyr RTOS, RTX RTOS, etc. In this series, we are going to discuss about the RT-Thread RTOS.

What is RT-Thread RTOS?

RT-Thread is an open-source embedded IoT operating system from China. RT-Thread was founded by Bernard Xiong in 2006.

Bernard Xiong

RT-Thread is a short form of Real Time Thread. The software has the characteristics of very low resource occupancy, high reliability, and high scalability, and can be greatly used in sensing nodes, wireless connection chips, and many resource-constrained scenes, also widely applied in the gateway, IPC, smart speakers, and many other high-performance applications.

rt-thread

It supports all mainstream compiling tools such as GCC, Keil, IAR, etc., and a variety of standard interfaces, such as POSIX, CMSIS, C++ application environment, Micropython, and Javascript, easy for developers to port a wide range of applications. RT-Thread also offers great commercial support to all the mainstream CPU architectures such as ARM Cortex-M/R/A, RISC-V, MIPS, X86, Xtensa, etc.

As we all know, RTOS will do multitasking (not actually multitasking, but it will give us an illusion of multitasking by fastly context switching). In the RT-Thread system, the task is implemented by threads. And the whole RT-Thread is written in the C language. So it is very easy to understand, and also easy to port the code to all top microcontrollers (MCUs). It applies object-oriented programming methods to real-time operating system design, making the code elegant, structured, modular, and very tailorable.

RT-Thread has now been ported for nearly 200 development boards.

RT-Thread Features

  • RT-Thread RTOS is designed for devices those are having minimum memory. RT-Thread’s minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
  • The power management components support a variety of low-power modes to minimize system power consumption.
  • Has rich components and a prosperous and fast-growing package ecosystem.
  • Elegant code style, easy to use, read, and master.
  • High Scalability. RT-Thread has high-quality scalable software architecture, loose coupling, and modularity, and is easy to tailor and expand.
  • Supports high-performance applications.
  • RT-Thread has console shell debugging tools and a variety of development assistant tools, making debugging development easy and efficient.
  • Graphical IDE, RT-Thread Studio, dramatically enhances the development experience and lowers the development threshold.
  • Support for SMP and AMP multi-core.
  • Support for 32-bit and 64-bit processors (ARM Cortex-A and RISC-V architectures).
  • The upcoming microkernel architecture, specifically for high-performance applications, has the features of application-to-core separation, fast start-up, low resource occupancy, high security, etc.
  • Supports cross-platform and a wide range of chips.

RT-Thread Version

RT-Thread RTOS has two versions.

  • Standard version
  • Nano version

RT-Thread Standard version is the full version which consists of the kernel layer, components, service layer, and IoT framework layer. The Nano version has been released by RT-Thread to target resource-constraint devices. The size of the Nano version is very less and it only required 3KB of ROM and 1.2KB of RAM.

Supported Architectures

RT-Thread supports many architectures, and a few are given below.

  • ARM Cortex-M0/M0+
  • ARM Cortex-M3
  • ARM Cortex-M4
  • ARM Cortex-M7
  • ARM Cortex-M23
  • ARM Cortex-M33
  • ARM Cortex-R4
  • ARM Cortex-A8/A9
  • ARM7
  • ARM9
  • ARM11
  • MIPS32
  • RISC-V
  • ARC
  • DSP
  • C-Sky
  • x86

Supported IDE and Compiler

The below IDEs are supported by RT-Thread RTOS.

  • RT-Thread Studio IDE
  • MDK KEIL
  • IAR
  • GCC

RT-Thread Architecture

RT-Thread has not only a real-time kernel but also rich components. Its architecture is as follows:

RT-Thread Architecture

It includes:

  • Kernel layer: RT-Thread kernel, the core part of RT-Thread, includes the implementation of objects in the kernel system, such as multi-threading and its scheduling, semaphore, mailbox, message queue, memory management, timer, etc.; libcpu/BSP (Chip Migration Related Files/Board Support Package) is closely related to hardware and consists of peripheral drivers and CPU porting.
  • Components and Service Layer: Components are based on upper-level software on top of the RT-Thread kernel, such as virtual file systems, FinSH command-line interfaces, network frameworks, device frameworks, and more. Its modular design allows for high internal cohesion inside the components and low coupling between components.
  • RT-Thread software package: A general-purpose software component running on the RT-Thread IoT operating system platform for different application areas, consisting of description information, source code or library files. RT-Thread provides an open package platform with officially available or developer-supplied packages that provide developers with a choice of reusable packages that are an important part of the RT-Thread ecosystem. The package ecosystem is critical to the choice of an operating system because these packages are highly reusable and modular, making it easy for application developers to build the system they want in the shortest amount of time. RT-Thread supports more than 370 software packages.

You can download the RT-Thread products below.

What’s Next

In our next tutorial, we will see how to use the RT-Thread RTOS with STM32 devices.

You can also read the below tutorials.

Linux Device Driver TutorialsC Programming Tutorials
FreeRTOS TutorialsNuttX RTOS Tutorials
RTX RTOS TutorialsInterrupts Basics
I2C Protocol – Part 1 (Basics)I2C Protocol – Part 2 (Advanced Topics)
STM32 TutorialsLPC2148 (ARM7) Tutorials
PIC16F877A Tutorials8051 Tutorials
Unit Testing in C TutorialsESP32-IDF Tutorials
Raspberry Pi TutorialsEmbedded Interview Topics
Reset Sequence in ARM Cortex-M4BLE Basics
VIC and NVIC in ARMSPI – Serial Peripheral Interface Protocol
STM32F7 Bootloader TutorialsRaspberry PI Pico Tutorials
STM32F103 Bootloader TutorialsRT-Thread RTOS Tutorials
Zephyr RTOS Tutorials – STM32Zephyr RTOS Tutorials – ESP32
AUTOSAR TutorialsUDS Protocol Tutorials
Product ReviewsSTM32 MikroC Bootloader Tutorial
VHDL Tutorials
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Table of Contents