Skip to content

Commit 5ceb1e5

Browse files
authored
Merge pull request #84 from github0null/dev
v2.16.1 revision
2 parents 57e2aaa + 13ee567 commit 5ceb1e5

File tree

4 files changed

+37
-26
lines changed

4 files changed

+37
-26
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
***
66

7+
### [v2.16.1] (revision)
8+
9+
**Bug Fixes**:
10+
- Some plug-in settings `TAG` missing.
11+
12+
***
13+
714
### [v2.16.0]
815

916
**New Features**:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"homepage": "https://github.com/github0null/eide/blob/master/README.md",
2828
"license": "MIT",
2929
"description": "An embedded development environment for 8051/STM8/Cortex-M/RISC-V",
30-
"version": "2.16.0",
30+
"version": "2.16.1",
3131
"engines": {
3232
"vscode": "^1.60.0"
3333
},
@@ -456,13 +456,13 @@
456456
"markdownDescription": "%settings.riscv.gcc.prefix%",
457457
"default": "riscv-none-embed-"
458458
},
459-
"Toolchain.AnyGcc.InstallDirectory": {
459+
"EIDE.Toolchain.AnyGcc.InstallDirectory": {
460460
"type": "string",
461461
"scope": "resource",
462462
"markdownDescription": "Any gcc toolchain install directory",
463463
"default": ""
464464
},
465-
"Toolchain.AnyGcc.ToolPrefix": {
465+
"EIDE.Toolchain.AnyGcc.ToolPrefix": {
466466
"type": "string",
467467
"scope": "resource",
468468
"markdownDescription": "Any gcc **toolchain prefix**",

src/ToolchainManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,15 +1937,15 @@ class AnyGcc implements IToolchian {
19371937
global: {
19381938
},
19391939
'c/cpp-compiler': {
1940-
"C_FLAGS": "-c -x c",
1941-
"CXX_FLAGS": "-c -x c++"
1940+
"C_FLAGS": "-c -x c -ffunction-sections -fdata-sections",
1941+
"CXX_FLAGS": "-c -x c++ -ffunction-sections -fdata-sections"
19421942
},
19431943
'asm-compiler': {
19441944
"ASM_FLAGS": "-c -x assembler"
19451945
},
19461946
linker: {
19471947
"output-format": "elf",
1948-
"LD_FLAGS": "-Wl,--print-memory-usage",
1948+
"LD_FLAGS": "-Wl,--gc-sections -Wl,--print-memory-usage",
19491949
"LIB_FLAGS": ""
19501950
}
19511951
};

src/extension.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ async function onSelectSerialBaudrate() {
262262
}
263263
}
264264

265+
function checkBinFolder(binFolder: File): boolean {
266+
return binFolder.IsDir() &&
267+
File.fromArray([binFolder.path, File.ToLocalPath('lib/mono/4.5/mscorlib.dll')]).IsFile();
268+
}
269+
265270
async function checkAndInstallBinaries(constex: vscode.ExtensionContext, forceInstall?: boolean): Promise<boolean> {
266271

267272
const eideCfg = ResManager.GetInstance().getAppConfig<any>();
@@ -277,30 +282,29 @@ async function checkAndInstallBinaries(constex: vscode.ExtensionContext, forceIn
277282
}
278283

279284
// if 'bin' dir is existed, we exit, if not, we need install eide-binaries
280-
else if (binFolder.IsDir() &&
281-
File.fromArray([binFolder.path, File.ToLocalPath('lib/mono/4.5/mscorlib.dll')]).IsFile()) {
285+
else if (checkBinFolder(binFolder)) {
282286
// if user enabled auto-update, we try get new version from
283287
// github, and install it at background after 1 min delay
284288
//if (SettingManager.GetInstance().isEnableAutoUpdateEideBinaries()) {
285-
setTimeout(async () => {
286-
// get local binary version from disk
287-
const verFile = File.fromArray([binFolder.path, 'VERSION']);
288-
if (verFile.IsFile()) {
289-
const cont = verFile.Read().trim();
290-
if (utility.isVersionString(cont)) {
291-
localVersion = cont;
292-
}
289+
setTimeout(async () => {
290+
// get local binary version from disk
291+
const verFile = File.fromArray([binFolder.path, 'VERSION']);
292+
if (verFile.IsFile()) {
293+
const cont = verFile.Read().trim();
294+
if (utility.isVersionString(cont)) {
295+
localVersion = cont;
293296
}
294-
// try update
295-
const done = await tryUpdateBinaries(binFolder, localVersion);
296-
if (!done) {
297-
const msg = `Update eide-binaries failed, please restart vscode !`;
298-
const sel = await vscode.window.showErrorMessage(msg, 'Restart', 'Cancel');
299-
if (sel == 'Restart') {
300-
vscode.commands.executeCommand('workbench.action.reloadWindow');
301-
}
297+
}
298+
// try update
299+
const done = await tryUpdateBinaries(binFolder, localVersion);
300+
if (!done) {
301+
const msg = `Update eide-binaries failed, please restart vscode !`;
302+
const sel = await vscode.window.showErrorMessage(msg, 'Restart', 'Cancel');
303+
if (sel == 'Restart') {
304+
vscode.commands.executeCommand('workbench.action.reloadWindow');
302305
}
303-
}, 5 * 1000);
306+
}
307+
}, 5 * 1000);
304308
//}
305309
return true;
306310
}
@@ -341,7 +345,7 @@ async function tryUpdateBinaries(binFolder: File, localVer: string, notConfirm?:
341345
}
342346

343347
// check bin folder
344-
if (binFolder.IsDir()) {
348+
if (checkBinFolder(binFolder)) {
345349

346350
// not need update, exit now
347351
if (binVersion == localVer) {

0 commit comments

Comments
 (0)