Name Date Size #Lines LOC

..--

components/H25-Apr-2025-637,388428,940

documentation/H25-Apr-2025-2,8581,739

examples/H25-Apr-2025-10,9137,565

include/H25-Apr-2025-3,4642,145

libcpu/H25-Apr-2025-73,61948,491

src/H25-Apr-2025-11,7306,636

tools/H25-Apr-2025-90,17471,750

.gitattributesH A D25-Apr-2025459 4340

.gitignoreH A D25-Apr-2025268 3733

.travis.ymlH A D25-Apr-20257 KiB10983

AUTHORSH A D25-Apr-2025571 4635

ChangeLog.mdH A D25-Apr-202561 KiB1,122905

KconfigH A D25-Apr-2025100 43

LICENSEH A D25-Apr-202511.1 KiB202169

README.mdH A D25-Apr-20254.5 KiB8956

README_zh.mdH A D25-Apr-20255.8 KiB9862

README.md

1# RT-Thread #
2
3[中文页](README_zh.md) |
4
5[![GitHub](https://img.shields.io/github/license/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE)
6[![GitHub release](https://img.shields.io/github/release/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/releases)
7[![Build Status](https://travis-ci.org/RT-Thread/rt-thread.svg)](https://travis-ci.org/RT-Thread/rt-thread)
8[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RT-Thread/rt-thread?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9[![GitHub pull-requests](https://img.shields.io/github/issues-pr/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/pulls)
10[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/RT-Thread/rt-thread/pulls)
11
12RT-Thread is an open source IoT operating system from China, which has strong scalability: from a tiny kernel running on a tiny core, for example ARM Cortex-M0, or Cortex-M3/4/7, to a rich feature system running on MIPS32, ARM Cortex-A8, ARM Cortex-A9 DualCore etc.
13
14## Overview ##
15
16RT-Thread RTOS like a traditional real-time operating system. The kernel has real-time multi-task scheduling, semaphore, mutex, mail box, message queue, signal etc. However, it has three different things:
17
18* Device Driver;
19* Component;
20* Dyanmic Module
21
22The device driver is more like a driver framework, UART, IIC, SPI, SDIO, USB device/host, EMAC, MTD NAND etc. The developer can easily add low level driver and board configuration, then combined with the upper framework, he/she can use lots of features.
23
24The Component is a software concept upon RT-Thread kernel, for example a shell (finsh/msh shell), virtual file system (FAT, YAFFS, UFFS, ROM/RAM file system etc), TCP/IP protocol stack (lwIP), POSIX (thread) interface etc. One component must be a directory under RT-Thread/Components and one component can be descripted by a SConscript file (then be compiled and linked into the system).
25
26The Dyanmic Module, formerly named as User Applicaion (UA) is a dyanmic loaded module or library, it can be compiled standalone without Kernel. Each Dyanmic Module has its own object list to manage thread/semaphore/kernel object which was created or initialized inside this UA. More information about UA, please visit another [git repo](https://github.com/RT-Thread/rtthread-apps).
27
28## Board Support Package ##
29
30RT-Thread RTOS can support many architectures:
31
32* ARM Cortex-M0
33* ARM Cortex-M3/M4/7
34* ARM Cortex-R4
35* ARM Cortex-A8/A9
36* ARM920T/ARM926 etc
37* MIPS32
38* x86
39* Andes
40* C-Sky
41* RISC-V
42* PowerPC
43
44## License ##
45
46RT-Thread is Open Source software under the Apache License 2.0 since RT-Thread v3.1.1. License and copyright information can be found within the code.
47
48    /*
49     * Copyright (c) 2006-2018, RT-Thread Development Team
50     *
51     * SPDX-License-Identifier: Apache-2.0
52     */
53
54Since 9th of September 2018, PRs submitted by the community may be merged into the main line only after signing the Contributor License Agreement(CLA).
55
56NOTE:
57
58RT-Thread using the Apache license v2.0 is only launched after the release of v3.1.1, and is still in preparation right now.
59
60## Usage ##
61
62RT-Thread RTOS uses [scons](http://www.scons.org) as building system. Therefore, please install scons and Python 2.7 firstly.
63So far, the RT-Thread scons building system support the command line compile or generate some IDE's project. There are some option varaibles in the scons building script (rtconfig.py):
64
65* ```CROSS_TOOL``` the compiler which you want to use, gcc/keil/iar.
66* ```EXEC_PATH``` the path of compiler.
67
68In SConstruct file:
69
70```RTT_ROOT``` This variable is the root directory of RT-Thread RTOS. If you build the porting in the bsp directory, you can use the default setting. Also, you can set the root directory in ```RTT_ROOT``` environment variable and not modify SConstruct files.
71
72When you set these variables correctly, you can use command:
73
74    scons
75
76under BSP directory to simplely compile RT-Thread RTOS.
77
78If you want to generate the IDE's project file, you can use command:
79
80    scons --target=mdk/mdk4/mdk5/iar/cb -s
81
82to generate the project file.
83
84NOTE: RT-Thread scons building system will tailor the system according to your rtconfig.h configuration header file. For example, if you disable the lwIP in the rtconfig.h by commenting the ```#define RT_USING_LWIP```, the generated project file should have no lwIP related files.
85
86## Contribution ##
87
88Please refer the contributors in the github. Thank all of RT-Thread Developers.
89

README_zh.md

1# RT-Thread #
2
3[![GitHub release](https://img.shields.io/github/release/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/releases)
4[![Build Status](https://travis-ci.org/RT-Thread/rt-thread.svg)](https://travis-ci.org/RT-Thread/rt-thread)
5[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RT-Thread/rt-thread?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6[![GitHub pull-requests](https://img.shields.io/github/issues-pr/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/pulls)
7[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/RT-Thread/rt-thread/pulls)
8
9RT-Thread是一个来自中国的开源物联网操作系统,它提供了非常强的可伸缩能力:从一个可以运行在ARM Cortex-M0芯片上的极小内核,到中等的ARM Cortex-M3/4/7系统,甚至是运行于MIPS32、ARM Cortex-A系列处理器上功能丰富系统。
10
11## 简介 ##
12
13RT-Thread包含了一个自有的、传统的硬实时内核:可抢占的多任务实时调度器,信号量,互斥量,邮箱,消息队列,信号等。当然,它和传统的实时操作系统还存在着三种不同:
14
15* 设备驱动框架;
16* 软件组件;
17* 应用模块
18
19设备驱动框架更类似一套驱动框架,涉及到UART,IIC,SPI,SDIO,USB从设备/主设备,EMAC,NAND闪存设备等。它会把这些设备驱动中的共性抽象/抽取出来,而驱动工程师只需要按照固定的模式实现少量的底层硬件操作及板级配置。通过这样的方式,让一个硬件外设更容易地对接到RT-Thread系统中,并获得RT-Thread平台上的完整软件栈功能。
20
21软件组件是位于RT-Thread内核上的软件单元,例如命令行(finsh/msh shell),虚拟文件系统(FAT,YAFFS,UFFS,ROM/RAM文件系统等),TCP/IP网络协议栈(lwIP),Libc/POSIX标准层等。一般的,一个软件组件放置于一个目录下,例如RT-Thread/components目录下的文件夹,并且每个软件组件通过一个 SConscript文件来描述并被添加到RT-Thread的构建系统中。当系统配置中开启了这一软件组件时,这个组件将被编译并链接到最终的RT-Thread固件中。
22
23注:随着RT-Thread 3.0中的包管理器开启,越来越多的软件组件将以package方式出现在RT-Thread平台中。而RT-Thread平台更多的是指:
24
25* RT-Thread内核;
26* shell命令行;
27* 虚拟文件系统;
28* TCP/IP网络协议栈;
29* 设备驱动框架;
30* Libc/POSIX标准层。
31
32更多的IoT软件包则以package方式被添加到RT-Thread系统中。
33
34应用模块,或者说用户应用(User Application,UA)是一个可动态加载的模块:它可以独立于RT-Thread固件而单独编译。一般的,每个UA都包含一个main函数入口;一个它自己的对象链表,用于管理这个应用的任务/信号量/消息队列等内核对象,创建、初始化、销毁等。更多关于UA的信息,请访问另外一个 [git 仓库](https://github.com/RT-Thread/rtthread-apps) 了解。
35
36## 支持的芯片架构 ##
37
38RT-Thread支持数种芯片体系架构,已经覆盖当前应用中的主流体系架构:
39
40* ARM Cortex-M0
41* ARM Cortex-M3/M4/7
42* ARM Cortex-R4
43* ARM Cortex-A8/A9
44* ARM920T/ARM926 etc
45* MIPS32
46* x86
47* Andes
48* C-Sky
49* RISC-V
50* PowerPC
51
52## 许可证 ##
53
54RT-Thread从v3.1.1版本开始,是一个以Apache许可证2.0版本授权的开源软件,许可证信息以及版权信息一般的可以在代码首部看到:
55
56    /*
57     * Copyright (c) 2006-2018, RT-Thread Development Team
58     *
59     * SPDX-License-Identifier: Apache-2.0
60     */
61
62从2018/09/09开始,开发者提交PR需要签署贡献者许可协议(CLA)。
63
64注意:
65
66以Apache许可协议v2.0版本授权仅在RT-Thread v3.1.1正式版发布之后才正式实施,当前依然在准备阶段(准备所有原有开发者签署CLA协议)。
67
68## 编译 ##
69
70RT-Thread使用了[scons](http://www.scons.org)做为自身的编译构建系统,并进行一定的定制以满足自身的需求(可以通过scons --help查看RT-Thread中额外添加的命令)。在编译RT-Thread前,请先安装Python 2.7.x及scons。
71
72截至目前,RT-Thread scons构建系统可以使用命令行方式编译代码,或者使用scons来生成不同IDE的工程文件。在使用scons时,需要对构建配置文件(rtconfig.py)中如下的变量进行配置:
73
74* ```CROSS_TOOL``` 指定希望使用的工具链,例如gcc/keil/iar.
75* ```EXEC_PATH``` 工具链的路径.
76
77注:在SConstruct文件中:
78
79```RTT_ROOT``` 这个变量指向了RT-Thread的发布源代码根目录。如果你仅计划编译bsp目录下的target,这个`RTT_ROOT`可以使用默认配置。另外,你也可以设置同名的环境变量来指向不同的RT-Thread源代码根目录。
80
81当你把相关的配置都配置正确后,你可以在具有目标目录下(这个目录应包括rtconfig.py、SContruct文件)执行以下命令:
82
83    scons
84
85从而简单地就编译好RT-Thread。
86
87如果你希望使用IDE来编译RT-Thread,你也可以使用命令行:
88
89    scons --target=mdk/mdk4/mdk5/iar/cb -s
90
91来生成mdk/iar等的工程文件。而后在IDE中打开project前缀的工程文件来编译RT-Thread。
92
93注意:RT-Thread的scons构建系统会根据配置头文件rtconfig.h来裁剪系统。例如,如果你关闭了rtconfig.h中的lwIP定义(通过注释掉```#define RT_USING_LWIP```的方式),则scons生成的IDE工程文件中将自动不包括lwIP相关的文件。而在RT-Thread 3.0版本中,可以通过menuconfig的方式来配置整个系统,而不需要再手工更改rtconfig.h配置头文件。
94
95## 贡献者 ##
96
97请访问github上RT-Thread项目上的contributors了解已经为RT-Thread提交过代码,PR的贡献者。感谢所有为RT-Thread付出的开发者们!
98