mcu-flash

Program or verify MCU firmware against workspace ELF files through OpenOCD.

5|1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-flash-bakesheep
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcu-flash
Source: https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug/tree/main/skills/mcu-flash
Command: npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-flash-bakesheep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Embedded developers need a safe, repeatable way to flash firmware onto Cortex-M targets and confirm that on-chip Flash matches the built ELF, without hand-writing OpenOCD commands or risking accidental writes. ## Core Features & Use Cases - Firmware Programming: Detects the latest workspace ELF, target, and probe, then runs OpenOCD's program-and-verify sequence with a one-time user authorization flow. - Flash Verification: Compares existing on-chip Flash against the local ELF without programming, restoring the target's prior run state afterward. - Safe Preflight Detection: Reports the selected ELF with SHA-256, target, probe, and OpenOCD version compatibility before any execution, refusing to guess missing values. - Use Case: After building a new firmware ELF, ask the agent to flash it to your connected STM32 board; the skill preflights the setup, asks for explicit confirmation, programs the chip, and reports OpenOCD's verification result. ## Quick Start Use the mcu-flash skill to program the latest workspace ELF onto my connected target and confirm the flash succeeded.

Frequently Asked Questions about mcu-flash

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

FAQPage Schema
How do I flash firmware to an MCU with OpenOCD?▼

Run the skill's program script, which preflights detection of the ELF, target, and probe, then requests one-time user authorization. After approval, rerun with the confirmation ID and it executes OpenOCD's program, verify, and reset sequence.

How can I verify on-chip Flash matches my ELF without programming?▼

Use the verification workflow, which runs OpenOCD verify_image to compare Flash against the local ELF. It temporarily halts the core, disables the work area so RAM is not overwritten, and restores the prior run state afterward.

What OpenOCD version is required for MCU flashing?▼

OpenOCD 0.12.0 or newer is required. On Windows, an incompatible system OpenOCD can be replaced with EmberProbe's bundled xPack OpenOCD 0.12.0-7 build.

Why does flashing fail when a debug or sampling session is active?▼

The debug probe has a single owner, so programming and verification are blocked while EmberProbe is sampling variables, downloading, or running a debug session. Stop the active session and retry the operation.

Can I flash without user confirmation?▼

No. Programming rewrites target Flash, so it requires explicit one-time authorization. The preflight shows a flashAuthorization plan, and execution only proceeds with a matching confirmation ID that cannot be reused for a changed plan.