Skip to content

Commit c3dac5f

Browse files
committed
v3.6.0 update
1 parent 1c9e0ae commit c3dac5f

10 files changed

Lines changed: 275 additions & 108 deletions

CHANGELOG.md

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

55
***
66

7+
### [v3.6.0]
8+
9+
**Fixed**:
10+
- When there are too many nested folders, the response is slow when excluding directories.
11+
12+
**Changed**:
13+
- Merge unify_builder's commandline args to a single params file.
14+
15+
**Optimized**:
16+
- Support pass source extra compiler args to cpptools.
17+
18+
***
19+
720
### [v3.5.4]
821

922
**Fixed**:

lib/node-utility

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"homepage": "https://github.com/github0null/eide/blob/master/README.md",
3333
"license": "MIT",
3434
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/RISC-V",
35-
"version": "3.5.4",
35+
"version": "3.6.0",
3636
"preview": false,
3737
"engines": {
3838
"vscode": "^1.63.0"

res/data/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
version: '1.0'
44

5-
binaray_version: '5.1.0'
5+
binary_min_version: '6.0.0'

src/CodeBuilder.ts

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export interface BuilderParams {
6262
name: string;
6363
target: string;
6464
toolchain: ToolchainName;
65+
toolchainCfgFile: string;
66+
toolchainLocation: string;
67+
buildMode: string;
6568
showRepathOnLog?: boolean,
6669
threadNum?: number;
6770
dumpPath: string;
@@ -134,7 +137,7 @@ export abstract class CodeBuilder {
134137

135138
// append user options for files
136139
try {
137-
const options = this.project.getFilesOptions();
140+
const options = this.project.getSourceExtraArgsCfg();
138141

139142
// parser
140143
const matcher = (parttenInfo: any, fieldName: string) => {
@@ -145,11 +148,13 @@ export abstract class CodeBuilder {
145148
.replace(/\.\.\//g, '')
146149
.replace(/\.\//g, ''); // globmatch bug ? it can't parse path which have '.' or '..'
147150
if (globmatch.isMatch(searchPath, expr)) {
148-
const val = parttenInfo[expr]?.trim().replace(/(?:\r\n|\n)$/, '')
149-
if (srcParams[srcInf.path]) {
150-
srcParams[srcInf.path] += ` ${val || ''}`
151-
} else {
152-
srcParams[srcInf.path] = val || '';
151+
const val = parttenInfo[expr]?.trim().replace(/(?:\r\n|\n)$/, '');
152+
if (val) {
153+
if (srcParams[srcInf.path]) {
154+
srcParams[srcInf.path] += ` ${val}`
155+
} else {
156+
srcParams[srcInf.path] = val;
157+
}
153158
}
154159
}
155160
}
@@ -191,7 +196,7 @@ export abstract class CodeBuilder {
191196
let mTimeMs: number | undefined;
192197

193198
try {
194-
mTimeMs = fs.statSync(this.project.getFilesOptionsFile().path).mtimeMs
199+
mTimeMs = fs.statSync(this.project.getSourceExtraArgsCfgFile().path).mtimeMs
195200
} catch (error) {
196201
// do nothing
197202
}
@@ -364,22 +369,38 @@ export abstract class CodeBuilder {
364369
const settingManager = SettingManager.GetInstance();
365370
const toolchain = this.project.getToolchain();
366371

367-
const binDir = toolchain.getToolchainDir().path;
368372
const dumpDir = this.project.getLogDir().path;
369373
const outDir = File.ToUnixPath(this.project.getOutputDir());
370374
const paramsPath = this.project.ToAbsolutePath(outDir + File.sep + this.paramsFileName);
371375
const compileOptions: ICompileOptions = this.project.GetConfiguration()
372376
.compileConfigModel.getOptions(this.project.getEideDir().path, config);
373377
const memMaxSize = this.getMaxSize();
374-
const modeList: string[] = [];
375378
const oldParamsPath = `${paramsPath}.old`;
376379
const prevParams: BuilderParams | undefined = File.IsFile(oldParamsPath) ? JSON.parse(fs.readFileSync(oldParamsPath, 'utf8')) : undefined;
377380
const sourceInfo = this.genSourceInfo(prevParams);
378381

382+
// set build mode
383+
const builderModeList: string[] = [];
384+
385+
if (config.toolchain === 'Keil_C51') {
386+
// disable increment compile for Keil C51
387+
builderModeList.push('Normal');
388+
} else {
389+
builderModeList.push(this.isRebuild() ? 'Normal' : 'Fast');
390+
if (settingManager.isUseMultithreadMode()) { builderModeList.push('MULTHREAD'); }
391+
}
392+
393+
if (this.useShowParamsMode) {
394+
builderModeList.push('Debug');
395+
}
396+
379397
const builderOptions: BuilderParams = {
380398
name: config.name,
381399
target: this.project.getCurrentTarget(),
382400
toolchain: toolchain.name,
401+
toolchainLocation: toolchain.getToolchainDir().path,
402+
toolchainCfgFile: toolchain.modelName,
403+
buildMode: builderModeList.map(str => str.toLowerCase()).join('|'),
383404
showRepathOnLog: settingManager.isPrintRelativePathWhenBuild(),
384405
threadNum: settingManager.getThreadNumber(),
385406
rootDir: this.project.GetRootDir().path,
@@ -448,23 +469,6 @@ export abstract class CodeBuilder {
448469
}
449470
}
450471

451-
// set build mode
452-
if (config.toolchain === 'Keil_C51') {
453-
// disable fast compile for Keil C51
454-
modeList.push('Normal');
455-
} else {
456-
modeList.push(this.isRebuild() ? 'Normal' : 'Fast');
457-
}
458-
459-
if (this.useShowParamsMode) {
460-
modeList.push('Debug');
461-
}
462-
463-
// disable multi-thread in Keil_C51
464-
if (settingManager.isUseMultithreadMode() && config.toolchain !== 'Keil_C51') {
465-
modeList.push('MULTHREAD');
466-
}
467-
468472
// write project build params
469473
fs.writeFileSync(paramsPath, JSON.stringify(builderOptions, undefined, 4));
470474

@@ -479,10 +483,7 @@ export abstract class CodeBuilder {
479483
}
480484

481485
let cmds = [
482-
'-b', binDir,
483-
'-M', toolchain.modelName,
484486
'-p', paramsPath,
485-
'-m', modeList.join('-')
486487
];
487488

488489
const extraCmd = settingManager.getBuilderAdditionalCommandLine()?.trim();

0 commit comments

Comments
 (0)