Skip to content

Commit f420c7d

Browse files
authored
Merge pull request #200 from github0null/dev
v3.10.8 update
2 parents c03a13d + cef6711 commit f420c7d

16 files changed

Lines changed: 744 additions & 65 deletions

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ All notable version changes will be recorded in this file.
66

77
***
88

9+
### [v3.10.8] update
10+
11+
**New**:
12+
- `Project Resource`: Add `Symbol Table` virtual file in `Output Files`, click it to show `elf symbols` (support 'armcc', 'gcc', 'iar').
13+
- `Builder Options` : Add `X/O Base`, `R/O Base`, `R/W Base` options for armcc, and allow import them from keil project.
14+
15+
**Optimize**:
16+
- `launch.json Generator`: Don't force override 'svdPath' in launch.json config.
17+
- `Project Resource`: Show promt when remove a filesystem source dir.
18+
19+
***
20+
921
### [v3.10.7] revision
1022

1123
**Fix**:

lang/arm.v5.verify.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,24 @@
432432
false
433433
]
434434
},
435+
"xo-base": {
436+
"markdownDescription": "X/O Base",
437+
"description.zh-cn": "X/O Base",
438+
"size": "small",
439+
"type": "string"
440+
},
441+
"ro-base": {
442+
"markdownDescription": "R/O Base",
443+
"description.zh-cn": "R/O Base",
444+
"size": "small",
445+
"type": "string"
446+
},
447+
"rw-base": {
448+
"markdownDescription": "R/W Base",
449+
"description.zh-cn": "R/W Base",
450+
"size": "small",
451+
"type": "string"
452+
},
435453
"misc-controls": {
436454
"markdownDescription": "Other Linker Options",
437455
"description.zh-cn": "链接器附加选项",
@@ -448,4 +466,4 @@
448466
}
449467
}
450468
}
451-
}
469+
}

lang/arm.v6.verify.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,24 @@
370370
false
371371
]
372372
},
373+
"xo-base": {
374+
"markdownDescription": "X/O Base",
375+
"description.zh-cn": "X/O Base",
376+
"size": "small",
377+
"type": "string"
378+
},
379+
"ro-base": {
380+
"markdownDescription": "R/O Base",
381+
"description.zh-cn": "R/O Base",
382+
"size": "small",
383+
"type": "string"
384+
},
385+
"rw-base": {
386+
"markdownDescription": "R/W Base",
387+
"description.zh-cn": "R/W Base",
388+
"size": "small",
389+
"type": "string"
390+
},
373391
"misc-controls": {
374392
"markdownDescription": "Other Linker Options",
375393
"description.zh-cn": "链接器附加选项",

package.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"homepage": "https://em-ide.com",
3636
"license": "MIT",
3737
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/RISC-V",
38-
"version": "3.10.7",
38+
"version": "3.10.8",
3939
"preview": false,
4040
"engines": {
4141
"vscode": "^1.67.0"
@@ -603,6 +603,22 @@
603603
"light": "./res/icon/Import_16x.svg"
604604
}
605605
},
606+
{
607+
"command": "_cl.eide.project.symbol_view.sort_by_addr",
608+
"title": "Sort By Address"
609+
},
610+
{
611+
"command": "_cl.eide.project.symbol_view.sort_by_size",
612+
"title": "Sort By Size"
613+
},
614+
{
615+
"command": "_cl.eide.project.symbol_view.disp_hide_no_sized",
616+
"title": "Hide no-size Symbols"
617+
},
618+
{
619+
"command": "_cl.eide.project.symbol_view.disp_show_all",
620+
"title": "Show All Symbols"
621+
},
606622
{
607623
"command": "_cl.eide.project.cppcheck.check_all",
608624
"title": "%eide.project.run.cppcheck%"
@@ -1121,6 +1137,26 @@
11211137
"command": "_cl.eide.project.source.show_cmsis_config_wizard",
11221138
"group": "commands",
11231139
"when": "resourceLangId =~ /^c$|^cpp$/ && !config.EIDE.Option.DisableEditorContextMenu"
1140+
},
1141+
{
1142+
"command": "_cl.eide.project.symbol_view.sort_by_addr",
1143+
"group": "commands",
1144+
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
1145+
},
1146+
{
1147+
"command": "_cl.eide.project.symbol_view.sort_by_size",
1148+
"group": "commands",
1149+
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
1150+
},
1151+
{
1152+
"command": "_cl.eide.project.symbol_view.disp_hide_no_sized",
1153+
"group": "commands",
1154+
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
1155+
},
1156+
{
1157+
"command": "_cl.eide.project.symbol_view.disp_show_all",
1158+
"group": "commands",
1159+
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
11241160
}
11251161
],
11261162
"explorer/context": [
@@ -1486,7 +1522,7 @@
14861522
{
14871523
"id": "elf.info",
14881524
"aliases": [
1489-
"Gnu Elf Info"
1525+
"GNU ELF Info"
14901526
],
14911527
"extensions": [
14921528
".elf.info"

res/data/option.mapper.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,15 @@
180180
"true": "1",
181181
"false": "0"
182182
}
183+
},
184+
"xo-base": {
185+
"keilName": "pXoBase"
186+
},
187+
"ro-base": {
188+
"keilName": "TextAddressRange"
189+
},
190+
"rw-base": {
191+
"keilName": "DataAddressRange"
183192
}
184193
}
185194
}
@@ -390,6 +399,15 @@
390399
"true": "1",
391400
"false": "0"
392401
}
402+
},
403+
"xo-base": {
404+
"keilName": "pXoBase"
405+
},
406+
"ro-base": {
407+
"keilName": "TextAddressRange"
408+
},
409+
"rw-base": {
410+
"keilName": "DataAddressRange"
393411
}
394412
}
395413
}

res/icon/Table_16x.svg

Lines changed: 1 addition & 0 deletions
Loading

src/CodeBuilder.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@ export class ARMCodeBuilder extends CodeBuilder {
891891
let scatterFilePath: string = config.compileConfig.scatterFilePath;
892892

893893
switch (toolchain.name) {
894+
894895
// 'armcc' can select whether use custom linker file
895896
case 'AC5':
896897
case 'AC6':
@@ -935,6 +936,28 @@ export class ARMCodeBuilder extends CodeBuilder {
935936
// set linker script
936937
options.linker['link-scatter'] = ldFileList;
937938

939+
// for armcc
940+
if (['AC5', 'AC6'].includes(toolchain.name)) {
941+
942+
// if no scatter, will use X/O Base, R/O Base options
943+
if (ldFileList.length == 0) {
944+
945+
let xo_base = options.linker['xo-base']?.trim();
946+
let ro_base = options.linker['ro-base']?.trim();
947+
let rw_base = options.linker['rw-base']?.trim();
948+
949+
let ld_flag: string[] = [];
950+
951+
if (xo_base) ld_flag.push(`--xo-base ${xo_base}`);
952+
if (ro_base) ld_flag.push(`--ro-base ${ro_base} --entry ${ro_base}`);
953+
if (rw_base) ld_flag.push(`--rw-base ${rw_base}`);
954+
955+
ld_flag.push('--entry Reset_Handler', '--first __Vectors');
956+
957+
options.linker['misc-controls'] = ld_flag.join(' ') + ' ' + (options.linker['misc-controls'] || '');
958+
}
959+
}
960+
938961
if (options.afterBuildTasks === undefined) {
939962
options.afterBuildTasks = [];
940963
}

src/DebugConfigGenerator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ class CortexDebugConfigProvider extends IDebugConfigProvider {
167167

168168
// setup svd file, if existed
169169
const device = prj.GetPackManager().getCurrentDevInfo();
170-
debugConfig.svdFile = undefined;
171-
if (device && device.svdPath) {
170+
if (device && device.svdPath && debugConfig.svdFile == undefined) {
172171
debugConfig.svdFile = prj.ToRelativePath(device.svdPath) || device.svdPath;
173172
}
174173

src/EIDEProject.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,10 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
838838
return this.GetRootDir();
839839
}
840840

841+
public getExecutablePathWithoutSuffix(): string {
842+
return [this.getRootDir().path, this.getOutputDir(), this.getProjectName()].join(File.sep);
843+
}
844+
841845
public getUid(): string {
842846
const miscInfo = this.GetConfiguration().config.miscInfo;
843847
if (miscInfo.uid == undefined) miscInfo.uid = md5(`${this.getEideDir().path}-${Date.now()}`);
@@ -1170,18 +1174,27 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
11701174
}
11711175
}
11721176

1177+
/**
1178+
* get output dir top root name. like: `build`
1179+
*/
1180+
getOutputRoot(): string {
1181+
return this.GetConfiguration().getOutDirRoot();
1182+
}
1183+
1184+
/**
1185+
* get output dir name. like: 'build\Debug'
1186+
*/
11731187
getOutputDir(): string {
11741188
return this.GetConfiguration().getOutDir();
11751189
}
11761190

1191+
/**
1192+
* get output dir full file system path. like: 'c:\xxx\xxx\proj\build\Debug'
1193+
*/
11771194
getOutputFolder(): File {
11781195
return new File(this.ToAbsolutePath(this.GetConfiguration().getOutDir()));
11791196
}
11801197

1181-
getOutputRoot(): string {
1182-
return this.GetConfiguration().getOutDirRoot();
1183-
}
1184-
11851198
getEideDir(): File {
11861199
return <File>this.eideDir;
11871200
}
@@ -1974,7 +1987,7 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
19741987
this.registerBuiltinVar('ProjectName', () => this.GetConfiguration().config.name);
19751988
this.registerBuiltinVar('ConfigName', () => this.GetConfiguration().config.mode);
19761989
this.registerBuiltinVar('ProjectRoot', () => this.getRootDir().path);
1977-
this.registerBuiltinVar('ExecutableName', () => [this.getRootDir().path, this.GetConfiguration().getOutDir(), this.GetConfiguration().config.name].join(File.sep));
1990+
this.registerBuiltinVar('ExecutableName', () => this.getExecutablePathWithoutSuffix());
19781991
}
19791992

19801993
private RegisterEvent(): void {

0 commit comments

Comments
 (0)