Skip to content

Commit bfd6c6b

Browse files
committed
为 JLink, openocd, pyocd 增加调试模板生成器
1 parent 31cb41d commit bfd6c6b

File tree

7 files changed

+2154
-45
lines changed

7 files changed

+2154
-45
lines changed

package-lock.json

Lines changed: 1690 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
"test": "npm run compile && node ./node_modules/vscode/bin/test"
8181
},
8282
"devDependencies": {
83+
"@babel/core": "^7.24.7",
84+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
85+
"@babel/preset-env": "^7.24.7",
8386
"@types/ftp": "^0.3.31",
8487
"@types/iconv-lite": "0.0.1",
8588
"@types/ini": "^1.3.30",
@@ -90,6 +93,7 @@
9093
"@types/vscode": "1.67.0",
9194
"@types/x2js": "^3.1.0",
9295
"@types/xml2js": "^0.4.11",
96+
"babel-loader": "^8.3.0",
9397
"ts-loader": "^6.2.1",
9498
"tslint": "^5.20.1",
9599
"typescript": "^3.7.3",
@@ -100,6 +104,7 @@
100104
"iconv-lite": "^0.5.0",
101105
"ini": "^2.0.0",
102106
"jsonc": "^2.0.0",
107+
"jsonc-parser": "^3.2.1",
103108
"mathjs": "^11.5.0",
104109
"micromatch": "^4.0.4",
105110
"node-7z": "^3.0.0",
@@ -219,8 +224,8 @@
219224
"EIDE.Cpptools.ForceInclude": {
220225
"type": "array",
221226
"items": {
222-
"type": "string"
223-
},
227+
"type": "string"
228+
},
224229
"scope": "resource",
225230
"markdownDescription": "Force include file path list for c/c++ plug-in intellisence",
226231
"default": []
@@ -294,8 +299,8 @@
294299
"EIDE.Builder.EnvironmentVariables": {
295300
"type": "array",
296301
"items": {
297-
"type": "string"
298-
},
302+
"type": "string"
303+
},
299304
"scope": "resource",
300305
"markdownDescription": "%settings.builder.presetEnvVars%",
301306
"default": [
@@ -902,8 +907,16 @@
902907
}
903908
},
904909
{
905-
"command": "_cl.eide.project.genDebugConfigTemplate",
906-
"title": "%eide.flash.gen.dbgconf%"
910+
"command": "_cl.eide.project.genDebugConfigTemplate.jlink",
911+
"title": "JLink"
912+
},
913+
{
914+
"command": "_cl.eide.project.genDebugConfigTemplate.openocd",
915+
"title": "OpenOCD (stlink,daplink...)"
916+
},
917+
{
918+
"command": "_cl.eide.project.genDebugConfigTemplate.pyocd",
919+
"title": "pyOCD (daplink,stlink...)"
907920
},
908921
{
909922
"command": "_cl.eide.project.fetchShellFlasher",
@@ -1101,6 +1114,10 @@
11011114
{
11021115
"id": "_cl.eide.menu/ui/project/export",
11031116
"label": "%eide.prj.menus.main.export%"
1117+
},
1118+
{
1119+
"id": "_cl.eide.menu/ui/project/gen-debug-cfg",
1120+
"label": "%eide.flash.gen.dbgconf%"
11041121
}
11051122
],
11061123
"menus": {
@@ -1277,6 +1294,11 @@
12771294
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
12781295
"group": "5_group@3"
12791296
},
1297+
{
1298+
"submenu": "_cl.eide.menu/ui/project/gen-debug-cfg",
1299+
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
1300+
"group": "5_group@3"
1301+
},
12801302
{
12811303
"command": "_cl.eide.project.showBuildParams",
12821304
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
@@ -1295,8 +1317,6 @@
12951317
"submenu": "_cl.eide.menu/ui/project/static-check",
12961318
"group": "z_group0@0"
12971319
},
1298-
1299-
13001320
{
13011321
"command": "_cl.eide.project.addSrcDir",
13021322
"group": "inline",
@@ -1332,8 +1352,6 @@
13321352
"when": "viewItem == PROJECT && view == cl.eide.view.projects",
13331353
"group": "z_group0@1"
13341354
},
1335-
1336-
13371355
{
13381356
"command": "_cl.eide.project.sourceRoot.refresh",
13391357
"group": "inline@0",
@@ -1419,8 +1437,6 @@
14191437
"when": "viewItem == OUTPUT_FILE_ITEM || viewItem == FILE_ITEM || viewItem == EXCFILE_ITEM || viewItem == V_FILE_ITEM || viewItem == V_EXCFILE_ITEM && view == cl.eide.view.projects",
14201438
"group": "z_group1@1"
14211439
},
1422-
1423-
14241440
{
14251441
"command": "_cl.eide.project.addPackage",
14261442
"group": "inline",
@@ -1452,8 +1468,6 @@
14521468
"command": "_cl.eide.project.installCmsisDriverInterface",
14531469
"when": "viewItem == PACK && view == cl.eide.view.projects"
14541470
},
1455-
1456-
14571471
{
14581472
"command": "_cl.eide.project.switchToolchain",
14591473
"group": "inline",
@@ -1468,11 +1482,6 @@
14681482
"group": "inline",
14691483
"when": "viewItem == UPLOAD_OPTION || viewItem == UPLOAD_OPTION_Shell && view == cl.eide.view.projects"
14701484
},
1471-
{
1472-
"command": "_cl.eide.project.genDebugConfigTemplate",
1473-
"when": "viewItem == SOLUTION || viewItem == UPLOAD_OPTION || viewItem == UPLOAD_OPTION_Shell && view == cl.eide.view.projects",
1474-
"group": "5_group@3"
1475-
},
14761485
{
14771486
"command": "_cl.eide.project.fetchShellFlasher",
14781487
"group": "inline",
@@ -1576,6 +1585,23 @@
15761585
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
15771586
"group": "z_group1@1"
15781587
}
1588+
],
1589+
"_cl.eide.menu/ui/project/gen-debug-cfg": [
1590+
{
1591+
"command": "_cl.eide.project.genDebugConfigTemplate.jlink",
1592+
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
1593+
"group": "z_group0@0"
1594+
},
1595+
{
1596+
"command": "_cl.eide.project.genDebugConfigTemplate.openocd",
1597+
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
1598+
"group": "z_group0@1"
1599+
},
1600+
{
1601+
"command": "_cl.eide.project.genDebugConfigTemplate.pyocd",
1602+
"when": "viewItem == SOLUTION && view == cl.eide.view.projects",
1603+
"group": "z_group0@2"
1604+
}
15791605
]
15801606
},
15811607
"snippets": [

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"eide.builder.setup-toolchain-prefix": "Setup Compiler Prefix",
8686

8787
"eide.flash.switch": "Select Flasher",
88-
"eide.flash.gen.dbgconf": "Generate Cortex-Debug Configuration",
88+
"eide.flash.gen.dbgconf": "Generate Debugger Configuration",
8989
"eide.flash.fetch-shell-flasher": "Install Shell Flasher Script From Remote Repository",
9090

9191
"eide.deps.include.show": "Display All Include Paths",

package.nls.zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"eide.builder.setup-toolchain-prefix": "设置编译器前缀",
8686

8787
"eide.flash.switch": "切换烧录器",
88-
"eide.flash.gen.dbgconf": "生成 Cortex-Debug 配置模板",
88+
"eide.flash.gen.dbgconf": "生成调试器配置模板",
8989
"eide.flash.fetch-shell-flasher": "从云端安装 Shell 烧录脚本",
9090

9191
"eide.deps.include.show": "显示所有包含路径",

0 commit comments

Comments
 (0)