Skip to content

Commit 8701e14

Browse files
committed
2 parents 6802bcd + 1753a14 commit 8701e14

38 files changed

+3021
-630
lines changed

CLAUDE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ npm run build # Production build
6464

6565
4. **虚拟环境** (`src/venv.ts`):
6666
- Windows 特定的 Python 虚拟环境设置
67-
- 管理 env 脚本安装
6867

6968
### 配置文件
7069
- **`.vscode/workspace.json`**: 多 BSP 工作区配置
7170
- **`.vscode/project.json`**: 单个项目文件结构(由 scons 生成)
7271
- **`~/.env/cfg.json`**: RT-Thread 源码路径配置
7372
- **`~/.env/tools/scripts/sdk_cfg.json`**: 工具链配置
73+
- **`~/.env/tools/scripts/.config`**: SDK的配置情况,指示出来哪些SDK包安装了
7474

7575
### 构建系统
7676
- TypeScript 编译为 CommonJS 用于 VS Code 扩展
@@ -84,8 +84,10 @@ npm run build # Production build
8484

8585
## 重要说明
8686

87-
1. 扩展仅在 RT-Thread 项目中激活(包含 `rtconfig.h` 或工作区配置)
88-
2. Windows 系统在首次运行时需要设置 Python 虚拟环境
89-
3. 必须先构建 Vue 前端再编译扩展
90-
4. 扩展集成了 Python 扩展(`ms-python.python`
91-
5. 文件装饰器在工作区模式下标记当前活动的 BSP
87+
1. Windows 系统在首次运行时需要设置 Python 虚拟环境
88+
2. 必须先构建 Vue 前端再编译扩展
89+
3. 扩展集成了 Python 扩展(`ms-python.python`
90+
4. 文件装饰器在工作区模式下标记当前活动的 BSP
91+
5. 代码尽可能精简,尽可能做到复用。
92+
6. @src/vue 放置的是vscode扩展的前端页面,都是使用vue + element plus的方式实现,同时样式风格也完全使用常规意义的element plus样式风格。并且 @src/vue 的代码也完全重用根目录下的 node_modules 而不新开 node_modules。
93+
7. @src/webviews 放置的是和vscode扩展前端页面对应的vscode扩展后端。

src/cmds/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export let cmds: Object = {
3535
],
3636
name: 'Build',
3737
iconId: 'github-action',
38-
label: 'build',
38+
label: 'Build',
3939
isExpanded: true
4040
},
4141
Settings : {
@@ -84,7 +84,7 @@ export let cmds: Object = {
8484
],
8585
name: 'Settings',
8686
iconId: 'gear',
87-
label: 'settings',
87+
label: 'Settings',
8888
isExpanded: true
8989
},
9090
Packages : {
@@ -112,7 +112,7 @@ export let cmds: Object = {
112112
],
113113
name: 'Packages',
114114
iconId: 'extensions',
115-
label: 'packages',
115+
label: 'Packages',
116116
isExpanded: false
117117
}
118118
};

src/dock.ts

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ class CmdTreeDataProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
2020

2121
if (isRTThreadProject() !== true && isRTThreadWorksapce() !== true) {
2222
// only show Create Project and RT-Thread Setting command when not in RT-Thread project
23-
let createProject = new vscode.TreeItem("create project", vscode.TreeItemCollapsibleState.None);
23+
let createProject = new vscode.TreeItem("Create Project", vscode.TreeItemCollapsibleState.None);
2424
createProject.iconPath = new vscode.ThemeIcon("new-folder");
25-
createProject.label = "create project";
25+
createProject.label = "Create Project";
2626
createProject.command = {
2727
command: "extension.showCreateProject",
2828
title: "show create project page",
2929
arguments: [],
3030
};
3131

32-
let rtSetting = new vscode.TreeItem("rt-thread setting", vscode.TreeItemCollapsibleState.None);
32+
let rtSetting = new vscode.TreeItem("RT-Thread Setting", vscode.TreeItemCollapsibleState.None);
3333
rtSetting.iconPath = new vscode.ThemeIcon("settings-gear");
34-
rtSetting.label = "rt-thread setting";
34+
rtSetting.label = "RT-Thread Setting";
3535
rtSetting.command = {
3636
command: "extension.showSetting",
3737
title: "show rt-thread setting page",
@@ -47,35 +47,26 @@ class CmdTreeDataProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
4747
arguments: [],
4848
};
4949

50-
let analyze = new vscode.TreeItem("Analyze", vscode.TreeItemCollapsibleState.None);
51-
analyze.iconPath = new vscode.ThemeIcon("search-fuzzy");
52-
analyze.label = "Analyze";
53-
analyze.command = {
54-
command: "extension.showAnalyze",
55-
title: "show Analyze page",
56-
arguments: [],
57-
};
58-
59-
return [analyze, createProject, rtSetting, about, ];
50+
return [createProject, rtSetting, about];
6051
}
6152

6253
if (!element) {
6354
let children = [];
6455

6556
// 添加创建工程项
66-
let createProject = new vscode.TreeItem("create project", vscode.TreeItemCollapsibleState.None);
57+
let createProject = new vscode.TreeItem("Create Project", vscode.TreeItemCollapsibleState.None);
6758
createProject.iconPath = new vscode.ThemeIcon("new-folder");
68-
createProject.label = "create project";
59+
createProject.label = "Create Project";
6960
createProject.command = {
7061
command: "extension.showCreateProject",
7162
title: "show create project page",
7263
arguments: [],
7364
};
7465
children.push(createProject);
7566

76-
let rtSetting = new vscode.TreeItem("rt-thread setting", vscode.TreeItemCollapsibleState.None);
67+
let rtSetting = new vscode.TreeItem("RT-Thread Setting", vscode.TreeItemCollapsibleState.None);
7768
rtSetting.iconPath = new vscode.ThemeIcon("settings-gear");
78-
rtSetting.label = "rt-thread setting";
69+
rtSetting.label = "RT-Thread Setting";
7970
rtSetting.command = {
8071
command: "extension.showSetting",
8172
title: "show rt-thread setting page",
@@ -91,6 +82,16 @@ class CmdTreeDataProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
9182
children.push(item);
9283
};
9384

85+
let analyze = new vscode.TreeItem("Symbolic Analysis", vscode.TreeItemCollapsibleState.None);
86+
analyze.iconPath = new vscode.ThemeIcon("search-fuzzy");
87+
analyze.label = "Symbolic Analysis";
88+
analyze.command = {
89+
command: "extension.showAnalyze",
90+
title: "show symbolic analysis page",
91+
arguments: [],
92+
};
93+
children.push(analyze);
94+
9495
let about = new vscode.TreeItem("About", vscode.TreeItemCollapsibleState.None);
9596
about.iconPath = new vscode.ThemeIcon("info");
9697
about.label = "About";
@@ -101,15 +102,6 @@ class CmdTreeDataProvider implements vscode.TreeDataProvider<vscode.TreeItem> {
101102
};
102103
children.push(about);
103104

104-
let analyze = new vscode.TreeItem("Analyze", vscode.TreeItemCollapsibleState.None);
105-
analyze.iconPath = new vscode.ThemeIcon("info");
106-
analyze.label = "Analyze";
107-
analyze.command = {
108-
command: "extension.showAnalyze",
109-
title: "show analyze page",
110-
arguments: [],
111-
};
112-
children.push(analyze);
113105

114106
return children;
115107
} else {

src/utils/elf/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- 这是一个elf符号处理的库,使用typescript方式编写,分析rtthread.elf,rtthread.map文件,并返回相关符号信息。

0 commit comments

Comments
 (0)