Skip to content
Development
Skill

/bootloader-debug

Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot selection failures

From plugin
aix-skills
3976 skills

Claude Code

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

SKILL.md

bootloader-debug.SKILL.md
name: bootloader-debug
description: Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot selection failures

Bootloader Debug

Overview

Use this skill to debug bootloader and application handoff problems without destroying recovery paths. Verify memory layout, image metadata, vector table, stack pointer, reset handler, validation, and rollback state before reflashing or erasing boot regions.

When To Use

Use this skill when:

  • A bootloader cannot start an application or jumps to the wrong image.
  • OTA/upgrade succeeds but the new firmware does not boot.
  • The issue involves image headers, checksums, signatures, slots, rollback, vector table relocation, or boot pins.
  • The user mentions MCUboot, U-Boot, vendor bootloader, IAP, DFU, app offset, or recovery mode.

Do not use this skill for ordinary application crashes after a confirmed clean handoff; use `embedded-fault-debug`. For MCUboot-specific slot/signing/swap issues, use `mcuboot-integration`. For OTA delivery pipeline issues, use `ota-update-integration`.

First Questions

Ask for:

  • Chip/board and bootloader type.
  • Memory map: bootloader, app slot, scratch, config, NVM, and backup areas.
  • Image format and validation: raw binary, HEX, signed image, checksum, metadata header.
  • Upgrade state: active slot, pending, confirmed, rollback, recovery, or unknown.
  • Logs from bootloader and application if available.
  • Whether recovery access still works.

Workflow

1. Protect recovery. Do not erase bootloader, recovery slot, calibration, or persistent upgrade state without explicit approval.

1. Confirm memory layout. Compare linker script, flash programming address, image header, and bootloader slot configuration.

1. Validate handoff basics. For MCU apps, check initial SP and reset handler at the application offset. For Linux boot, check kernel, device tree, rootfs, and bootargs.

1. Check image decision logic. Inspect version, checksum/signature, pending/confirmed flags, rollback counters, and slot priority.

1. Trace the jump. Halt before handoff, inspect target SP/PC, vector table relocation, interrupts, clocks, caches, and peripheral state.

1. Ask before destructive recovery. Erasing slots, clearing flags, disabling signature checks, or rewriting boot config requires approval.

MCU Handoff Checks

  • Application offset matches linker origin.
  • Vector table word 0 is valid RAM stack pointer.
  • Vector table word 1 is valid reset handler address.
  • VTOR or equivalent vector relocation is set when required.
  • Interrupts are disabled or cleaned up before jump.
  • MSP/PSP is set correctly for the application.
  • Caches, MPU, clock tree, and peripherals left by bootloader are expected by app.

Upgrade And Rollback Checks

  • Image header is at the offset the bootloader expects.
  • Length, checksum, signature, and version fields match.
  • Pending/confirmed flags reflect intended state.
  • Rollback reason is logged before clearing it.
  • Power-fail update path preserves at least one bootable image.

Verification

Before claiming progress:

  • State bootloader type, memory map, active slot, and application offset.
  • Report whether image validation passed or which check failed.
  • Report target SP/PC for app handoff when MCU-based.
  • State whether recovery remains available.
  • List destructive operations skipped or awaiting approval.

Common Failures

  • Flashing the app at flash base when the bootloader expects an offset.
  • Forgetting vector table relocation.
  • Clearing rollback flags before recording why rollback happened.
  • Disabling validation to "test quickly" without preserving recovery.
  • Leaving interrupts or peripherals active across app jump.

Example

User:

Bootloader 能跑,但跳 app 后死掉。

Agent:

1. Asks for memory map, app offset, linker script, boot log, and image header. 1. Checks app vector table SP/PC at the slot offset. 1. Verifies VTOR, interrupts, stack setup, and image validation before reflashing.

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
canbus-integration

canbus-integration

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

@easyzoom@easyzoomInstall Skill
canopen-integration

canopen-integration

Use when integrating, configuring, or debugging CANopen nodes, object dictionaries, NMT, SDO, PDO, heartbeat, SYNC, EMCY, EDS/DCF…

@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 bootloader-debug.

Which coding agents can use bootloader-debug?
bootloader-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.