mirror of
https://github.com/apache/nuttx.git
synced 2026-10-02 19:58:01 +00:00
mtd_partition(mtd, firstblock, nblocks) takes the partition offset and size in units of the underlying device "blocks" (geo.blocksize), not erase blocks. Several board drivers accumulated partoffset and computed the partition size in erase-block units and passed them straight to mtd_partition(), so on devices where blocksize != erasesize (W25/SST25: 256B vs 4KB, SAMD5E5 progmem: 512B vs 8KB) every partition came out erasesize/blocksize (16x) too small and misaligned. Convert partoffset and partszbytes to geo.blocksize units at the mtd_partition() call site while keeping the erase-block accumulation. Affected boards: - stm32f103-minimum (W25) - at32f437-mini (W25) - stm32f429i-disco (SST25F064, enabled in the extflash defconfig) - metro-m4 (SAMD5E5 progmem) Also fix pre-existing nxstyle violations in the touched files so the change passes checkpatch (see CONTRIBUTING.md). Assisted-by: DeepSeek Harness:deepseek-v4-flash Signed-off-by: rongbaichuan <rongbaichuan1027@163.com> |
||
|---|---|---|
| .. | ||
| cloudctrl | ||
| common | ||
| et-stm32-stamp | ||
| fire-stm32v2 | ||
| hymini-stm32v | ||
| maple | ||
| nucleo-f103rb | ||
| olimex-stm32-p107 | ||
| olimexino-stm32 | ||
| shenzhou | ||
| stm32_tiny | ||
| stm32butterfly2 | ||
| stm32f103-minimum | ||
| stm32vldiscovery | ||
| stm3210e-eval | ||
| viewtool-stm32f107 | ||