[spi_nor, boards, tests, docs] Add SPI-NOR flash driver. Add W25Q64 peripheral.#19
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an opt-in SPI-NOR flash peripheral system integration, including a new generic SPI-NOR flash driver (with multiple addressing-mode variants) and a Winbond W25Q64 peripheral configuration, plus test and documentation updates to auto-discover and test enabled peripherals.
Changes:
- Introduce
whal_SpiNor_*SPI-NOR flash driver implementing thewhal_Flashinterface, with 3-byte, dedicated-4B, 4B-mode, and EAR banked variants. - Add a peripheral registry for flash devices (
g_peripheralFlash[]) and integrate peripheral flash init/deinit + flash test iteration. - Add docs and CI updates for the peripheral system and SPI-NOR driver compilation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
wolfHAL/flash/spi_nor.h |
New public SPI-NOR driver API + config struct and variant entry points. |
src/flash/spi_nor.c |
New SPI-NOR flash driver implementation and default vtable. |
boards/peripheral/flash/spi_nor_w25q64.{c,h} |
New W25Q64 peripheral instantiation using SPI-NOR driver. |
boards/peripheral/peripheral.{c,h} |
Add flash peripheral registry type + g_peripheralFlash[] array. |
boards/peripheral/Makefile.inc |
Always build peripheral registry; conditionally build SPI-NOR peripheral + driver. |
boards/stm32wb55xx_nucleo/board.c |
Initialize/deinitialize peripheral flash devices using registry. |
tests/flash/test_flash.c |
Iterate and run flash tests over g_peripheralFlash[] entries. |
tests/README.md |
Document enabling peripheral devices and auto-testing behavior. |
docs/adding_a_peripheral.md |
New guide describing peripheral layout, registry, build flags, and board hooks. |
boards/stm32wb55xx_nucleo/linker.ld |
Update memory region declarations for the board. |
README.md |
Link to the new “Adding a Peripheral” doc. |
.github/workflows/ci.yml |
Ensure src/flash/spi_nor.c is built in CI matrix. |
tests/main.c |
Trivial formatting change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
115f0ae to
9b72c60
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 16 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.