qspi-xip-flash-debug
Skill36 starsChanged 5 months agoMITView on GitHub
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
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- 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
- 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
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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 QSPI/OSPI flash by separating electrical bring-up, command mode access, memory-mapped mode, cache policy, linker …
- Distinctive: line 16
Use this skill when:
- Very specific: line 25
Do not use this skill for generic internal flash programming.
- Distinctive: line 41
Read JEDEC ID, status registers, erase, program, and readback at conservative speed before enabling memory mapping.
- Distinctive: line 49
Read known patterns from mapped address space and compare with command-mode reads.
- Distinctive: line 57
Place vectors, code, rodata, assets, and load addresses according to boot ROM and startup expectations.
- Distinctive: line 61
Test temperature, voltage, max clock, deep power-down, reset, and suspend states after the basic path works.
- Distinctive: line 75
Before claiming QSPI/XIP works:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
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
- Prove command mode slowly. Read JEDEC ID, status registers, erase, program, and readback at conservative speed before enabling memory mapping.
- Match flash mode entry. Confirm QE bit, opcode set, address width, dummy cycles, wrap mode, and reset sequence for the exact flash.
- Validate memory-mapped mode. Read known patterns from mapped address space and compare with command-mode reads.
- Configure cache and MPU. Mark flash XIP as executable/cacheable as appropriate, and device registers as non-cacheable device memory.
- Align linker and boot flow. Place vectors, code, rodata, assets, and load addresses according to boot ROM and startup expectations.
- 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:
- Checks mapped flash attributes, linker placement, and fault address.
- Compares command-mode and memory-mapped reads.
- Verifies cache invalidation after programming and MPU region setup.
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.

