bootloader-debug
Skill36 starsChanged 5 months agoMITView on GitHub
Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot selection failures
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmbacktrace-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- fatfs-integrationSkill
- flashdb-integrationSkill
- freemodbus-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nanopb-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rtos-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to debug bootloader and application handoff problems without destroying recovery paths.
- Distinctive: line 14
Use this skill when:
- Very specific: line 21
Do not use this skill for ordinary application crashes after a confirmed clean handoff.
- Distinctive: line 37
Do not erase bootloader, recovery slot, calibration, or persistent upgrade state without explicit approval.
- Distinctive: line 45
Check image decision logic.
- Distinctive: line 51
Ask before destructive recovery.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Protect recovery. Do not erase bootloader, recovery slot, calibration, or persistent upgrade state without explicit approval.
- Confirm memory layout. Compare linker script, flash programming address, image header, and bootloader slot configuration.
- 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.
- Check image decision logic. Inspect version, checksum/signature, pending/confirmed flags, rollback counters, and slot priority.
- Trace the jump. Halt before handoff, inspect target SP/PC, vector table relocation, interrupts, clocks, caches, and peripheral state.
- 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:
- Asks for memory map, app offset, linker script, boot log, and image header.
- Checks app vector table SP/PC at the slot offset.
- Verifies VTOR, interrupts, stack setup, and image validation before reflashing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

