| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | 21-Aug-2025 | - | ||||
| armclang/ | 21-Aug-2025 | - | ||||
| figures/ | 21-Aug-2025 | - | ||||
| gcc/ | 21-Aug-2025 | - | ||||
| README.md | A D | 21-Aug-2025 | 1.3 KiB | 50 | 34 | |
| README_ZH.md | A D | 21-Aug-2025 | 1.2 KiB | 49 | 34 | |
| SConscript | A D | 21-Aug-2025 | 493 | 19 | 14 | |
| atomic_8.c | A D | 21-Aug-2025 | 4.6 KiB | 168 | 109 | |
| thread_local_impl.cpp | A D | 21-Aug-2025 | 803 | 35 | 20 |
README.md
1# C++ 11 support for RT-Thread 2 3## Features 4 5Here are some features about rt-thread c++11 threading futures. 6 7- Atomic. 8- Conditional variables. 9- Clocks. 10- Future. 11- Mutexes. 12- Threads. 13- TLS. 14 15## How To Use 16 17Note that using C++ 11 in rt-thread requires modifying some of the files in the toolchain. Before modifying the tool, back up the tool chain. 18 191. Enable c++11 support 20 21  22 232. Download toolchain GCC 10.2.1: 24 25 ```shell 26 gcc version 10.2.1 20201103 (release) (GNU Arm Embedded Toolchain 10-2020-q4-major) 27 ``` 28 293. Delete the following files: 30 31 ```shell 32 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/thread 33 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/mutex 34 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/condition_variable 35 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/future 36 rm -f toolchain/arm-none-eabi/include/pthread.h 37 ``` 38 394. Clear the contents of the following files and keep them to prevent compilation failures: 40 41 ```shell 42 toolchain/arm-none-eabi/include/sys/_pthreadtypes.h 43 ``` 44 455. Update `rtconfig.py` file. add compilation parameters: 46 47 ```shell 48 CXXFLAGS = CFLAGS + ' -std=c++11 -fabi-version=0 -MMD -MP -MF' 49 ``` 50
README_ZH.md
1# cpp 11 support for rt-thread 2 3## 特性 4 5下面是 RT-Thread 支持的 C++ 11 线程特性。 6 7- Atomic. 8- Conditional variables. 9- Clocks. 10- Future. 11- Mutexes. 12- Threads. 13- TLS. 14 15## 如何使用 16 17请注意,在 RT-Thread 中使用 C++ 11,需要修改工具链中的部分文件。请在修改之前,备份好工具链。 18 191. 使能 c++11 20  21 222. 下载 GCC 工具链 23 24 ```shell 25 gcc version 10.2.1 20201103 (release) (GNU Arm Embedded Toolchain 10-2020-q4-major) 26 ``` 27 283. 删除下面的文件 29 30 ```shell 31 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/thread 32 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/mutex 33 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/condition_variable 34 rm -f toolchain/arm-none-eabi/include/c++/10.2.1/future 35 rm -f toolchain/arm-none-eabi/include/pthread.h 36 ``` 37 384. 请清除下面文件的内容,保留文件避免编译失败 39 40 ```shell 41 toolchain/arm-none-eabi/include/sys/_pthreadtypes.h 42 ``` 43 445. 更新 `rtconfig.py` 文件,添加 c++ 编译参数: 45 46 ```shell 47 CXXFLAGS = CFLAGS + ' -std=c++11 -fabi-version=0 -MMD -MP -MF' 48 ``` 49