RT-Thread real-time operating system learning articles (1) - system introduction

Introduction to RT-Thread

RT-Thread overview

RT-Thread is an embedded real-time multi-threaded operating system. One of its basic properties is to support multi-tasking. Allowing multiple tasks to run at the same time does not mean that the processor actually executes multiple tasks at the same time (with multi-threaded scheduling The principle of the mechanism is the same, but the scheduling time of the thread can be set). At a certain moment, a CPU only allows one task to run. Due to the short running time, the task scheduler controls the rapid switching between tasks, thus forming the illusion of multiple tasks running at the same time. . In RT-Thread, tasks are implemented through threads, and the thread scheduler in RT-Thread is also the task scheduler mentioned above.
One of the main differences between RT-Thread and many other RTOS such as FreeRTOS and uC/OS is that it is not only a real-time kernel, but also has rich middle-level components. The figure below is the system architecture.
Figure source RT-Thread document
It specifically includes the following parts:

  • Kernel layer: RT-Thread kernel is the core part of RT-Thread, including the realization of objects in the kernel system, such as multi-threading and its scheduling, semaphore, mailbox, message queue, memory management, timer, etc.; libcpu/BSP (Chip porting-related documents/board support package) is closely related to hardware and consists of peripheral drivers and CPU porting.
  • Component and service layer: Components are upper-layer software based on the RT-Thread kernel, such as virtual file system, FinSH command line interface, network framework, device framework, etc. Modular design is adopted to achieve high cohesion inside components and low coupling between components.
  • RT-Thread software package: running on the RT-Thread Internet of Things operating system platform, it is a general software component for different application fields, consisting of description information, source code or library files. RT-Thread provides an open software package platform, where official or developer-provided software packages are stored. This platform provides developers with a choice of many reusable software packages, which is also an important part of the RT-Thread ecosystem. The software package ecology is very important for the selection of an operating system, because these software packages are highly reusable and highly modular, which greatly facilitates application developers to create the system they want in the shortest possible time. . The number of software packages supported by RT-Thread has reached 400+, as follows:
    • IoT-related software packages: Paho MQTT, WebClient, mongoose, WebTerminal, etc.
    • Scripting language-related software packages: Lua, JerryScript, MicroPython, and PikaScript are currently supported.
    • Multimedia-related software packages: Openmv, mupdf.
    • Tool software packages: CmBacktrace, EasyFlash, EasyLogger, SystemView.
    • System-related software packages: RTGUI, Persimmon UI, lwext4, partition, SQLite, etc.
    • Peripheral library and driver software package: RealTek RTL8710BN SDK.
    • other.

Guess you like

Origin blog.csdn.net/qq_41866091/article/details/129764459