mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-23 22:10:39 +08:00
[Tools] Update images
This commit is contained in:
@@ -69,33 +69,7 @@ pkgs --list # 列出已安装包
|
|||||||
|
|
||||||
## 构建系统架构图
|
## 构建系统架构图
|
||||||
|
|
||||||
```
|

|
||||||
┌─────────────────────────────────────┐
|
|
||||||
│ 用户命令 (scons) │
|
|
||||||
└──────────────┬──────────────────────┘
|
|
||||||
│
|
|
||||||
┌──────────────▼──────────────────────┐
|
|
||||||
│ SConstruct (主脚本) │
|
|
||||||
│ ┌─────────────────────┐ │
|
|
||||||
│ │ PrepareBuilding() │ │
|
|
||||||
│ │ 环境初始化 │ │
|
|
||||||
│ └──────────┬──────────┘ │
|
|
||||||
└────────────────┼───────────────────┘
|
|
||||||
│
|
|
||||||
┌────────────────▼────────────────────┐
|
|
||||||
│ building.py │
|
|
||||||
│ ┌──────────┬──────────┐ │
|
|
||||||
│ │ 组件收集 │ 依赖处理 │ │
|
|
||||||
│ └──────────┴──────────┘ │
|
|
||||||
└─────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
┌────────┴────────┐
|
|
||||||
│ │
|
|
||||||
┌───────▼──────┐ ┌────────▼────────┐
|
|
||||||
│ SConscript │ │ rtconfig.h │
|
|
||||||
│ 组件脚本 │ │ 功能配置 │
|
|
||||||
└──────────────┘ └─────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
## 主要特性
|
## 主要特性
|
||||||
|
|
||||||
|
|||||||
BIN
tools/docs/guide_arch.drawio.png
Normal file
BIN
tools/docs/guide_arch.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
BIN
tools/docs/process.drawio.png
Normal file
BIN
tools/docs/process.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
tools/docs/readme_arch.drawio.png
Normal file
BIN
tools/docs/readme_arch.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
tools/docs/tech_arch.drawio.png
Normal file
BIN
tools/docs/tech_arch.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -23,32 +23,7 @@ RT-Thread使用基于SCons的构建系统,提供了统一的跨平台构建体
|
|||||||
|
|
||||||
### 系统架构图
|
### 系统架构图
|
||||||
|
|
||||||
```
|

|
||||||
┌─────────────────────────────────────────────────────────────┐
|
|
||||||
│ 用户命令 │
|
|
||||||
│ (scons, scons --target=xxx) │
|
|
||||||
└─────────────────────┬───────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
┌─────────────────────▼───────────────────────────────────────┐
|
|
||||||
│ SConstruct │
|
|
||||||
│ (BSP根目录构建脚本) │
|
|
||||||
└─────────────────────┬───────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
┌─────────────────────▼───────────────────────────────────────┐
|
|
||||||
│ building.py │
|
|
||||||
│ (核心构建引擎和函数库) │
|
|
||||||
├─────────────────────┬───────────────────────────────────────┤
|
|
||||||
│ PrepareBuilding() │ DefineGroup() │ DoBuilding() │
|
|
||||||
│ 环境初始化 │ 组件定义 │ 执行构建 │
|
|
||||||
└─────────────────────┴─────────┬─────────────────────────────┘
|
|
||||||
│
|
|
||||||
┌───────────────────────┼───────────────────────┐
|
|
||||||
│ │ │
|
|
||||||
┌───────▼────────┐ ┌────────▼────────┐ ┌────────▼────────┐
|
|
||||||
│ SConscript │ │ rtconfig.py │ │ rtconfig.h │
|
|
||||||
│ (组件脚本) │ │ (工具链配置) │ │ (功能配置) │
|
|
||||||
└────────────────┘ └─────────────────┘ └─────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
|
|||||||
@@ -15,40 +15,7 @@
|
|||||||
|
|
||||||
### 整体架构图
|
### 整体架构图
|
||||||
|
|
||||||
```
|

|
||||||
┌────────────────────────────────────────────────────────────────────┐
|
|
||||||
│ 用户接口层 │
|
|
||||||
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────┐│
|
|
||||||
│ │ 命令行接口 │ │ menuconfig │ │ 环境变量 │ │ 配置文件 ││
|
|
||||||
│ │ (scons) │ │ (Kconfig) │ │ (RTT_xxx) │ │ (.config)││
|
|
||||||
│ └──────┬──────┘ └──────┬───────┘ └──────┬──────┘ └─────┬────┘│
|
|
||||||
└─────────┼─────────────────┼──────────────────┼───────────────┼─────┘
|
|
||||||
│ │ │ │
|
|
||||||
┌─────────▼─────────────────▼──────────────────▼───────────────▼─────┐
|
|
||||||
│ 构建引擎层 │
|
|
||||||
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
||||||
│ │ building.py │ │
|
|
||||||
│ ├─────────────┬───────────────┬─────────────┬────────────────┤ │
|
|
||||||
│ │ 环境准备 │ 组件收集 │ 依赖处理 │ 构建执行 │ │
|
|
||||||
│ │ Prepare │ DefineGroup │ GetDepend │ DoBuilding │ │
|
|
||||||
│ └─────────────┴───────────────┴─────────────┴────────────────┘ │
|
|
||||||
└────────────────────────────────────────────────────────────────────┘
|
|
||||||
│ │ │ │
|
|
||||||
┌─────────▼─────────────────▼──────────────────▼───────────────▼─────┐
|
|
||||||
│ 工具支撑层 │
|
|
||||||
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ ┌──────┐│
|
|
||||||
│ │ utils.py │ │options.py│ │package.py│ │mkdist.py│ │预处理││
|
|
||||||
│ │ 工具函数 │ │命令选项 │ │包管理 │ │分发打包 │ │器 ││
|
|
||||||
│ └──────────┘ └──────────┘ └──────────┘ └─────────┘ └──────┘│
|
|
||||||
└────────────────────────────────────────────────────────────────────┘
|
|
||||||
│ │ │ │
|
|
||||||
┌─────────▼─────────────────▼──────────────────▼───────────────▼─────┐
|
|
||||||
│ 目标生成器层 │
|
|
||||||
│ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────────┐ │
|
|
||||||
│ │keil.py │ │iar.py │ │gcc.py │ │vsc.py │ │cmake.py等 │ │
|
|
||||||
│ └────────┘ └────────┘ └────────┘ └────────┘ └────────────┘ │
|
|
||||||
└────────────────────────────────────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
### 设计原则
|
### 设计原则
|
||||||
|
|
||||||
@@ -598,45 +565,7 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
|
|||||||
|
|
||||||
### 完整构建流程图
|
### 完整构建流程图
|
||||||
|
|
||||||
```
|

|
||||||
┌──────────────┐
|
|
||||||
│ 用户输入 │
|
|
||||||
│ scons │
|
|
||||||
└──────┬───────┘
|
|
||||||
│
|
|
||||||
┌──────▼───────┐
|
|
||||||
│ SConstruct │ ← 读取rtconfig.py
|
|
||||||
│ 主脚本 │ ← 调用PrepareBuilding
|
|
||||||
└──────┬───────┘
|
|
||||||
│
|
|
||||||
┌──────▼───────┐
|
|
||||||
│ 环境初始化 │
|
|
||||||
│ ·设置路径 │
|
|
||||||
│ ·检测工具链 │
|
|
||||||
│ ·解析配置 │
|
|
||||||
└──────┬───────┘
|
|
||||||
│
|
|
||||||
┌──────▼───────┐
|
|
||||||
│ 递归处理 │
|
|
||||||
│ SConscript │ ← 调用DefineGroup
|
|
||||||
│ ·收集源文件 │ ← 检查依赖GetDepend
|
|
||||||
│ ·设置参数 │
|
|
||||||
└──────┬───────┘
|
|
||||||
│
|
|
||||||
┌──────▼───────┐
|
|
||||||
│ 构建执行 │
|
|
||||||
│ DoBuilding │
|
|
||||||
│ ·合并对象 │
|
|
||||||
│ ·链接程序 │
|
|
||||||
└──────┬───────┘
|
|
||||||
│
|
|
||||||
┌──────▼───────┐
|
|
||||||
│ 后处理 │
|
|
||||||
│ ·生成bin文件 │
|
|
||||||
│ ·显示大小 │
|
|
||||||
│ ·自定义动作 │
|
|
||||||
└──────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
### 依赖解析流程
|
### 依赖解析流程
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user