Skip to content

Commit

Permalink
Merge pull request #148 from github0null/dev
Browse files Browse the repository at this point in the history
v3.8.2 revision
  • Loading branch information
github0null authored Aug 4, 2022
2 parents 56996db + b2dcb25 commit 526b542
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 138 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

***

### [v3.8.1] revision
### [v3.8.2] revision

**New**:
- 支持通过 [external_tools_index](https://github.com/github0null/eide_default_external_tools_index) 安装更多的外部工具,并在插件激活后自动将这些工具的路径附加到VSCode当前的环境变量中

**Change**:
- 将 log 输出至 `<user-home>/.eide/cl.eide.log`,不再将 `.eide/log` 目录作为 log 存放位置

***

### [v3.8.0]
Expand Down
49 changes: 14 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,35 @@

## Summary 📑

> Supported Platforms: **Windows X64 (>= Windows 10)**, **Linux x64**
> Supported Platform: **Windows X64 (>= Windows 10)**, **Linux x64**
A mcu development environment for `8051/AVR/STM8/Cortex-M[0/0+/3/4/7]/RISC-V/Universal-Gcc` on VsCode.
A mcu development environment for `8051/AVR/STM8/Cortex-M/RISC-V/Universal-Gcc` on VsCode.

Provide `8051/AVR/STM8/Cortex-M/RISC-V` project development, compilation, burning and other functions.
Provide `8051/AVR/STM8/Cortex-M/RISC-V` project development, compilation, program flash and other functions.

![preview](https://docs.em-ide.com/preview.png)

***

## Features 🎉

* Support development of 8051, AVR, STM8, Cortex-M, RISC-V, Universal-Gcc projects.
* Support 8051, AVR, STM8, Cortex-M, RISC-V, Universal-Gcc projects.
* Support to import KEIL5/Eclipse projects, support to import 'IAR-STM8, IAR-ARM, Segger Embedded Studio' project source file resource tree.
* Support for installing standard KEIL chip support packs (only for Cortex-M projects).
* Provides rich project templates for quick start projects.
* One-click compilation, fast compilation, support a variety of mainstream compilation tools (support: armcc, gcc-arm-none-eabi, riscv-gcc, xxx-gcc, keil_c51, sdcc ...).
* One key to burn chip, support a variety of mainstream burn device (support: jlink, stlink, openocd, pyocd ...).
* Built-in serial port monitor, one click to open the serial port.
* Supports static checking of projects using Cppcheck.
* Automatically generates default debug configurations for debugger plug-in `cortex-debug/STM8-Debug`.
* Support for writing JS scripts to import arbitrary IDE project source file resources.
* Built-in a variety of utilities, 'CMSIS Config Wizard UI', 'disassembly view', 'program resource view'...
* Provides many project templates for quick start a project.
* Build, rebuild, support many toolchains (armcc, gcc-arm-none-eabi, riscv-gcc, xxx-gcc, keil_c51, sdcc ...).
* Program flash, support: jlink, stlink, openocd, pyocd ...
* Built-in serial port monitor.
* Supports static checking projects by using Cppcheck.
* Automatically generates default debug configurations for debugger plug-in `cortex-debug, STM8-Debug`.
* Built-in many utility tools, 'CMSIS Config Wizard UI', 'Disassembly view', 'Program resource view'...
* Built-in implement `C/C++ IntelliSense Provider` for `ms-vscode.cpptools`, **Not Need to** configurate `c_cpp_properties.json` file.

***

## Example

- Create An RISC-V Project By Internal Template
- Create An Project By Internal Template

![](https://docs.em-ide.com/img/show/new_prj.gif)

Expand All @@ -53,30 +52,12 @@ Provide `8051/AVR/STM8/Cortex-M/RISC-V` project development, compilation, burnin

![](https://docs.em-ide.com/img/show/show_disasm.gif)

- Static Check Project By Cppcheck

![](https://docs.em-ide.com/img/show/cppcheck_prj.gif)

- Program Resource View

![](https://docs.em-ide.com/img/show/show_prj_res.gif)

***

## Toolchain Support 🔨

![8051](https://img.shields.io/badge/-8051_:-grey.svg) ![status](https://img.shields.io/badge/Keil_C51-✔-brightgreen.svg) ![status](https://img.shields.io/badge/SDCC-✔-brightgreen.svg)

![STM8](https://img.shields.io/badge/-STM8_:-grey.svg) ![status](https://img.shields.io/badge/IAR_STM8-✔-brightgreen.svg) ![status](https://img.shields.io/badge/SDCC-✔-brightgreen.svg)

![ARM](https://img.shields.io/badge/-ARM_:-grey.svg) ![status](https://img.shields.io/badge/ARMCC-✔-brightgreen.svg) ![status](https://img.shields.io/badge/ARMCLang-✔-brightgreen.svg) ![status](https://img.shields.io/badge/ARM_GCC-✔-brightgreen.svg)

![RISC-V](https://img.shields.io/badge/-RISCV_:-grey.svg) ![status](https://img.shields.io/badge/RISCV_GCC-✔-brightgreen.svg)

![AnyGCC](https://img.shields.io/badge/-ANYGCC_:-grey.svg) ![status](https://img.shields.io/badge/GCC_Famliy_Compiler-✔-brightgreen.svg)

***

## Quick Start 🏃‍♀️

1. Install any of the above compilers
Expand All @@ -91,8 +72,6 @@ Provide `8051/AVR/STM8/Cortex-M/RISC-V` project development, compilation, burnin

[https://docs.em-ide.com](https://docs.em-ide.com)

> The English document is being translated
***

## ChangeLog 📌
Expand All @@ -103,6 +82,6 @@ Provide `8051/AVR/STM8/Cortex-M/RISC-V` project development, compilation, burnin

## Community 🌈

- [Forum https://discuss.em-ide.com](https://discuss.em-ide.com/)

- [Github](https://github.com/github0null/eide/issues)

- [Forum https://discuss.em-ide.com](https://discuss.em-ide.com/)
22 changes: 4 additions & 18 deletions README_ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,13 @@
* 支持导入 KEIL5/Eclipse 项目,支持导入 `IAR-STM8, IAR-ARM, Segger Embedded Studio` 项目源文件资源树。
* 支持安装标准的 KEIL 芯片支持包 (仅用于 Cortex-M 项目)。
* 提供丰富的项目模板方便快速开始项目。
* 一键编译、快速编译,支持多种主流的编译工具 (armcc, gcc-arm-none-eabi, riscv-gcc, xxx-gcc, keil_c51, sdcc ...)。
* 一键编译,支持多种主流的编译工具 (armcc, gcc-arm-none-eabi, riscv-gcc, xxx-gcc, keil_c51, sdcc ...)。
* 一键烧录到芯片,支持多种主流的烧录器 (jlink, stlink, openocd, pyocd ...)。
* 内置的串口监视器,一键打开串口。
* 支持使用 Cppcheck 对项目进行静态检查。
* 自动生成默认调试配置,为调试器插件 Cortex-debug / STM8-debug 生成默认配置。
* 内置多种实用工具,`CMSIS Config Wizard UI`, `反汇编查看``程序资源视图` ...
* 内置 C/C++ 插件的 `C/C++ IntelliSense Provider`**无需**配置 `c_cpp_properties.json` 即可获得源码跳转,补全提示功能。

***

## 支持的编译器 🔨

![8051](https://img.shields.io/badge/-8051_:-grey.svg) ![status](https://img.shields.io/badge/Keil_C51-✔-brightgreen.svg) ![status](https://img.shields.io/badge/SDCC-✔-brightgreen.svg)

![STM8](https://img.shields.io/badge/-STM8_:-grey.svg) ![status](https://img.shields.io/badge/IAR_STM8-✔-brightgreen.svg) ![status](https://img.shields.io/badge/SDCC-✔-brightgreen.svg)

![ARM](https://img.shields.io/badge/-ARM_:-grey.svg) ![status](https://img.shields.io/badge/ARMCC-✔-brightgreen.svg) ![status](https://img.shields.io/badge/ARMCLang-✔-brightgreen.svg) ![status](https://img.shields.io/badge/ARM_GCC-✔-brightgreen.svg)

![RISC-V](https://img.shields.io/badge/-RISCV_:-grey.svg) ![status](https://img.shields.io/badge/RISCV_GCC-✔-brightgreen.svg)

![AnyGCC](https://img.shields.io/badge/-ANYGCC_:-grey.svg) ![status](https://img.shields.io/badge/GCC_Famliy_Compiler-✔-brightgreen.svg)
* 内置 C/C++ 插件的 `C/C++ IntelliSense Provider`**无需配置** `c_cpp_properties.json` 即可获得源码跳转,补全提示功能。

***

Expand Down Expand Up @@ -72,6 +58,6 @@

反馈途径:

- [论坛: https://discuss.em-ide.com](https://discuss.em-ide.com/)

- [Github Issue](https://github.com/github0null/eide/issues)

- [论坛: https://discuss.em-ide.com](https://discuss.em-ide.com/)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/github0null/eide/blob/master/README.md",
"license": "MIT",
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/RISC-V",
"version": "3.8.1",
"version": "3.8.2",
"preview": false,
"engines": {
"vscode": "^1.63.0"
Expand Down Expand Up @@ -178,7 +178,7 @@
"EIDE.ExternalTools.IndexUrl": {
"type": "string",
"scope": "machine",
"markdownDescription": "external tools index.json url, ref: https://github.com/github0null/eide_default_external_tools_index"
"markdownDescription": "external tools **index.json** url, ref: https://github.com/github0null/eide_default_external_tools_index"
},
"EIDE.SourceTree.AutoSearchIncludePath": {
"type": "boolean",
Expand Down
8 changes: 0 additions & 8 deletions src/EIDEProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ export abstract class AbstractProject implements CustomConfigurationProvider {
static readonly workspaceSuffix = '.code-workspace';
static readonly vsCodeDir = '.vscode';
static readonly EIDE_DIR = '.eide';
static readonly LOG_DIR = 'log';

static readonly cppConfigName = 'c_cpp_properties.json';
static readonly prjConfigName = 'eide.json';
Expand Down Expand Up @@ -819,9 +818,6 @@ export abstract class AbstractProject implements CustomConfigurationProvider {
this.eideDirWatcher.OnChanged = f => this.onEideDirChanged('changed', f);
this.eideDirWatcher.OnRename = f => this.onEideDirChanged('renamed', f);

// create log folder
this.getLogDir().CreateDir();

// compat old project
if (this.isOldVersionProject) {

Expand Down Expand Up @@ -1023,10 +1019,6 @@ export abstract class AbstractProject implements CustomConfigurationProvider {
return <File>this.eideDir;
}

getLogDir(): File {
return File.fromArray([(<File>this.eideDir).path, AbstractProject.LOG_DIR]);
}

GetConfigMap(): ConfigMap {
return this.configMap;
}
Expand Down
31 changes: 12 additions & 19 deletions src/EIDEProjectExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,27 +645,20 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem> {
}
}

GlobalEvent.once('response_init_component', () => {

/* init active project */
if (validList.length > 0) {
this.activePrjPath = validList[0].path;
}

/* if prj count > 1, this is a workspace project
* active workspace control btns
*/
if (validList.length > 1) {
vscode.commands.executeCommand('setContext', 'cl.eide.isWorkspaceProject', true);
}
/* init active project */
if (validList.length > 0) {
this.activePrjPath = validList[0].path;
}

for (const wsFile of validList) {
this._OpenProject(wsFile.path);
}
});
/* if prj count > 1, this is a workspace project
* active workspace control btns
*/
if (validList.length > 1) {
vscode.commands.executeCommand('setContext', 'cl.eide.isWorkspaceProject', true);
}

if (validList.length > 0) {
GlobalEvent.emit('request_init_component');
for (const wsFile of validList) {
this._OpenProject(wsFile.path);
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/GlobalEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export class GlobalEvent {
}

//event
static on(event: 'request_init_component', listener: () => void): void;
static on(event: 'response_init_component', listener: () => void): void;
static on(event: 'extension_close', listener: () => void): void;
static on(event: 'extension_launch_done', listener: () => void): void;
static on(event: 'project.opened', listener: (prj: any) => void): void;
Expand All @@ -60,7 +58,6 @@ export class GlobalEvent {
GlobalEvent.GetInstance()._emitter.on(event, args);
}

static once(event: 'response_init_component', listener: () => void): void;
static once(event: any, args?: any): void {
GlobalEvent.GetInstance()._emitter.once(event, args);
}
Expand All @@ -71,8 +68,6 @@ export class GlobalEvent {
}

//event
static emit(event: 'request_init_component'): boolean;
static emit(event: 'response_init_component'): boolean;
static emit(event: 'extension_close'): boolean;
static emit(event: 'extension_launch_done'): boolean;
static emit(event: 'project.opened', prj: any): boolean;
Expand Down
10 changes: 5 additions & 5 deletions src/LogDumper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ export class LogDumper {

private constructor() {

const dir = ResManager.GetInstance().GetLogDir();
dir.CreateDir(true);
const logDir = ResManager.GetInstance().GetLogDir();

const logPath = dir.path + File.sep + ResManager.getAppFullName() + '.log';
this.logFile = new File(logPath);
logDir.CreateDir(false);

const outStream = fs.createWriteStream(logPath, { flags: 'a' });
this.logFile = File.fromArray([logDir.path, ResManager.GetInstance().getAppFullName() + '.log']);

const outStream = fs.createWriteStream(this.logFile.path, { flags: 'a' });
this._console = new console.Console(outStream, outStream);

const time = Time.GetInstance().GetTimeInfo();
Expand Down
2 changes: 2 additions & 0 deletions src/OperationExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ export class OperationExplorer {
'User-Agent': 'Mozilla/5.0'
};

utility.setProxyHeader(headers);

if (acToken) { // if token is enabled, use it
headers['Authorization'] = `token ${acToken}`;
}
Expand Down
Loading

0 comments on commit 526b542

Please sign in to comment.