@@ -34,10 +34,10 @@ import * as mathjs from 'mathjs';
34
34
import { AbstractProject , VirtualSource } from "./EIDEProject" ;
35
35
import { ResManager } from "./ResManager" ;
36
36
import { File } from "../lib/node-utility/File" ;
37
- import { ProjectConfigData , ProjectConfiguration } from "./EIDETypeDefine" ;
37
+ import { BuilderOptions , ProjectConfigData , ProjectConfiguration } from "./EIDETypeDefine" ;
38
38
import {
39
39
ArmBaseCompileData ,
40
- Memory , ARMStorageLayout , ICompileOptions ,
40
+ Memory , ARMStorageLayout ,
41
41
FloatingHardwareOption , C51BaseCompileData , RiscvCompileData , AnyGccCompileData , MipsCompileData
42
42
} from './EIDEProjectModules' ;
43
43
import { SettingManager } from "./SettingManager" ;
@@ -87,7 +87,7 @@ export interface BuilderParams {
87
87
incDirs : string [ ] ;
88
88
libDirs : string [ ] ;
89
89
defines : string [ ] ;
90
- options : ICompileOptions ;
90
+ options : BuilderOptions ;
91
91
sha ?: { [ options_name : string ] : string } ;
92
92
env ?: { [ name : string ] : any } ;
93
93
}
@@ -378,8 +378,7 @@ export abstract class CodeBuilder {
378
378
379
379
const outDir = File . ToUnixPath ( this . project . getOutputDir ( ) ) ;
380
380
const paramsPath = this . project . ToAbsolutePath ( outDir + File . sep + this . paramsFileName ) ;
381
- const compileOptions : ICompileOptions = this . project . GetConfiguration ( )
382
- . compileConfigModel . getOptions ( this . project . getEideDir ( ) . path , config ) ;
381
+ const compileOptions : BuilderOptions = this . project . GetConfiguration ( ) . compileConfigModel . getOptions ( ) ;
383
382
const memMaxSize = this . getMcuMemorySize ( ) ;
384
383
const oldParamsPath = `${ paramsPath } .old` ;
385
384
const prevParams : BuilderParams | undefined = File . IsFile ( oldParamsPath ) ? JSON . parse ( fs . readFileSync ( oldParamsPath , 'utf8' ) ) : undefined ;
@@ -497,7 +496,7 @@ export abstract class CodeBuilder {
497
496
builderOptions . options . afterBuildTasks = [ command ] . concat ( builderOptions . options . afterBuildTasks ) ;
498
497
} catch ( error ) {
499
498
GlobalEvent . emit ( 'msg' , newMessage ( 'Warning' , `Generating '${ mkfile_path } ' failed !` ) ) ;
500
- GlobalEvent . emit ( 'globalLog' , ExceptionToMessage ( error , 'Error' ) ) ;
499
+ GlobalEvent . log_error ( error ) ;
501
500
}
502
501
}
503
502
@@ -569,7 +568,7 @@ export abstract class CodeBuilder {
569
568
570
569
protected abstract getMcuMemorySize ( ) : MemorySize | undefined ;
571
570
572
- protected abstract preHandleOptions ( options : ICompileOptions ) : void ;
571
+ protected abstract preHandleOptions ( options : BuilderOptions ) : void ;
573
572
574
573
static NewBuilder ( _project : AbstractProject ) : CodeBuilder {
575
574
switch ( _project . GetConfiguration ( ) . config . type ) {
@@ -911,7 +910,7 @@ export class ARMCodeBuilder extends CodeBuilder {
911
910
return undefined ;
912
911
}
913
912
914
- protected preHandleOptions ( options : ICompileOptions ) {
913
+ protected preHandleOptions ( options : BuilderOptions ) {
915
914
916
915
const config = this . project . GetConfiguration < ArmBaseCompileData > ( ) . config ;
917
916
const toolchain = this . project . getToolchain ( ) ;
@@ -1046,7 +1045,7 @@ class RiscvCodeBuilder extends CodeBuilder {
1046
1045
return undefined ;
1047
1046
}
1048
1047
1049
- protected preHandleOptions ( options : ICompileOptions ) {
1048
+ protected preHandleOptions ( options : BuilderOptions ) {
1050
1049
1051
1050
const config = this . project . GetConfiguration < RiscvCompileData > ( ) . config ;
1052
1051
@@ -1072,7 +1071,7 @@ class MipsCodeBuilder extends CodeBuilder {
1072
1071
return undefined ;
1073
1072
}
1074
1073
1075
- protected preHandleOptions ( options : ICompileOptions ) {
1074
+ protected preHandleOptions ( options : BuilderOptions ) {
1076
1075
1077
1076
const config = this . project . GetConfiguration < MipsCompileData > ( ) . config ;
1078
1077
@@ -1098,7 +1097,7 @@ class AnyGccCodeBuilder extends CodeBuilder {
1098
1097
return undefined ;
1099
1098
}
1100
1099
1101
- protected preHandleOptions ( options : ICompileOptions ) {
1100
+ protected preHandleOptions ( options : BuilderOptions ) {
1102
1101
1103
1102
const config = this . project . GetConfiguration < AnyGccCompileData > ( ) . config ;
1104
1103
@@ -1156,7 +1155,7 @@ class C51CodeBuilder extends CodeBuilder {
1156
1155
return undefined ;
1157
1156
}
1158
1157
1159
- protected preHandleOptions ( options : ICompileOptions ) {
1158
+ protected preHandleOptions ( options : BuilderOptions ) {
1160
1159
1161
1160
const config = this . project . GetConfiguration < C51BaseCompileData > ( ) . config ;
1162
1161
const toolchain = this . project . getToolchain ( ) ;
0 commit comments