Skip to content
Development
Skill

/mcu-flashing-debug

Use when MCU firmware download, flashing, erase, verify, probe connection, boot mode, read protection, or programmer tool operations fail

From plugin
aix-skills
3976 skills

Claude Code

$ npx -y skills add easyzoom/aix-skills --skill mcu-flashing-debug --agent claude-code

SKILL.md

mcu-flashing-debug.SKILL.md
name: mcu-flashing-debug
description: Use when MCU firmware download, flashing, erase, verify, probe connection, boot mode, read protection, or programmer tool operations fail

MCU Flashing Debug

Overview

Use this skill to debug MCU programming failures safely. Separate connection, erase, program, verify, and reset problems before recommending mass erase, option byte changes, security unlock, or boot configuration changes.

When To Use

Use this skill when:

  • Firmware cannot be downloaded or flashed to an MCU.
  • The programmer reports connect, erase, program, verify, timeout, locked, protected, or target voltage errors.
  • The user mentions ST-Link, J-Link, CMSIS-DAP, OpenOCD, pyOCD, STC-ISP, WCH-Link, Nu-Link, vendor programmers, boot pins, ISP, IAP, DFU, or UART bootloader.

Do not use this skill for application-level bugs after a confirmed successful program/verify/run cycle. For probe-specific debugging (OpenOCD scripts, J-Link config, adapter speed), use `openocd-jlink-stlink-debug`.

First Questions

Ask for:

  • MCU part number and board.
  • Programmer/probe and connection method.
  • Tool name and exact error output.
  • Firmware artifact path/type: ELF, HEX, BIN, IHX, UF2, or vendor package.
  • Whether erase, program, verify, and reset are separate steps in the tool output.
  • Target voltage, reset wiring, boot pins, and whether the board is externally powered.

Workflow

1. Classify the failing step. Do not treat "download failed" as one problem. Identify connect, erase, program, verify, reset, or run failure.

1. Confirm physical and electrical basics. Check power, ground, target voltage sense, reset line, boot pins, and signal wiring before changing software.

1. Confirm tool-target match. Verify exact chip model, flash algorithm, probe interface, target config, and firmware address.

1. Lower risk before increasing force. Try lower adapter speed, connect-under-reset, separate erase/program/verify, and fresh rebuild before mass erase.

1. Preserve logs. Capture programmer output and avoid repeated blind retries.

1. Ask before destructive operations. Mass erase, security unlock, option byte writes, readout protection changes, bootloader erase, and config fuse changes require explicit approval.

Method Checks

SWD/JTAG

  • Confirm SWDIO/TMS, SWCLK/TCK, RESET, GND, and VTref.
  • Lower adapter clock for long wires or unstable power.
  • Try connect-under-reset when firmware disables debug pins or enters low power.
  • Confirm the debug probe can see target voltage.
  • Confirm readout protection or secure debug is not blocking access.

UART/ISP/IAP

  • Confirm TX/RX cross, common ground, boot pin state, reset/power-cycle sequence, and baud behavior.
  • Confirm the chip actually contains a ROM bootloader or vendor ISP mode.
  • Confirm USB-to-UART voltage level matches target IO voltage.
  • Confirm selected chip model and serial port.

USB DFU/Bootloader

  • Confirm boot mode entry sequence.
  • Confirm USB enumeration and permissions.
  • Confirm package format and target address.
  • Preserve existing bootloader or calibration regions unless explicitly approved.

Verification

Before claiming flashing is fixed:

  • Report connect, erase, program, verify, and reset/run status separately.
  • State the programmer, target chip, interface, adapter speed, firmware artifact, and programmed address.
  • Confirm whether destructive actions were avoided, skipped, or explicitly approved.
  • If verify fails, report the first failing address or range if the tool provides it.

Common Failures

  • Recommending mass erase before confirming wiring and target voltage.
  • Selecting a similar but wrong MCU in the programmer.
  • Flashing a binary to the wrong base address.
  • Ignoring verify failures because program appeared to succeed.
  • Forgetting boot pin or reset timing for UART bootloaders.

Example

User:

OpenOCD 连接 STM32 总是 timeout,下载不了。

Agent:

1. Asks for exact chip, probe, OpenOCD configs, wiring, target voltage, and error log. 1. Separates connect failure from flash failure. 1. Suggests lower SWD speed and connect-under-reset before erase. 1. Asks before readout protection or mass erase operations.

Read more
@easyzoom
Ships withaix-skills

AIX Skills is a public collection of Agent Skills, templates, and references for building repeatable AI workflows.

Stars on GitHub

Momentum

stars in total
39
Star history of easyzoom/aix-skills on GitHub, a chart by star-history.com

Other skills on aix-skills.

8051-mcu-debug

8051-mcu-debug

Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers,…

@easyzoom@easyzoomInstall Skill
avem-integration

avem-integration

Use when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers,…

@easyzoom@easyzoomInstall Skill
ble-gatt-integration

ble-gatt-integration

Use when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications,…

@easyzoom@easyzoomInstall Skill
bootloader-debug

bootloader-debug

Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image…

@easyzoom@easyzoomInstall Skill
canbus-integration

canbus-integration

Use when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing,…

@easyzoom@easyzoomInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about mcu-flashing-debug.

Which coding agents can use mcu-flashing-debug?
mcu-flashing-debug installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.