rt-thread-official/README.md

85 lines
4.4 KiB
Markdown
Raw Normal View History

2013-05-05 05:41:37 +08:00
# RT-Thread #
2013-01-08 21:12:58 +08:00
2018-04-02 18:00:12 +08:00
[中文页](README_zh.md) |
2018-09-16 18:37:11 +08:00
[![GitHub](https://img.shields.io/github/license/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE)
2018-05-31 18:35:18 +08:00
[![GitHub release](https://img.shields.io/github/release/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/releases)
[![Build Status](https://travis-ci.org/RT-Thread/rt-thread.svg)](https://travis-ci.org/RT-Thread/rt-thread)
2017-03-29 13:25:34 +08:00
[![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)
2018-05-31 18:35:18 +08:00
[![GitHub pull-requests](https://img.shields.io/github/issues-pr/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/pulls)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/RT-Thread/rt-thread/pulls)
2013-02-22 23:46:45 +08:00
2017-11-02 20:11:50 +08:00
RT-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.
2013-05-05 05:41:37 +08:00
2014-01-04 23:30:34 +08:00
## Overview ##
2017-11-02 20:11:50 +08:00
RT-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:
2014-01-04 23:30:34 +08:00
* Device Driver;
2015-08-09 16:14:39 +08:00
* Component;
2018-09-09 11:13:41 +08:00
* Dyanmic Module
2014-01-04 23:30:34 +08:00
2015-10-15 23:36:51 +08:00
The 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.
2014-01-04 23:30:34 +08:00
2015-08-09 16:14:39 +08:00
The 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).
2018-09-09 11:13:41 +08:00
The 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).
2014-01-04 23:30:34 +08:00
## Board Support Package ##
RT-Thread RTOS can support many architectures:
* ARM Cortex-M0
2015-08-09 16:14:39 +08:00
* ARM Cortex-M3/M4/7
2014-01-04 23:30:34 +08:00
* ARM Cortex-R4
* ARM Cortex-A8/A9
* ARM920T/ARM926 etc
2017-11-02 20:11:50 +08:00
* MIPS32
2014-01-04 23:30:34 +08:00
* x86
2017-11-02 20:11:50 +08:00
* Andes
* C-Sky
* RISC-V
2014-01-04 23:30:34 +08:00
* PowerPC
## License ##
2018-09-09 11:13:41 +08:00
RT-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.
2014-01-06 13:32:24 +08:00
2018-09-09 11:13:41 +08:00
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
Since 9th of September 2018, PRs submitted by the community may be merged into the main line only after signing the Contributor License Agreement(CLA).
2014-01-04 23:30:34 +08:00
## Usage ##
2015-08-09 16:14:39 +08:00
RT-Thread RTOS uses [scons](http://www.scons.org) as building system. Therefore, please install scons and Python 2.7 firstly.
So 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):
2015-02-13 17:05:51 +08:00
2015-05-04 21:12:49 +08:00
* ```CROSS_TOOL``` the compiler which you want to use, gcc/keil/iar.
2015-02-13 17:05:51 +08:00
* ```EXEC_PATH``` the path of compiler.
In SConstruct file:
2015-08-09 16:14:39 +08:00
```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.
2015-02-13 17:05:51 +08:00
When you set these variables correctly, you can use command:
2018-09-09 11:13:41 +08:00
scons
2015-02-13 17:05:51 +08:00
2015-08-09 16:14:39 +08:00
under BSP directory to simplely compile RT-Thread RTOS.
2015-02-13 17:05:51 +08:00
2015-08-09 16:14:39 +08:00
If you want to generate the IDE's project file, you can use command:
2015-10-15 23:36:51 +08:00
2018-09-09 11:13:41 +08:00
scons --target=mdk/mdk4/mdk5/iar/cb -s
2015-02-13 17:05:51 +08:00
2018-09-09 11:13:41 +08:00
to generate the project file.
2015-02-13 17:05:51 +08:00
2018-09-09 11:13:41 +08:00
NOTE: 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.
2015-02-13 17:05:51 +08:00
2014-01-04 23:30:34 +08:00
## Contribution ##
2018-09-09 11:13:41 +08:00
Please refer the contributors in the github. Thank all of RT-Thread Developers.