[Tools] Update images

This commit is contained in:
bernard
2025-08-01 22:46:14 +08:00
committed by R b b666
parent a65efe648c
commit 5c568f0280
7 changed files with 4 additions and 126 deletions

View File

@@ -69,33 +69,7 @@ pkgs --list # 列出已安装包
## 构建系统架构图
```
┌─────────────────────────────────────┐
│ 用户命令 (scons) │
└──────────────┬──────────────────────┘
┌──────────────▼──────────────────────┐
│ SConstruct (主脚本) │
│ ┌─────────────────────┐ │
│ │ PrepareBuilding() │ │
│ │ 环境初始化 │ │
│ └──────────┬──────────┘ │
└────────────────┼───────────────────┘
┌────────────────▼────────────────────┐
│ building.py │
│ ┌──────────┬──────────┐ │
│ │ 组件收集 │ 依赖处理 │ │
│ └──────────┴──────────┘ │
└─────────────────────────────────────┘
┌────────┴────────┐
│ │
┌───────▼──────┐ ┌────────▼────────┐
│ SConscript │ │ rtconfig.h │
│ 组件脚本 │ │ 功能配置 │
└──────────────┘ └─────────────────┘
```
![arch](./readme_arch.drawio.png)
## 主要特性

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -23,32 +23,7 @@ RT-Thread使用基于SCons的构建系统提供了统一的跨平台构建体
### 系统架构图
```
┌─────────────────────────────────────────────────────────────┐
│ 用户命令 │
│ (scons, scons --target=xxx) │
└─────────────────────┬───────────────────────────────────────┘
┌─────────────────────▼───────────────────────────────────────┐
│ SConstruct │
│ (BSP根目录构建脚本) │
└─────────────────────┬───────────────────────────────────────┘
┌─────────────────────▼───────────────────────────────────────┐
│ building.py │
│ (核心构建引擎和函数库) │
├─────────────────────┬───────────────────────────────────────┤
│ PrepareBuilding() │ DefineGroup() │ DoBuilding() │
│ 环境初始化 │ 组件定义 │ 执行构建 │
└─────────────────────┴─────────┬─────────────────────────────┘
┌───────────────────────┼───────────────────────┐
│ │ │
┌───────▼────────┐ ┌────────▼────────┐ ┌────────▼────────┐
│ SConscript │ │ rtconfig.py │ │ rtconfig.h │
│ (组件脚本) │ │ (工具链配置) │ │ (功能配置) │
└────────────────┘ └─────────────────┘ └─────────────────┘
```
![arch](./guide_arch.drawio.png)
## 快速开始

View File

@@ -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等 │ │
│ └────────┘ └────────┘ └────────┘ └────────┘ └────────────┘ │
└────────────────────────────────────────────────────────────────────┘
```
![arch](./tech_arch.drawio.png)
### 设计原则
@@ -598,45 +565,7 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
### 完整构建流程图
```
┌──────────────┐
│ 用户输入 │
│ scons │
└──────┬───────┘
┌──────▼───────┐
│ SConstruct │ ← 读取rtconfig.py
│ 主脚本 │ ← 调用PrepareBuilding
└──────┬───────┘
┌──────▼───────┐
│ 环境初始化 │
│ ·设置路径 │
│ ·检测工具链 │
│ ·解析配置 │
└──────┬───────┘
┌──────▼───────┐
│ 递归处理 │
│ SConscript │ ← 调用DefineGroup
│ ·收集源文件 │ ← 检查依赖GetDepend
│ ·设置参数 │
└──────┬───────┘
┌──────▼───────┐
│ 构建执行 │
│ DoBuilding │
│ ·合并对象 │
│ ·链接程序 │
└──────┬───────┘
┌──────▼───────┐
│ 后处理 │
│ ·生成bin文件 │
│ ·显示大小 │
│ ·自定义动作 │
└──────────────┘
```
![process](./process.drawio.png)
### 依赖解析流程