mcu-variables

Read, trend, export, and write Cortex-M MCU variables resolved from ELF and DWARF data.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Embedded developers need to inspect and tune live firmware variables without stopping the target or adding instrumentation code. This Skill reads Cortex-M memory non-intrusively through OpenOCD, resolves variable names and types from ELF/DWARF debug data, and supports trending, CSV export, and confirmed RAM writes. ## Core Features & Use Cases - Live Variable Reads: Read scalars, struct members, and array elements by name with types inferred from DWARF, preserving exact 64-bit valueText. - Trend Analysis & CSV Export: Sample variables over time with statistical summaries (slope, direction, min/max) and export chart history to CSV with flexible time ranges. - Shared Sampling Control: Start, stop, and query the persistent sidebar/chart sampling session shared with the EmberProbe UI. - Confirmed Variable Writes: Modify RAM variables through a two-step confirmation flow with readback verification and optional 24-hour workspace trust. - Use Case: While tuning a motor control loop, ask the agent to trend the speed_error variable for 10 seconds, then explicitly request setting kp=0.5 and confirm the write plan to verify the new gain takes effect. ## Quick Start Ask the agent to read the current value of a firmware variable by name, for example to read the variable counter from the connected target.

Frequently Asked Questions about mcu-variables

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

FAQPage Schema
How do I read live MCU variable values without stopping the target?▼

Run scripts/read.js with --workspace and --variables followed by variable names. The extension resolves types from DWARF data and reads memory non-intrusively through OpenOCD, reusing an existing sampling connection or starting a temporary one.

How to export MCU variable history to CSV?▼

Use read.js with --export-csv, --variables, and a time range such as --last 30 for the past 30 seconds. Add --output with a workspace-relative path to write the CSV file, or omit it to receive the data inline.

Can I read struct members and array elements from firmware?▼

Yes, DWARF path syntax supports struct members like sensor.pos.y, array elements like buf[0], ranges like buf[1:5], and full arrays with buf[*]. Whole composites return a reporting tree but cannot be trended.

Why does a variable write require a confirmation ID?▼

Writing RAM changes firmware behavior immediately, so the first write request returns a plan with a confirmationId showing resolved addresses, types, and values. Repeating the request with --confirm and that ID executes the write with readback verification.

What does WRITE_VERIFY_FAILED mean after a variable write?▼

WRITE_VERIFY_FAILED means the readback value differs from what was written, commonly because firmware immediately overwrote the variable. Do not retry blindly; check whether the firmware actively updates that memory location.

Does reading variables work while a debug session is running?▼

Reads during an EmberProbe-managed running debug target are limited to writable allocated ELF RAM, and a paused session may use DAP memory. User-managed sessions are never paused implicitly by the Skill.