RT-Thread
概述
RT-Thread 是一个开源的实时操作系统,支持丰富的组件和驱动框架。T0 芯片对 RT-Thread 提供完整支持,可以在 HSM 域(N300)、CPU1 域(UX900 双核集群)和 CPU2 域(UX900 双核集群)上运行。
由于 T0 芯片包含多个处理器核心,RT-Thread 在不同核心上的支持情况如下:
HSM 域(N300):单核运行 RT-Thread,适用于安全控制和实时管理
CPU1 域(UX900 双核集群):支持 SMP 模式,双核运行 RT-Thread
CPU2 域(UX900 双核集群,支持 VPU/NICE 扩展):支持 SMP 模式,双核运行 RT-Thread
示例
RT-Thread Hello World
概述
该工程演示了 RT-Thread 内核的一些基本功能。本例程创建了 4 个线程和一个定时器,定时器每个周期执行打印状态任务。
运行配置
无特殊配置,默认在 ILM 模式下运行。
运行现象
当工程正确运行后,串口终端会输出如下信息:
Nuclei SDK Build Time: Jan 7 2026, 15:36:09
Download Mode: ILM
CPU Frequency 200887664 Hz
CPU HartID: 0
\ | /
- RT - Thread Operating System
/ | \ 3.1.3 build Jan 7 2026
2006 - 2019 Copyright by rt-thread team
Main thread count: 0
thread 0 count: 0
thread 1 count: 0
thread 2 count: 0
thread 3 count: 0
thread 4 count: 0
thread 0 count: 1
thread 1 count: 1
thread 2 count: 1
thread 3 count: 1
thread 4 count: 1
Main thread count: 1
thread 0 count: 2
thread 1 count: 2
thread 2 count: 2
thread 3 count: 2
thread 4 count: 2
thread 0 count: 3
thread 1 count: 3
thread 2 count: 3
thread 3 count: 3
thread 4 count: 3
Main thread count: 2
RT-Thread msh
概述
该工程演示了 RT-Thread 的 msh 控制台功能。该用例使用 msh 作为控制台,可在串口助手中输入 help 获取已注册的命令进行测试控制。
运行配置
无特殊配置,默认在 ILM 模式下运行。
运行现象
当工程正确运行后,串口终端会输出如下信息:
Nuclei SDK Build Time: Jan 7 2026, 15:36:09
Download Mode: ILM
CPU Frequency 200887009 Hz
CPU HartID: 0
\ | /
- RT - Thread Operating System
/ | \ 3.1.3 build Jan 7 2026
2006 - 2019 Copyright by rt-thread team
Hello RT-Thread!
msh >help
RT-Thread shell commands:
list_timer - list timer in system
list_mailbox - list mail box in system
list_sem - list semaphore in system
list_thread - list thread
version - show RT-Thread version information
ps - List threads in the system.
help - RT-Thread shell help.
nsdk - msh nuclei sdk demo
msh >nsdk
Hello Nuclei SDK!
msh >