xref: /nrf52832-nimble/rt-thread/README.md (revision 104654410c56c573564690304ae786df310c91fc)
1*10465441SEvalZero# RT-Thread #
2*10465441SEvalZero
3*10465441SEvalZero[中文页](README_zh.md) |
4*10465441SEvalZero
5*10465441SEvalZero[![GitHub](https://img.shields.io/github/license/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE)
6*10465441SEvalZero[![GitHub release](https://img.shields.io/github/release/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/releases)
7*10465441SEvalZero[![Build Status](https://travis-ci.org/RT-Thread/rt-thread.svg)](https://travis-ci.org/RT-Thread/rt-thread)
8*10465441SEvalZero[![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*10465441SEvalZero[![GitHub pull-requests](https://img.shields.io/github/issues-pr/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/pulls)
10*10465441SEvalZero[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/RT-Thread/rt-thread/pulls)
11*10465441SEvalZero
12*10465441SEvalZeroRT-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*10465441SEvalZero
14*10465441SEvalZero## Overview ##
15*10465441SEvalZero
16*10465441SEvalZeroRT-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*10465441SEvalZero
18*10465441SEvalZero* Device Driver;
19*10465441SEvalZero* Component;
20*10465441SEvalZero* Dyanmic Module
21*10465441SEvalZero
22*10465441SEvalZeroThe 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*10465441SEvalZero
24*10465441SEvalZeroThe 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*10465441SEvalZero
26*10465441SEvalZeroThe 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*10465441SEvalZero
28*10465441SEvalZero## Board Support Package ##
29*10465441SEvalZero
30*10465441SEvalZeroRT-Thread RTOS can support many architectures:
31*10465441SEvalZero
32*10465441SEvalZero* ARM Cortex-M0
33*10465441SEvalZero* ARM Cortex-M3/M4/7
34*10465441SEvalZero* ARM Cortex-R4
35*10465441SEvalZero* ARM Cortex-A8/A9
36*10465441SEvalZero* ARM920T/ARM926 etc
37*10465441SEvalZero* MIPS32
38*10465441SEvalZero* x86
39*10465441SEvalZero* Andes
40*10465441SEvalZero* C-Sky
41*10465441SEvalZero* RISC-V
42*10465441SEvalZero* PowerPC
43*10465441SEvalZero
44*10465441SEvalZero## License ##
45*10465441SEvalZero
46*10465441SEvalZeroRT-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*10465441SEvalZero
48*10465441SEvalZero    /*
49*10465441SEvalZero     * Copyright (c) 2006-2018, RT-Thread Development Team
50*10465441SEvalZero     *
51*10465441SEvalZero     * SPDX-License-Identifier: Apache-2.0
52*10465441SEvalZero     */
53*10465441SEvalZero
54*10465441SEvalZeroSince 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*10465441SEvalZero
56*10465441SEvalZeroNOTE:
57*10465441SEvalZero
58*10465441SEvalZeroRT-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*10465441SEvalZero
60*10465441SEvalZero## Usage ##
61*10465441SEvalZero
62*10465441SEvalZeroRT-Thread RTOS uses [scons](http://www.scons.org) as building system. Therefore, please install scons and Python 2.7 firstly.
63*10465441SEvalZeroSo 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*10465441SEvalZero
65*10465441SEvalZero* ```CROSS_TOOL``` the compiler which you want to use, gcc/keil/iar.
66*10465441SEvalZero* ```EXEC_PATH``` the path of compiler.
67*10465441SEvalZero
68*10465441SEvalZeroIn SConstruct file:
69*10465441SEvalZero
70*10465441SEvalZero```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*10465441SEvalZero
72*10465441SEvalZeroWhen you set these variables correctly, you can use command:
73*10465441SEvalZero
74*10465441SEvalZero    scons
75*10465441SEvalZero
76*10465441SEvalZerounder BSP directory to simplely compile RT-Thread RTOS.
77*10465441SEvalZero
78*10465441SEvalZeroIf you want to generate the IDE's project file, you can use command:
79*10465441SEvalZero
80*10465441SEvalZero    scons --target=mdk/mdk4/mdk5/iar/cb -s
81*10465441SEvalZero
82*10465441SEvalZeroto generate the project file.
83*10465441SEvalZero
84*10465441SEvalZeroNOTE: 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*10465441SEvalZero
86*10465441SEvalZero## Contribution ##
87*10465441SEvalZero
88*10465441SEvalZeroPlease refer the contributors in the github. Thank all of RT-Thread Developers.
89