Loading...
Loading...
GCC Embedded Project Build Tool (CMake + arm-none-eabi-gcc), used to scan CMake-based embedded projects, list presets, configure, compile, rebuild, clean, and analyze ELF size. It is automatically triggered when users mention GCC, arm-none-eabi, CMake embedded compilation, Ninja build, ELF size analysis, arm-gcc, cross-compilation, cmake --build, cmake --preset, and also supports explicit invocation via /gcc. Even if users just say "compile" or "check firmware size", this skill should be triggered as long as the context involves CMake-based embedded GCC projects.
npx skill4agent add zhinkgit/embeddedskills gccMakefileconfig.jsoncmake_exe{
"cmake_exe": "cmake",
"toolchain_prefix": "arm-none-eabi-",
"toolchain_path": "",
"operation_mode": 1
}cmake_exetoolchain_prefixarm-none-eabi-toolchain_pathoperation_mode123.embeddedskills/config.json{
"gcc": {
"project": "",
"preset": "",
"log_dir": ".embeddedskills/build"
}
}projectpresetlog_dir.embeddedskills/build| Subcommand | Purpose | Risk |
|---|---|---|
| Search for CMake-based embedded projects in the current directory | Low |
| List configure/build presets in CMakePresets.json | Low |
| Execute | Medium |
| Incremental compilation via | Medium |
| Clean then perform full rebuild | Medium |
| Clean build directory | High |
| Analyze ELF file size (text/data/bss and memory usage) | Low |
config.jsoncmake_exescanscanconfigure/build/rebuild/cleanoperation_modebuildelf_filebuild/rebuildjlink/openocdsize# Scan projects
python <skill-dir>/scripts/gcc_project.py scan --root <search directory> --json
# List presets
python <skill-dir>/scripts/gcc_project.py presets --project <project directory> --jsonpython <skill-dir>/scripts/gcc_build.py <configure|build|rebuild|clean> \
--cmake <cmake path> \
--project <project root directory> \
--preset <preset name> \
--log-dir <log directory> \
--json# Basic analysis
python <skill-dir>/scripts/gcc_size.py analyze \
--elf <elf file path> \
--toolchain-prefix arm-none-eabi- \
--linker-script <linker script path> \
--json
# Comparative analysis
python <skill-dir>/scripts/gcc_size.py compare \
--elf <elf file 1> \
--compare <elf file 2> \
--toolchain-prefix arm-none-eabi- \
--jsonstatusactionsummarydetailscontextartifactsmetricsstatenext_actionstiming{
"status": "ok",
"action": "build",
"summary": "build succeeded, errors=0 warnings=2",
"details": { "project": "...", "preset": "Debug", "build_dir": "...", "elf_file": "...", "log_file": "..." },
"metrics": { "errors": 0, "warnings": 2, "flash_bytes": 99328, "ram_bytes": 46080 }
}{
"status": "error",
"action": "build",
"error": { "code": "not_configured", "message": "Build directory does not exist, please execute configure first" }
}.embeddedskills/state.jsoncleanelf_file