RT-Thread has standard version and Nano version, the standard version consisting of kernel layer, components and service layer, and IoT framework layer. The Nano version with a very small size and refined hard real-time kernel, which is very suited for the resource-constrained micro controller unit (MCU) system. This article would go into detail about the Nano version of RT-Thread.
RT-Thread Nano is a refined hard real-time kernel, written in C programming language and it applies object-oriented paradigm. RT-Thread Nano is a preemptive real-time multitasking RTOS, easy to tailor. Although Nano uses a small memory footprint, it still has a wealth of operating system features, such as multiple tasks scheduling, software timer, semaphore, mailbox and real-time scheduler. And RT-Thread Nano fits well for low-end 32-bit ARM MCU applications in the fields of home appliances, consumer electronics, medical equipment, industrial control, etc.
RT-Thread Nano is tailored from RT-Thread standard version, contains only the minimal core set of features. Nano architecture is shown as follow:
Supported Architecture: ARM: Cortex M0/ M3/ M4/ M7 etc, RISC-V and more.
Different from the standard version, Nano doesn’t have Scons buidling system, and no Kconfig and Env configuration tools, even some device frameworks and components that are meaningful to the standard version have been removed from Nano version. Nano is just a kernel.
Benefit from the minimalist nature of Nano, it is quite easy to port Nano to a specific platform. By adding Nano source files to the project, 90% of the porting efforts are done. And Commercial IDEs such as Keil MDK and Cube MX even integrated the Nano packages that can be added to project with a single click.
It’s easy to create an application using RT-Thread Nano.
Easy to tailor: Nano’s config file is rtconfig.h, it lists all the macros of the kernel, some of it has been turned off, you could turn it on when you need.
Easy to add FinSH: FinSH component doesn’t depend on the device framework, so it is easy to port to the Nano and require only two functions to implement.
Opt in drive library: Many firmware drive libraries provided by manufacturer are available, for example, STD lib from ST, HAL lib, LL lib, etc.,
Documents: RT-Thread offers developers with a set of documents that can be found on RT-Thread Github, and you are welcome to request the documents from RT-Thread official Twitter.
Super small footprint
Lower resource consumption: Nano uses a fairly small size of RAM and ROM, for example, with semaphore and mailbox functionality, two threads (main + idle) run, requiring only about 1KB RAM and 4KB ROM.
Nano resource requirements case: two threads (main + idle), for Cortex M3 architecture, MDK project with -O3 reports:
Total RO Size (Code + RO Data) 4000 ( 3.91kB)
Total RW Size (RW Data + ZI Data) 1168 ( 1.14kB)
Total ROM Size (Code + RO Data + RW Data) 4092 ( 4.00kB)
Note: If the project needs rich components, drive or software packages, please take the RT-Thread standard version.
Open Source and Free (Apache 2.0)
RT-Thread Nano follows Apache License version 2.0. All the real-time operating system kernel and open source components can be used free of charge for commercial products, there is no potential commercial risk and you will not being request to publish application source.