More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Keil MDK Build: Firmware Builds and Map Analysis

    1

    Build ARM firmware the authoritative way with Keil MDK: UV4 batch builds and exit codes, AC5 vs AC6 traps, map-file memory budgeting, and flash packaging with manifests and CRCs that verify.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Keil MDK Build: Firmware Builds and Map Analysis

    Keil MDK Build: Firmware Builds and Map Analysis

    Example session with this skill installed

    My Keil project builds, but the release image grew by about 18 KB since last release and flash headroom is nearly gone. Also, my build script says success even when there are warnings. Walk me through finding where the space went and fixing the script's verdict.

    • Read your context and instructions
    • Compiled the keil mdk build

    DIAGNOSIS — produced by applying the skill's build and map workflow.

    First, the script's verdict. UV4 exit codes are 0 = clean, 1 = warnings only, 2 (or 3 with StopOnExitCode set) = errors. A script that checks only "exit code is not 2" calls every warning build a success. Capture both signals — exit code and the log file (UV4 prints nothing to stdout) — and treat exit 1 as "read the log," not success. Also check your -o path: it resolves relative to the .uvprojx directory, not your shell's working directory, which is the usual reason the log "isn't there."

    Second, the 18 KB. Read the map file as a budget before touching code. Previous release: flash load region 412,300 of 524,288 bytes (78.6%). Current build: 430,512 (82.1%) — growth confirmed and quantified. Sort image component sizes by Code+RO: the top offender is the diagnostics module added this cycle, +11,842 bytes. The giveaway is in its calls: it uses printf with floating-point format specifiers, which drags in the full library formatter. Check the removed-sections list for that module: the linker removed nothing from it, so it is genuinely linked, not dead weight the linker already handles.

    Fixes, in the skill's quick-win order, one build each with a before/after log line: (1) section splitting with linker garbage collection — already enabled here, so no gain, move on; (2) enable MicroLIB — recovers roughly 6 KB; (3) replace the float printf calls with fixed-point formatting — recovers roughly 9 KB more. Result: flash back to about 415,900 bytes, headroom restored to roughly 20%, and the growth explained line by line rather than hand-waved.

    The exit-1 warnings turn out to be two sign-compare warnings in that same diagnostics module — logged and filed with reasons, not silently accepted. Budget worksheet for the release record: flash used, RAM used (RW + ZI + stack + heap), largest Code+RO object, removed-section count, PAD total — filled from this build's map, which is the target you actually ship, not a debug build.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Keil projects fail in predictable places: a build script that treats exit code 1 as success, a log file written somewhere nobody looks, a struct that silently changes layout after an ARM Compiler 5 to 6 migration, and a flash image devices reject because the CRC was computed before padding. This skill covers the full path from build to shipped image. It starts with the authoritative UV4 batch build — the exact invocation, why UV4 prints nothing to stdout, why the -o log path resolves relative to the project directory, and how to read the exit codes (0 clean, 1 warnings that must be triaged, 2/3 errors). A comparison table lays out the AC5 vs AC6 differences that actually bite: char signedness flipping by default, __packed being silently ignored, __irq breaking stack frames, inline assembly syntax changing, and optimization levels not mapping one-to-one. The map file gets read like a budget — image component sizes sorted by Code+RO, flash vs RAM accounting with the RW double-billing rule, removed sections, PAD waste — with a fill-in worksheet that flags headroom under 5% as a finding. Packaging covers the merged image (application + filesystem + bootloader), the manifest fields, the pad-then-CRC order, embedded CRC32 variants that differ from zlib's, and the hexadecimal build-number parity trap. A worked example traces a release that grew 18 KB from the map evidence to the two fixes that recovered most of it, and a readiness scorecard gates the release at 10+ of 12 with no zero on build or package verification.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.

    • It assumes Keil MDK with UV4 and the ARM compilers; GCC, IAR, and CMake-based embedded flows have different map formats and packaging conventions.
    • CRC guidance covers the common embedded variants and the verification discipline — your project's exact polynomial and reflection settings still come from its known-good image.
    • It builds and packages; it does not triage runtime crashes. A faulting image goes to a crash-analysis workflow, with this skill's map file as the symbol reference.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 24 days ago

    Permissions

    No special permissions declared or detected

    Listed24 days ago
    Updated21 days ago

    What's inside

    Frequently Asked Questions

    Exit 1 means warnings only, and warnings range from an unused variable to a sign-compare on a length field. The risk isn't any single warning — it's that nobody reads them. The skill's rule is triage: every warning fixed or filed with a reason, so the log stays a signal instead of noise everyone ignores.

    The __packed keyword. AC6 silently ignores the AC5 spelling, so packed structs quietly gain padding. The migration table in the skill covers the other frequent causes — char signedness flipping to signed by default (add -funsigned-char to preserve behavior) and __irq handlers needing the new attribute spelling — and the sanity check is a map-file diff of sizes and symbols right after the switch.

    Order and variant, in that order. Components must be padded to alignment boundaries before the CRC is computed — CRC-then-pad fails on-device every time. If the order is right, check the variant: embedded CRC32 flavors commonly byte-swap within words, skip reflection, and skip the final XOR, so a zlib-matching implementation is wrong for the device. Verify against a known-good image, not against the implementation itself.