rt-thread 官方库镜像 https://www.rt-thread.org
Go to file
YangZhongQing 50cb4be8ce
bsp beaglebone: add IAR support (#6443)
* bsp beaglebone: add IAR template files and fix it's build error

ATTENTION:
project.* was generated by scons, so I add it to gitignore.
rtconfig.py *FLAGS located in "PLATFORM == 'iccarm'" are unverified and maybe wrong.
(我只是从STM32里面抄来,然后根据自己的理解改了一下,并没有验证这些参数的正确性,
我也不知道怎么用命令行调用这些参数来编译)

* bsp beaglebone: add beaglebone_ram.icf ROM address from uboot_cmd.txt

am335x_DDR.icf use 0x82000000, different to uboot_cmd.txt & gcc beaglebone_ram.lds,
the difference will easy cause later developer got below error:

=> go 0x80200000
## Starting application at 0x80200000 ...
undefined instruction
pc : [<8200956c>]	   lr : [<8ff62497>]
reloc pc : [<728a956c>]	   lr : [<80802497>]
sp : 8df37358  ip : 00000000	 fp : 00000002
r10: 8df4d448  r9 : 8df3feb8	 r8 : 8ffd30f8
r7 : 8ff78089  r6 : 00000002	 r5 : 80200000  r4 : 8df4d44c
r3 : 80200000  r2 : 8df4d44c	 r1 : 8df4d44c  r0 : 00000001
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32
Code: 5dbffcdd bb9bdf7f abf85423 eff1f77f (7ed7daaf)
Resetting CPU ...

resetting ...

* libcpu am335x: context_iar.S rt_hw_context_switch: add thumb mode support

IAR new project defualt Processor mode is Thumb, this will cause user
easy occur the following error:
...
msh />Execption:
r00:0x8800aaa8 r01:0x802080c5 r02:0x00000000 r03:0x88009b4c
r04:0x00001000 r05:0x00000000 r06:0x00001403 r07:0x00100000
r08:0x00000000 r09:0x00000000 r10:0x0000000a
fp :0x0000000a ip :0x65687374
sp :0x00006c6c lr :0x0000008a pc :0x88008be0
cpsr:0x880001bc
software interrupt
shutdown...
(0) assertion failed at function:rt_hw_cpu_shutdown, line number:160

* bsp beaglebone: change IAR template.ewp code use Arm mode

Arm mode bin size will bigger than Thumb mode

* libcpu am335x: IAR: use rt_hw_cpu_dcache_enable instead of rt_cpu_dcache_enable

Reviewer mysterywolf say:
麻烦把rt_cpu_icache_enable 和 rt_cpu_dcache_enable, 统一改成 rt_hw_cpu_icache_enable 和 rt_hw_cpu_dcache_enable
rt_hw_cpu_icache_enable 和 rt_hw_cpu_dcache_enable 是其他bsp也是这么命名的 这是个命名统一的函数
2022-09-22 14:13:34 +08:00
.gitee update documentation (#5674) 2022-03-14 21:18:14 +08:00
.github 更正stm32/stm32f103-100ask-mini和pro的默认下载器为st-link,添加基于mm32f3270系列由百问网自主设计的火龙果开发板的bsp 2022-09-02 10:04:47 +08:00
bsp bsp beaglebone: add IAR support (#6443) 2022-09-22 14:13:34 +08:00
components 修改Ymodem组件中MSH的ry命令,已便于自定义保存路径 (#6433) 2022-09-20 10:31:34 -04:00
documentation fix typo 2022-08-27 22:22:35 -04:00
examples [ci] Test with time slice off by default 2022-08-16 12:33:50 -04:00
include [kernel] add rt_ssize_t data structure 2022-09-16 17:26:07 +08:00
libcpu bsp beaglebone: add IAR support (#6443) 2022-09-22 14:13:34 +08:00
src [fix] Fix simulator compilation warnings (#6438) 2022-09-20 10:31:11 -04:00
tools [tools][iar] 将IARPath作为独立函数 2022-09-18 15:43:18 -04:00
.gitattributes Update .gitattributes 2021-03-03 03:16:53 +08:00
.gitignore add ignore files and directories 2022-08-30 07:47:07 -04:00
AUTHORS update CRLF 2013-01-09 00:06:34 +08:00
ChangeLog.md [update] changelog for RT-Thread_v4.1.1 (#6321) 2022-08-21 22:22:57 -04:00
Jenkinsfile update for ci 2022-04-18 10:07:15 +08:00
Kconfig [add] auto test ci. 2021-05-10 20:34:35 +08:00
LICENSE Update license information. 2018-09-09 11:13:41 +08:00
README.md [修订]修改许可协议 2022-09-12 07:36:55 -04:00
README_de.md update readme for languages choices 2022-05-18 13:27:19 +08:00
README_es.md update readme for languages choices 2022-05-18 13:27:19 +08:00
README_zh.md [修订]修改许可协议 2022-09-12 07:36:55 -04:00

README.md

English | 中文 | Español | Deutsch

GitHub GitHub release Build Status Gitter GitHub pull-requests PRs Welcome

RT-Thread

RT-Thread was born in 2006, it is an open source, neutral, and community-based real-time operating system (RTOS).

RT-Thread is mainly written in C language, easy to understand and easy to port(can be quickly port to a wide range of mainstream MCUs and module chips). It applies object-oriented programming methods to real-time system design, making the code elegant, structured, modular, and very tailorable.

RT-Thread has Standard version and Nano version. For resource-constrained microcontroller (MCU) systems, the Nano version that requires only 3KB Flash and 1.2KB RAM memory resources can be tailored with easy-to-use tools. For resource-rich IoT devices, RT-Thread can use the on-line software package management tool, together with system configuration tools, to achieve intuitive and rapid modular cutting, seamlessly import rich software packages; thus, achieving complex functions like Android's graphical interface and touch sliding effects, smart voice interaction effects, and so on.

RT-Thread Architecture

RT-Thread has not only a real-time kernel, but also rich components. Its architecture is as follows:

architecture

It includes:

  • Kernel layer: RT-Thread kernel, the core part of RT-Thread, includes the implementation of objects in the kernel system, such as multi-threading and its scheduling, semaphore, mailbox, message queue, memory management, timer, etc.; libcpu/BSP (Chip Migration Related Files/Board Support Package) is closely related to hardware and consists of peripheral drivers and CPU porting.

  • Components and Service Layer: Components are based on upper-level software on top of the RT-Thread kernel, such as virtual file systems, FinSH command-line interfaces, network frameworks, device frameworks, and more. Its modular design allows for high internal cohesion inside the components and low coupling between components.

  • RT-Thread software package: A general-purpose software component running on the RT-Thread IoT operating system platform for different application areas, consisting of description information, source code or library files. RT-Thread provides an open package platform with officially available or developer-supplied packages that provide developers with a choice of reusable packages that are an important part of the RT-Thread ecosystem. The package ecosystem is critical to the choice of an operating system because these packages are highly reusable and modular, making it easy for application developers to build the system they want in the shortest amount of time. RT-Thread supports 450+ software packages.

RT-Thread Features

  • Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
  • A variety of standard interfaces, such as POSIX, CMSIS, C++ application environment.
  • Has rich components and a prosperous and fast growing package ecosystem.
  • Elegant code style, easy to use, read and master.
  • High Scalability. RT-Thread has high-quality scalable software architecture, loose coupling, modularity, is easy to tailor and expand.
  • Supports high-performance applications.
  • Supports all mainstream compiling tools such as GCC, Keil and IAR.
  • Supports a wide range of architectures and chips.

Code Catalogue

RT-Thread source code catalog is shown as follow:

Name Description
BSP Board Support Package based on the porting of various development boards
components Components, such as finsh shell, file system, protocol stack etc.
documentation Related documents, like coding style, doxygen etc.
examples Related sample code
include Head files of RT-Thread kernel
libcpu CPU porting code such as ARM/MIPS/RISC-V etc.
src The source files for the RT-Thread kernel.
tools The script files for the RT-Thread command build tool.

RT-Thread has now been ported for nearly 200 development boards, most BSPs support MDK, IAR development environment and GCC compiler, and have provided default MDK and IAR project, which allows users to add their own application code directly based on the project. Each BSP has a similar directory structure, and most BSPs provide a README.md file, which is a markdown-format file that contains the basic introduction of BSP, and introduces how to simply start using BSP.

Resources

Supported Architectures

RT-Thread supports many architectures, and has covered the major architectures in current applications. Architecture and chip manufacturer involved:

  • ARM Cortex-M0/M0+manufacturers like ST
  • ARM Cortex-M3manufacturers like ST、Winner Micro、MindMotion, ect.
  • ARM Cortex-M4manufacturers like ST、Nuvton、NXP、GigaDevice、Realtek、Ambiq Micro, ect.
  • ARM Cortex-M7manufacturers like ST、NXP
  • ARM Cortex-M23manufacturers like GigaDevice
  • ARM Cortex-M33manufacturers like ST
  • ARM Cortex-R4
  • ARM Cortex-A8/A9manufacturers like NXP
  • ARM7manufacturers like Samsung
  • ARM9manufacturers like Allwinner、Xilinx 、GOKE
  • ARM11manufacturers like Fullhan
  • MIPS32manufacturers like loongson、Ingenic
  • RISC-Vmanufacturers like Hifive、Kendryte、Nuclei
  • ARCmanufacturers like SYNOPSYS
  • DSPmanufacturers like TI
  • C-Sky
  • x86

Supported IDE and Compiler

The main IDE/compilers supported by RT-Thread are:

  • RT-Thread Studio IDE
  • MDK KEIL
  • IAR
  • GCC

RT-Thread Studio IDE

User Manual | Tutorial Videos

RT-Thread Studio IDE (a.k.a. RT-Studio) is a one-stop intergrated development environment built by RT-Thread team. It has a easy-to-use graphical configuration system and a wealth of software packages and components resources. RT-Studio has the features of project creation, configuration and management,as well as code editing, SDK management, build configuration, debugging configuration, program download and debug. We're looking to make the use of RT-Studio as intuitive as possible, reducing the duplication of work and improving the development efficiency.

studio

Env Tool

User Manual | Tutorial Videos

In the early stage, RT-Thread team also created an auxiliary tool called Env. It is an auxiliary tool with a TUI (Text-based user interface). Developers can use Env tool to configure and generate the GCC, Keil MDK, and IAR projects.

env

Getting Started

RT-Thread Programming Guide | RT-Thread Studio IDE | Kernel Sample | RT-Thread Beginners Guide

Based on STM32F103 BluePill | Raspberry Pi Pico

Simulator

RT-Thread BSP can be compiled directly and downloaded to the corresponding development board for use. In addition, RT-Thread also provides qemu-vexpress-a9 BSP, which can be used without hardware platform. See the getting started guide below for details. Getting Started of QEMU with Env: Windows | Linux Ubuntu | Mac OS

License

RT-Thread follows the Apache License 2.0 free software license. It's completely open-source, can be used in commercial applications for free, does not require the disclosure of code, and has no potential commercial risk. License information and copyright information can generally be seen at the beginning of the code:

/* Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 * ...
 */

Community

RT-Thread is very grateful for the support from all community developers, and if you have any ideas, suggestions or questions in the process of using RT-Thread, RT-Thread can be reached by the following means, and we are also updating RT-Thread in real time on these channels. At the same time, any questions can be asked in the issue section of RT-Thread repository or RT-Thread forum, and community members will answer them.

Website | Github | Twitter | LinkedIn | Youtube | Facebook | Medium

Contribution

If you are interested in RT-Thread and want to join in the development of RT-Thread and become a code contributor,please refer to the Code Contribution Guide.

Thanks for the following contributors!