gcc

Build CMake-based arm-none-eabi GCC projects and report ELF sizes in JSON.

551|66|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/zhinkgit/embeddedskills --skill gcc-zhinkgit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gcc
Source: https://github.com/zhinkgit/embeddedskills/tree/main/gcc
Command: npx skills add https://github.com/zhinkgit/embeddedskills --skill gcc-zhinkgit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Embedded developers often need to iterate on firmware by manually configuring toolchains, running CMake builds, locating ELF artifacts, and measuring firmware size, which breaks automation and slows down validation cycles. This skill centralizes those steps so an AI or developer can discover projects, run configure/build workflows, and obtain build artifacts and size metrics without manual shell choreography.

Core Features & Use Cases

  • Project discovery: Scan a workspace for CMake-based embedded projects and detect CMakePresets or toolchain files.
  • Preset enumeration: List configure and build presets from CMakePresets.json (and merged user presets).
  • Configure/build lifecycle: Run cmake --preset configure, cmake --build incremental builds, rebuilds, and clean operations with logs and error extraction.
  • Artifact and metrics reporting: Locate ELF/debug/flash artifacts, parse build output for errors/warnings/flash/ram hints, and analyze ELF sizes and sections with optional linker script parsing.
  • Use case: Automatically configure and build a CMake-based ARM firmware, then produce an ELF and a JSON summary of text/data/bss sizes for downstream flashing or CI gating.

Quick Start

Run the gcc skill to scan the workspace for a CMake embedded project, choose a preset, then configure and build to produce the ELF and a size report.

Frequently Asked Questions about gcc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate CMake configure and build for an arm-none-eabi embedded project?

You can automate this by scanning the workspace for CMakePresets or toolchain files, selecting a configure preset, and running cmake configure followed by an incremental build to generate ELF artifacts and JSON-formatted build logs.

What is the best way to analyze ELF size and sections for ARM firmware?

The best way to analyze ELF size is to locate the compiled ELF artifact, parse its text, data, and bss sections, optionally read linker scripts, and output a JSON summary of flash and RAM metrics for CI gating or downstream tools.

Does this build workflow support CMakePresets for embedded toolchain configuration?

Yes, CMakePresets are fully supported. The workflow enumerates configure and build presets from CMakePresets.json, including merged user presets, to drive the arm-none-eabi GCC configure and build lifecycle.

How do I get JSON-formatted build logs and flash metrics from a CMake build?

To get JSON-formatted build logs and flash metrics, run the configure and build lifecycle, parse the output for errors and warnings, locate the ELF artifact, and return the extracted metrics and logs in a JSON-compatible format for downstream tools.

Can I clean and rebuild an ARM firmware project without manual shell commands?

Yes, you can clean and rebuild ARM firmware without manual shell commands by invoking automated clean operations followed by a fresh configure and build cycle, which returns updated ELF artifacts and size reports without shell choreography.

What are the limitations of automating ELF size analysis for CMake-based embedded projects?

Limitations include requiring the project to be CMake-based with valid CMakePresets or toolchain files, and depending on the arm-none-eabi GCC toolchain to successfully configure, build, and locate the expected ELF artifacts for size analysis.