After a year of development, RT-Thread 5.1, a real-time operating system (RTOS) for Internet of Things devices, is now available. The system has been developed since 2006 by a community of Chinese developers and has currently been ported to 154 boards, chips and microcontrollers based on x86, ARM, MIPS, C-SKY, Xtensa, ARC and RISC-V architectures. The minimalistic RT-Thread (Nano) build requires only 3 KB of Flash and 1.2 KB of RAM to operate. For IoT devices that are not very limited in resources, a full-featured version is offered that supports package management, configurators, a network stack, packages with the implementation of a graphical interface, voice control systems, DBMS, network services and engines for executing scripts. The code is written in C and distributed under the Apache 2.0 license.
The operating system consists of three basic layers:
- A kernel that performs tasks in real time. The kernel provides generic core primitives covering areas such as lock management and data synchronization, task scheduling, thread management, signal handling, message queuing, timer management, and memory management. Hardware-specific features are implemented at the libcpu and BSP levels, which include the necessary drivers and code to support the CPU.
- Components and services running on top of the kernel and offering abstractions such as virtual file system, exception handling system, key/value storage, FinSH command line interface, network stack (LwIP) and network frameworks, device support libraries, audio subsystem, wireless stack, components to support Wi-Fi, LoRa, Bluetooth, 2G/4G. Modular architecture allows you to connect components and services depending on your tasks and available hardware resources.
- Software packages. General purpose software components and function libraries are distributed and installed in the form of packages. The repository currently includes over 450 packages ranging from GUIs, multimedia and network applications to robot control systems and machine learning processors. The packages also provide engines for organizing the execution of programs in the languages ββLua, JerryScript, MicroPython, PikaScript and Rust (rtt_rust).

Platform Features:
- Architecture support:
- ARM Cortex-M0/M0+/M3/M4/M7/M23/M33 (microcontrollers from manufacturers such as ST, Winner Micro, MindMotion, Realtek, Infineon, GigaDevic, Nordic, Nuvoton, NXP are supported).
- ARM Cortex-R4.
- ARM Cortex-A8/A9 (NXP).
- ARM7 (Samsung).
- ARM9 (Allwinner, Xilinx, GOKE).
- ARM11 (Fullhan).
- MIPS32 (Loongson, Ingenic).
- RISC-V RV32E/RV32I[F]/RV64[D] (sifive, Canaan Kendryt, bouffalo_lab, Nuclei, T-Head, HPMicro).
- ARC (SYNOPSYS)
- DSP (TI).
- C-Sky.
- x86.
- Extensible modular architecture that allows you to create an environment suitable for systems with limited resources (minimum requirements - 3 KB Flash and 1.2 KB RAM).
- Support for various standard interfaces for program development, such as POSIX, CMSIS, C++ API. Separately, the RTduino layer is being developed for compatibility with the API and libraries of the Arduino project.
- Expandable through a system of packages and plug-ins.
- Support for application development for high-performance information processing.
- Flexible power management system that allows you to automatically put the device into sleep mode and dynamically control voltage and frequency depending on the load.
- Hardware support for encryption and decryption, providing libraries with various cryptographic algorithms.
- Unified interface for access to peripheral devices and additional equipment.
- Virtual FS and availability of drivers for FS such as FAT, UFFS, NFSv3, ROMFS and RAMFS.
- Protocol stack for TCP/IP, Ethernet, Wi-Fi, Bluetooth, NB-IoT, 2G/3G/4G, HTTP, MQTT, LwM2M, etc.
- A system for remote delivery and installation of updates that supports encryption and verification using a digital signature, resuming an interrupted installation, recovering from a failure, rolling back changes, etc.
- A system of dynamically loadable kernel modules that allows you to separately build and develop kernel components, and dynamically load them when necessary.
- Support for various third party packages such as Yaffs2, SQLite, FreeModbus, Canopen, etc.
- The ability to directly compile a BSP-package (Board Support Package) with components to support a specific hardware platform, and upload it to the board.
- Availability of an emulator (BSP qemu-vexpress-a9), which allows you to develop applications without using real boards.
- Support for common compilers and development tools such as GCC, MDK Keil and IAR.
- Development of our own integrated development environment RT-Thread Studio IDE, which allows you to create and debug applications, load them onto boards, and manage settings. RT-Thread development plugins are also available for Eclipse and VS Code.
- The presence of the Env console interface, which simplifies the creation of projects and setting up the environment.
Among the changes in the new release:
- RT-Smart, a hybrid operating system based on RT-Thread that separates applications from the kernel, supports epoll, eventfd, signalfd, timerfd and select mechanisms by default. The terminal emulator subsystem has been implemented. Added support for DFZU2EG MPSoC and cv181x-riscv devices.
- RTduino, a layer to ensure compatibility with the Arduino ecosystem, has added support for raspberry-pico, stm32h503-st-nucleo, stm32h563-st-nucleo, stm32f412-nucleo, stm32f407-rt-spark boards.
- Updated third-party components such as ssh, sftp, weston and vim.
- Added support for new boards and chips such as HPMicro RISC-V, STM32 Nucleo, Adafruit Metro M4, Seeed Wio-Terminal, ST (stm32L431_tencentos, stm32h7s7-disco, stm32f407-lckfb-skystar, stm32h503-st-nucleo), Renesas (ek-ra8m1, ek-ra8d1, ra8d1-vision-board), AT32 (at32f402-start, at32f405-start), HT32 (ht32f52352, ht32f12366, AVR32 at32uc3a0256, at32uc3b0256), CVITEK (c906_little, cv18xx_risc-v), WCH (yd-ch32v307vct6), HC32 (ev_hc32f4a0_lqfp176, ev_hc32f460_lqfp100_v2), (ev_hc32f448_lqfp80, GD32 gd32407v-lckfb), NXP (frdm-mcxn947, frdm-mcxa153).
- The work of task schedulers and CPUs has been optimized. Added a layer to abstract the rt_sched scheduler.
- Optimization of work on multi-core systems has been carried out.
- The ability to connect handlers to malloc memory allocation operations has been provided.
- For ARM64 and RV64 architectures, support for kernel backtrace is implemented.
- The transition to a new model of device drivers has continued.
- SDL64 support has been added to the virtio drivers qemu-virt64-aarch64 and qemu-virt2-riscv.
- Added framework for developing clk drivers.
- Added exfat configuration to DFS. The kernel has been switched to use the dfsv2 file system by default.
- Improved support for TTY terminals.
- The I/O system has added support for the O_DIRECT and O_SYNC flags.
- In the implementation of lightweight processes lwP (Lightweight Process), the wp_new function is replaced by lwp_create. Added sys_setitimer function.
- Support for memory reservation has been added to the MM memory manager and the rt_aspace_mremap_range function has been implemented.
- Libcpu adds support for ARM Cortex-M85 and Cortex-R52 processors
Source: opennet.ru
