agentsclimarketplace

Qspi xip flash debug

Skill easyzoom/aix-skills/skills/qspi-xip-flash-debug

Reusable Agent Skills for embedded systems, MCU debugging, firmware workflows, and AI automation. (嵌入式、MCU 调试、固件流程与 AI 自动化的可复用 Agent Skills 集合)。

Install
npx -y skills add easyzoom/aix-skills --skill qspi-xip-flash-debug

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when debugging QSPI or OSPI NOR flash, execute-in-place XIP, memory-mapped mode, boot from external flash, cache coherency, dummy cycles, or flash timing

SKILL.md

3.2 KB, 716 tokens by cl100k_base, as published. Nobody here has run it

QSPI XIP Flash Debug

Overview

Use this skill to debug QSPI/OSPI flash by separating electrical bring-up, command mode access, memory-mapped mode, cache policy, linker placement, and boot flow. XIP failures often come from timing and memory attributes.

When To Use

Use this skill when:

  • The user is bringing up external NOR flash over QSPI, OSPI, OctoSPI, FlexSPI, SPIFI, or a similar controller.
  • The issue involves JEDEC ID reads, erase/program failures, memory-mapped mode, XIP, boot from external flash, random hard faults, or cache corruption.
  • The firmware uses external flash for code, assets, filesystem, OTA slots, or mapped resources.

Do not use this skill for generic internal flash programming. Use mcu-flashing-debug or bootloader-debug instead.

First Questions

Ask for:

  • MCU/SoC, external flash part number, controller, board schematic, and voltage.
  • Mode: single/dual/quad/octal, SDR/DDR, memory-mapped, XIP, or command mode.
  • Clock speed, dummy cycles, sample shifting, CS timing, and vendor init table.
  • Linker script, boot ROM expectations, vector location, and cache/MPU settings.
  • Current symptom, JEDEC ID, status registers, and logic analyzer trace if any.

Debug Workflow

  1. Prove command mode slowly. Read JEDEC ID, status registers, erase, program, and readback at conservative speed before enabling memory mapping.

  2. Match flash mode entry. Confirm QE bit, opcode set, address width, dummy cycles, wrap mode, and reset sequence for the exact flash.

  3. Validate memory-mapped mode. Read known patterns from mapped address space and compare with command-mode reads.

  4. Configure cache and MPU. Mark flash XIP as executable/cacheable as appropriate, and device registers as non-cacheable device memory.

  5. Align linker and boot flow. Place vectors, code, rodata, assets, and load addresses according to boot ROM and startup expectations.

  6. Stress timing. Test temperature, voltage, max clock, deep power-down, reset, and suspend states after the basic path works.

Common Failures

  • Flash part has different dummy cycles or QE-bit location than the example.
  • Memory-mapped reads work at low speed but fail at production clock.
  • Linker places writable data or vectors in XIP flash incorrectly.
  • Cache is enabled without invalidation after programming external flash.
  • Boot ROM expects a different image header or flash mode.
  • Deep power-down or reset leaves flash in a mode the controller does not expect.

Verification

Before claiming QSPI/XIP works:

  • State flash part, controller, mode, clock, opcode set, and dummy cycles.
  • Confirm JEDEC ID, erase/program/readback, and mapped reads.
  • Confirm linker placement, vector/boot path, and cache/MPU attributes.
  • Confirm reset and cold boot from the selected flash state.

Example

User:

QSPI XIP 开 cache 后随机 hardfault。

Agent:

  1. Checks mapped flash attributes, linker placement, and fault address.
  2. Compares command-mode and memory-mapped reads.
  3. Verifies cache invalidation after programming and MPU region setup.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.