This skill provides discovery of EIDE (Embedded IDE) projects, build configuration enumeration, incremental compilation, full rebuild, clean, and ELF size analysis capabilities, and returns firmware artifact paths that can be used by jlink/openocd for continued use.
EIDE is an embedded development extension under VS Code, using the ARM CC (AC5/AC6) or GCC toolchain, driven through the unify_builder unified build backend.
Configuration
Environment-level configuration (skill/config.json)
The config.json in the skill directory contains environment-level configuration; before first use, confirm that the builder_dir path is correct:
{
"builder_dir": "C:\\Users\\<user>\\.vscode\\extensions\\cl.eide-<version>\\res\\tools\\win32\\unify_builder",
"builder_exe": "unify_builder.exe",
"code_exe": "code",
"toolchain_prefix": "arm-none-eabi-",
"operation_mode": 1
}
builder_dir: the directory where EIDE unify_builder is located (required, located under the VS Code extension directory)builder_exe: builder executable filename, default on Windowsunify_builder.execode_exe: VS Code CLI path, by default looked up from PATHcodetoolchain_prefix: toolchain prefix used for size analysis, defaultarm-none-eabi-operation_mode:1executes directly /2outputs a risk summary but does not block /3confirm before execution
Project-level configuration (workspace/.embeddedskills/config.json)
Project-level shared configuration is uniformly stored in the workspace .embeddedskills/config.json in:
{
"eide": {
"project": "",
"config": "",
"log_dir": ".embeddedskills/build"
}
}
project: default EIDE project root directory (containing.eide/eide.ymldirectory), automatically updated after a successful buildconfig: default build configuration name (corresponding to the ConfigName in eide.yml), automatically updated after a successful buildlog_dir: build log output directory, default.embeddedskills/build
Parameter parsing priority
Parameter parsing order (from high to low):
- Explicit CLI parameters
- Environment-level configuration (skill/config.json)
- Project-level configuration (.embeddedskills/config.json)
.embeddedskills/state.json(last build record)- Search/Ask
Subcommand
| Subcommand | Purpose | Risk |
|---|---|---|
scan |
Search for EIDE projects in the current directory (directories containing .eide/eide.yml ) |
Low |
configs |
Enumerate build configurations in the project | Low |
build |
Incremental compilation | Medium |
rebuild |
Full rebuild | Medium |
clean |
Clean build artifacts | High |
size |
Analyze ELF file size (text/data/bss and memory usage) | Low |
Execution flow
- Read
config.json, confirm that thebuilder_dirpath is valid - When no subcommand is specified, execute by default
scan - When no project path is provided, first execute
scanto search for projects - When multiple projects or multiple configurations are discovered at the same time, list the options for the user to choose, never guess automatically
build/rebuild/cleanbased onoperation_modedetermine whether confirmation is neededbuild/rebuildAfter success, parse from the build directoryelf_file/hex_fileand other artifact paths- All build commands are based on
builder.paramsinvokingunify_builder, output to a log file and then parse sizeBy default, analyze the .elf file of the most recent build artifact
Script invocation
There are Python scripts in the skill directory, implemented using the standard library + PyYAML.
eide_project.py — Project scan and configuration enumeration
# 扫描工程
python <skill-dir>/scripts/eide_project.py scan --root <搜索目录> --json
# 枚举构建配置
python <skill-dir>/scripts/eide_project.py configs --project <工程目录> --json
eide_build.py — Build / Rebuild / Clean
python <skill-dir>/scripts/eide_build.py <build|rebuild|clean> \
--builder-dir <unify_builder目录> \
--project <工程根目录> \
--config <配置名称> \
--log-dir <日志目录> \
--json
rebuild Additional support for --clean-first Clean first, then rebuild.
eide_size.py — ELF size analysis
# 基本分析
python <skill-dir>/scripts/eide_size.py analyze \
--elf <elf文件路径> \
--toolchain-prefix arm-none-eabi- \
--json
# 对比分析
python <skill-dir>/scripts/eide_size.py compare \
--elf <elf文件1> \
--compare <elf文件2> \
--toolchain-prefix arm-none-eabi- \
--json
Output format
All scripts return results in JSON format, with the base field being status(ok/error)、action、summary、details, and may also include context、artifacts、metrics、state、next_actions、timing。
Success example:
{
"status": "ok",
"action": "build",
"summary": "build 成功,errors=0 warnings=2",
"details": {
"project": "Vendor/EIDE",
"config": "W20_Mainboard",
"build_dir": "build/W20_Mainboard",
"elf_file": "build/W20_Mainboard/MDK-ARM_F403A.elf",
"hex_file": "build/W20_Mainboard/MDK-ARM_F403A.hex",
"log_file": ".embeddedskills/build/MDK-ARM_F403A-W20_Mainboard-build.log"
},
"artifacts": {
"elf_file": "build/W20_Mainboard/MDK-ARM_F403A.elf",
"hex_file": "build/W20_Mainboard/MDK-ARM_F403A.hex",
"flash_file": "build/W20_Mainboard/MDK-ARM_F403A.hex",
"debug_file": "build/W20_Mainboard/MDK-ARM_F403A.elf"
},
"metrics": { "errors": 0, "warnings": 2, "flash_bytes": 32768, "ram_bytes": 8192 }
}
Error example:
{
"status": "error",
"action": "build",
"error": { "code": "builder_not_found", "message": "unify_builder.exe 不存在,请确认 EIDE 扩展已安装" }
}
Core rules
- Do not modify
.eide/eide.ymlor any EIDE project configuration file - Do not automatically guess the project path or build configuration; when there is ambiguity, you must ask the user
- For parameter parsing priority, see the "Parameter parsing priority" section above
- After a successful build, preferentially use the returned
flash_file/debug_fileandjlink/openocdconcatenated cleanis not implicitly executed in the automated workflow- When a build fails, preferentially display the first error and the log file path
- In the result echo, always include the project name, configuration name, and build directory path; when the build succeeds, preferentially echo the artifact path
- An EIDE project has as its root directory the directory containing
.eide/eide.yml's directory is the root directory
Relationship with Keil projects
The EIDE project in this project shares the same source code and ARM CC toolchain with the Keil MDK project (D:\Keil_V543\ARM\ARMCLANG). The EIDE project describes the project structure through eide.yml , andbuilder.params is automatically generated by EIDE and used by unify_builder . The build artifacts of both (.axf/.hex/.elf) are format-compatible and interchangeable.
References
- EIDE extension: search in VS Code for
cl.eideto install eide.ymlFormat: see the EIDE extension documentationbuilder.params: automatically generated by EIDE, located inbuild/<ConfigName>/builder.params