Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All notable version changes will be recorded in this file.

***

### [v3.10.8] update

**New**:
- `Project Resource`: Add `Symbol Table` virtual file in `Output Files`, click it to show `elf symbols` (support 'armcc', 'gcc', 'iar').
- `Builder Options` : Add `X/O Base`, `R/O Base`, `R/W Base` options for armcc, and allow import them from keil project.

**Optimize**:
- `launch.json Generator`: Don't force override 'svdPath' in launch.json config.
- `Project Resource`: Show promt when remove a filesystem source dir.

***

### [v3.10.7] revision

**Fix**:
Expand Down
20 changes: 19 additions & 1 deletion lang/arm.v5.verify.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,24 @@
false
]
},
"xo-base": {
"markdownDescription": "X/O Base",
"description.zh-cn": "X/O Base",
"size": "small",
"type": "string"
},
"ro-base": {
"markdownDescription": "R/O Base",
"description.zh-cn": "R/O Base",
"size": "small",
"type": "string"
},
"rw-base": {
"markdownDescription": "R/W Base",
"description.zh-cn": "R/W Base",
"size": "small",
"type": "string"
},
"misc-controls": {
"markdownDescription": "Other Linker Options",
"description.zh-cn": "链接器附加选项",
Expand All @@ -448,4 +466,4 @@
}
}
}
}
}
18 changes: 18 additions & 0 deletions lang/arm.v6.verify.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,24 @@
false
]
},
"xo-base": {
"markdownDescription": "X/O Base",
"description.zh-cn": "X/O Base",
"size": "small",
"type": "string"
},
"ro-base": {
"markdownDescription": "R/O Base",
"description.zh-cn": "R/O Base",
"size": "small",
"type": "string"
},
"rw-base": {
"markdownDescription": "R/W Base",
"description.zh-cn": "R/W Base",
"size": "small",
"type": "string"
},
"misc-controls": {
"markdownDescription": "Other Linker Options",
"description.zh-cn": "链接器附加选项",
Expand Down
40 changes: 38 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"homepage": "https://em-ide.com",
"license": "MIT",
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/RISC-V",
"version": "3.10.7",
"version": "3.10.8",
"preview": false,
"engines": {
"vscode": "^1.67.0"
Expand Down Expand Up @@ -603,6 +603,22 @@
"light": "./res/icon/Import_16x.svg"
}
},
{
"command": "_cl.eide.project.symbol_view.sort_by_addr",
"title": "Sort By Address"
},
{
"command": "_cl.eide.project.symbol_view.sort_by_size",
"title": "Sort By Size"
},
{
"command": "_cl.eide.project.symbol_view.disp_hide_no_sized",
"title": "Hide no-size Symbols"
},
{
"command": "_cl.eide.project.symbol_view.disp_show_all",
"title": "Show All Symbols"
},
{
"command": "_cl.eide.project.cppcheck.check_all",
"title": "%eide.project.run.cppcheck%"
Expand Down Expand Up @@ -1121,6 +1137,26 @@
"command": "_cl.eide.project.source.show_cmsis_config_wizard",
"group": "commands",
"when": "resourceLangId =~ /^c$|^cpp$/ && !config.EIDE.Option.DisableEditorContextMenu"
},
{
"command": "_cl.eide.project.symbol_view.sort_by_addr",
"group": "commands",
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
},
{
"command": "_cl.eide.project.symbol_view.sort_by_size",
"group": "commands",
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
},
{
"command": "_cl.eide.project.symbol_view.disp_hide_no_sized",
"group": "commands",
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
},
{
"command": "_cl.eide.project.symbol_view.disp_show_all",
"group": "commands",
"when": "resourceExtname =~ /\\.elf-symbols$/ && cl.eide.projectActived"
}
],
"explorer/context": [
Expand Down Expand Up @@ -1486,7 +1522,7 @@
{
"id": "elf.info",
"aliases": [
"Gnu Elf Info"
"GNU ELF Info"
],
"extensions": [
".elf.info"
Expand Down
18 changes: 18 additions & 0 deletions res/data/option.mapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@
"true": "1",
"false": "0"
}
},
"xo-base": {
"keilName": "pXoBase"
},
"ro-base": {
"keilName": "TextAddressRange"
},
"rw-base": {
"keilName": "DataAddressRange"
}
}
}
Expand Down Expand Up @@ -390,6 +399,15 @@
"true": "1",
"false": "0"
}
},
"xo-base": {
"keilName": "pXoBase"
},
"ro-base": {
"keilName": "TextAddressRange"
},
"rw-base": {
"keilName": "DataAddressRange"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions res/icon/Table_16x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/CodeBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ export class ARMCodeBuilder extends CodeBuilder {
let scatterFilePath: string = config.compileConfig.scatterFilePath;

switch (toolchain.name) {

// 'armcc' can select whether use custom linker file
case 'AC5':
case 'AC6':
Expand Down Expand Up @@ -935,6 +936,28 @@ export class ARMCodeBuilder extends CodeBuilder {
// set linker script
options.linker['link-scatter'] = ldFileList;

// for armcc
if (['AC5', 'AC6'].includes(toolchain.name)) {

// if no scatter, will use X/O Base, R/O Base options
if (ldFileList.length == 0) {

let xo_base = options.linker['xo-base']?.trim();
let ro_base = options.linker['ro-base']?.trim();
let rw_base = options.linker['rw-base']?.trim();

let ld_flag: string[] = [];

if (xo_base) ld_flag.push(`--xo-base ${xo_base}`);
if (ro_base) ld_flag.push(`--ro-base ${ro_base} --entry ${ro_base}`);
if (rw_base) ld_flag.push(`--rw-base ${rw_base}`);

ld_flag.push('--entry Reset_Handler', '--first __Vectors');

options.linker['misc-controls'] = ld_flag.join(' ') + ' ' + (options.linker['misc-controls'] || '');
}
}

if (options.afterBuildTasks === undefined) {
options.afterBuildTasks = [];
}
Expand Down
3 changes: 1 addition & 2 deletions src/DebugConfigGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ class CortexDebugConfigProvider extends IDebugConfigProvider {

// setup svd file, if existed
const device = prj.GetPackManager().getCurrentDevInfo();
debugConfig.svdFile = undefined;
if (device && device.svdPath) {
if (device && device.svdPath && debugConfig.svdFile == undefined) {
debugConfig.svdFile = prj.ToRelativePath(device.svdPath) || device.svdPath;
}

Expand Down
23 changes: 18 additions & 5 deletions src/EIDEProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,10 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
return this.GetRootDir();
}

public getExecutablePathWithoutSuffix(): string {
return [this.getRootDir().path, this.getOutputDir(), this.getProjectName()].join(File.sep);
}

public getUid(): string {
const miscInfo = this.GetConfiguration().config.miscInfo;
if (miscInfo.uid == undefined) miscInfo.uid = md5(`${this.getEideDir().path}-${Date.now()}`);
Expand Down Expand Up @@ -1170,18 +1174,27 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
}
}

/**
* get output dir top root name. like: `build`
*/
getOutputRoot(): string {
return this.GetConfiguration().getOutDirRoot();
}

/**
* get output dir name. like: 'build\Debug'
*/
getOutputDir(): string {
return this.GetConfiguration().getOutDir();
}

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

getOutputRoot(): string {
return this.GetConfiguration().getOutDirRoot();
}

getEideDir(): File {
return <File>this.eideDir;
}
Expand Down Expand Up @@ -1974,7 +1987,7 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
this.registerBuiltinVar('ProjectName', () => this.GetConfiguration().config.name);
this.registerBuiltinVar('ConfigName', () => this.GetConfiguration().config.mode);
this.registerBuiltinVar('ProjectRoot', () => this.getRootDir().path);
this.registerBuiltinVar('ExecutableName', () => [this.getRootDir().path, this.GetConfiguration().getOutDir(), this.GetConfiguration().config.name].join(File.sep));
this.registerBuiltinVar('ExecutableName', () => this.getExecutablePathWithoutSuffix());
}

private RegisterEvent(): void {
Expand Down
Loading