Skip to content

Commit 9a58a0e

Browse files
committed
v3.23.11 revision
1 parent 6f7aaa7 commit 9a58a0e

12 files changed

Lines changed: 89 additions & 65 deletions

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable version changes will be recorded in this file.
66

77
***
88

9-
### [v3.23.10] revision
9+
### [v3.23.11] revision
1010

1111
**Improve**:
1212
- `GNU Arm Toolchain`: Support new mcpu: `cortex-m52, cortex-m55, cortex-m85`.
@@ -16,6 +16,7 @@ All notable version changes will be recorded in this file.
1616
- `DebugConfig Generator GUI`: Change gui element width. Sort the option result list.
1717
- `AC5/AC6 Assembler`: Support use `<key>=<val>` preprocessor format for AC5/AC6 armasm.
1818
- `Makefile Generator`: Improve makefile generator.
19+
- `Builder Options`: Add more options for `arm-gcc` and `any-gcc` toolchain.
1920

2021
**Fix**:
2122
- `IAR ARM Toolchain`: Miss auto-gen `-I` params for iar assembler.

lang/any.gcc.verify.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@
135135
]
136136
},
137137
"misc-control": {
138-
"markdownDescription": "Global Params",
139-
"description.zh-cn": "编译器全局参数",
138+
"markdownDescription": "Global Options",
139+
"description.zh-cn": "编译器全局选项",
140140
"$ref": "#/definitions/FLAGS",
141141
"default": ""
142142
}
@@ -258,14 +258,14 @@
258258
"type": "boolean"
259259
},
260260
"C_FLAGS": {
261-
"markdownDescription": "C Compiler Params",
262-
"description.zh-cn": "C 编译器参数",
261+
"markdownDescription": "C Compiler Options",
262+
"description.zh-cn": "C 编译器选项",
263263
"$ref": "#/definitions/FLAGS",
264264
"default": ""
265265
},
266266
"CXX_FLAGS": {
267-
"markdownDescription": "C++ Compiler Params",
268-
"description.zh-cn": "C++ 编译器参数",
267+
"markdownDescription": "C++ Compiler Options",
268+
"description.zh-cn": "C++ 编译器选项",
269269
"$ref": "#/definitions/FLAGS",
270270
"default": ""
271271
}
@@ -288,7 +288,7 @@
288288
},
289289
"ASM_FLAGS": {
290290
"markdownDescription": "Assembler Options",
291-
"description.zh-cn": "汇编器参数",
291+
"description.zh-cn": "汇编器选项",
292292
"$ref": "#/definitions/FLAGS",
293293
"default": "-c -x assembler"
294294
}
@@ -369,15 +369,15 @@
369369
"default": ".elf"
370370
},
371371
"LD_FLAGS": {
372-
"readable_name": "Linker Flags",
373-
"readable_name.zh-cn": "链接器参数",
372+
"readable_name": "Linker Options",
373+
"readable_name.zh-cn": "链接器选项",
374374
"markdownDescription": "Use '-Wl[,option]...' pass options to the linker",
375375
"description.zh-cn": "使用 '-Wl[,option]...' 传递链接器选项",
376376
"$ref": "#/definitions/FLAGS",
377377
"default": ""
378378
},
379379
"LIB_FLAGS": {
380-
"readable_name": "Lib Flags",
380+
"readable_name": "Lib Options",
381381
"readable_name.zh-cn": "链接库",
382382
"markdownDescription": "Lib Flags, like: -lxxx",
383383
"description.zh-cn": "链接库,例如:-lxxx",

lang/arm.v6.verify.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
],
310310
"enumDescriptions": [
311311
"arm-asm (arm syntax)",
312-
"arm-auto (auto select)",
312+
"arm-auto (auto detect)",
313313
"arm-clang (gnu syntax)"
314314
]
315315
},

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"homepage": "https://em-ide.com",
3737
"license": "MIT",
3838
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/MIPS/RISC-V",
39-
"version": "3.23.10",
39+
"version": "3.23.11",
4040
"preview": false,
4141
"engines": {
4242
"vscode": "^1.67.0"
@@ -943,8 +943,8 @@
943943
}
944944
},
945945
{
946-
"command": "_cl.eide.project.configToolchain",
947-
"title": "%eide.builder.config%"
946+
"command": "_cl.eide.project.setupToolchain",
947+
"title": "%eide.builder.setup-toochain%"
948948
},
949949
{
950950
"command": "_cl.eide.project.switchUploader",
@@ -1540,7 +1540,7 @@
15401540
"when": "viewItem == COMPILE_CONFIGURATION && view == cl.eide.view.projects"
15411541
},
15421542
{
1543-
"command": "_cl.eide.project.configToolchain",
1543+
"command": "_cl.eide.project.setupToolchain",
15441544
"when": "viewItem == COMPILE_CONFIGURATION && view == cl.eide.view.projects"
15451545
},
15461546
{

package.nls.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"eide.package.comp.uninstall": "Uninstall Component",
8585

8686
"eide.builder.switch": "Select Toolchain",
87-
"eide.builder.config": "Configure Toolchain",
88-
"eide.builder.setup-toolchain-prefix": "Setup Compiler Prefix",
87+
"eide.builder.setup-toochain": "Setup Toolchain",
88+
"eide.builder.setup-toolchain-prefix": "Setup Toolchain Prefix",
8989

9090
"eide.flash.switch": "Select Flasher",
9191
"eide.flash.gen.dbgconf": "Generate Debugger Configuration",

package.nls.zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"eide.package.comp.uninstall": "移除组件",
8585

8686
"eide.builder.switch": "切换编译器",
87-
"eide.builder.config": "编译器配置",
87+
"eide.builder.setup-toochain": "设置编译器",
8888
"eide.builder.setup-toolchain-prefix": "设置编译器前缀",
8989

9090
"eide.flash.switch": "切换烧录器",

src/EIDEProject.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ import { ResInstaller } from './ResInstaller';
6262
import {
6363
view_str$prompt$filesOptionsComment,
6464
view_str$prompt$reloadForOldProject,
65-
view_str$prompt$not_found_compiler, view_str$operation$name_can_not_be_blank,
65+
view_str$prompt$not_found_compiler, view_str$prompt$not_found_gcc_prompt_user_setup,
66+
view_str$operation$name_can_not_be_blank,
6667
view_str$operation$name_can_not_have_invalid_char,
6768
view_str$prompt$project_is_opened_by_another,
6869
WARNING,
@@ -2922,7 +2923,11 @@ $(OUT_DIR):
29222923
}
29232924

29242925
public checkAndNotifyInstallToolchain(): boolean {
2926+
29252927
const toolchain = this.getToolchain();
2928+
const toolchainManager = ToolchainManager.getInstance();
2929+
2930+
// support xpack package.json
29262931
if (isGccFamilyToolchain(toolchain.name) && toolchain.getToolchainPrefix) {
29272932
try {
29282933
if (vscode.workspace.workspaceFile) {
@@ -2950,13 +2955,22 @@ $(OUT_DIR):
29502955
return false
29512956
}
29522957
}
2953-
const toolchainManager = ToolchainManager.getInstance();
2958+
29542959
if (!toolchainManager.isToolchainPathReady(toolchain.name)) {
29552960
const dir = toolchainManager.getToolchainExecutableFolder(toolchain.name);
2956-
const msg = view_str$prompt$not_found_compiler.replace('{}', toolchain.name) + `, [path]: '${dir?.path}'`;
2957-
ResInstaller.instance().setOrInstallTools(toolchain.name, msg, toolchain.settingName);
2961+
let tooldisplayname: string = toolchain.name;
2962+
if (isGccFamilyToolchain(toolchain.name) && toolchain.getToolchainPrefix)
2963+
tooldisplayname = `${toolchain.getToolchainPrefix()}gcc`;
2964+
if (toolchain.name == 'ANY_GCC') {
2965+
const msg = view_str$prompt$not_found_gcc_prompt_user_setup.replace('{}', tooldisplayname);
2966+
vscode.window.showWarningMessage(msg);
2967+
} else {
2968+
const msg = view_str$prompt$not_found_compiler.replace('{}', tooldisplayname) + `, [path]: '${dir?.path}'`;
2969+
ResInstaller.instance().setOrInstallTools(toolchain.name, msg, toolchain.settingName);
2970+
}
29582971
return false;
29592972
}
2973+
29602974
return true;
29612975
}
29622976

src/EIDEProjectExplorer.ts

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7343,42 +7343,36 @@ export class ProjectExplorer implements CustomConfigurationProvider {
73437343
}
73447344
}
73457345

7346-
async onConfigureToolchain(item: ProjTreeItem) {
7346+
async onSetupToolchain(item: ProjTreeItem) {
73477347

73487348
const project = this.dataProvider.GetProjectByIndex(item.val.projectIndex);
73497349
const setting = SettingManager.GetInstance();
73507350

73517351
let toolchainPathSettingName = setting.trimSettingTag(project.getToolchain().settingName);
73527352
let toolchainPath = setting.getConfiguration().get(toolchainPathSettingName) || '';
73537353

7354-
let cfg: SimpleUIConfig = {
7354+
const toolchain = project.getToolchain();
7355+
const isChinese = getLocalLanguageType() == LanguageIndexs.Chinese;
7356+
7357+
const cfg: SimpleUIConfig = {
73557358
ref_id: `<toolchain-config>:${project.getUid()}`,
7356-
title: 'Toolchain Configurations',
7357-
items: {
7358-
'path': {
7359-
type: 'input',
7360-
attrs: {
7361-
singleLine: true,
7362-
},
7363-
name: 'Toolchain Path',
7364-
data: <SimpleUIConfigData_input>{
7365-
placeHolder: 'toolchain dir, like: ${userHome}/.eide/tools/<toolchain_id>',
7366-
value: toolchainPath,
7367-
default: toolchainPath
7368-
}
7369-
}
7370-
}
7359+
title: isChinese
7360+
? `设置工具链 (项目:${project.getProjectName()})`
7361+
: `Setup Toolchain (Project: ${project.getProjectName()})`,
7362+
items: {}
73717363
};
73727364

7373-
let toolchainPrefix = setting.getGccFamilyToolPrefix(project.getToolchain().name);
7374-
if (toolchainPrefix != undefined) {
7365+
if (isGccFamilyToolchain(toolchain.name) && toolchain.getToolchainPrefix) {
7366+
const toolchainPrefix = toolchain.getToolchainPrefix() || '';
73757367
cfg.items['prefix'] = {
73767368
type: 'input',
73777369
attrs: {
73787370
singleLine: true,
73797371
size: 30,
73807372
},
7381-
name: 'Toolchain Prefix',
7373+
name: isChinese
7374+
? '编译器前缀'
7375+
: 'Toolchain Prefix',
73827376
data: <SimpleUIConfigData_input>{
73837377
placeHolder: 'like: arm-none-eabi-',
73847378
value: toolchainPrefix,
@@ -7387,6 +7381,34 @@ export class ProjectExplorer implements CustomConfigurationProvider {
73877381
};
73887382
}
73897383

7384+
// toolchain path
7385+
cfg.items['path'] = {
7386+
type: 'input',
7387+
attrs: {
7388+
singleLine: true,
7389+
},
7390+
name: isChinese ? '编译器根目录位置' : 'Toolchain Path',
7391+
data: <SimpleUIConfigData_input>{
7392+
placeHolder: 'toolchain dir, like: ${userHome}/.eide/tools/<toolchain_id>',
7393+
value: toolchainPath,
7394+
default: toolchainPath
7395+
}
7396+
};
7397+
7398+
if (isGccFamilyToolchain(toolchain.name)) {
7399+
cfg.items['path_note'] = {
7400+
type: 'text',
7401+
attrs: {},
7402+
name: '',
7403+
data: <SimpleUIConfigData_text>{
7404+
subType: 'raw',
7405+
value: isChinese
7406+
? `提示:如果您已经将编译器 bin 目录设置到系统环境变量中,则您无需设置上述路径,重启工作区,插件将自动搜索可用的路径`
7407+
: `Note: If you have already set the compiler bin directory to the system environment variables, you do not need to set the above path. Restart the workspace, and the plugin will automatically search for available paths.`
7408+
},
7409+
};
7410+
}
7411+
73907412
WebPanelManager.instance().showSimpleConfigUI(cfg, async (newCfg) => {
73917413

73927414
// update toolchain path

src/SettingManager.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -821,22 +821,6 @@ export class SettingManager {
821821
}
822822
}
823823

824-
getGccFamilyToolPrefix(id: ToolchainName): string | undefined {
825-
switch (id) {
826-
case 'GCC':
827-
return this.getGCCPrefix();
828-
case 'RISCV_GCC':
829-
return this.getRiscvToolPrefix();
830-
case 'ANY_GCC':
831-
return this.getAnyGccToolPrefix();
832-
case 'MIPS_GCC':
833-
case 'MTI_GCC':
834-
return this.getMipsToolPrefix();
835-
default:
836-
return undefined;
837-
}
838-
}
839-
840824
//------------------------------- C51 ----------------------------------
841825

842826
SetC51IniOrUv4Path(path: string) {

src/StringTable.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,15 @@ export const view_str$prompt$select_file_or_folder = [
549549
][langIndex];
550550

551551
export const view_str$prompt$not_found_compiler = [
552-
`无法找到编译器 '{}' 的安装位置 !`,
552+
`无法找到编译器 '{}' 的位置 !`,
553553
`Not found the compiler '{}' location !`
554554
][langIndex];
555555

556+
export const view_str$prompt$not_found_gcc_prompt_user_setup = [
557+
`无法找到编译器 '{}' 的位置 !\n请确保编译器已安装,并设置到系统环境变量 PATH 中。\n右击 '构建配置' 打开 '设置工具链' 检查编译器前缀是否已设置。`,
558+
`Not found the compiler '{}' location ! \nPlease ensure that the compiler is installed and set to the system 'PATH' environment variable.\nRight-click on 'Builder Configuration' to open 'Setup Toolchain' and check if the compiler prefix has been set.`
559+
][langIndex];
560+
556561
export const view_str$prompt$install_tools_by_online = [
557562
`已找到在线资源包,需要安装它吗?`,
558563
`The online package was found. Do you want to install it ?`

0 commit comments

Comments
 (0)