mirror of
https://github.com/apache/nuttx.git
synced 2026-09-04 08:04:02 +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> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| dummy | ||
| hc/m9s12 | ||
| mips | ||
| misoc/lm32/misoc | ||
| or1k/mor1kx/or1k | ||
| renesas | ||
| risc-v | ||
| sim/sim/sim | ||
| sparc | ||
| tricore | ||
| x86/qemu/qemu-i486 | ||
| x86_64/qemu/qemu-intel64 | ||
| xtensa | ||
| z16/z16f/z16f2800100zcog | ||
| z80 | ||
| .gitignore | ||
| Board.mk | ||
| boardctl.c | ||
| CMakeLists.txt | ||
| dummy.c | ||
| Kconfig | ||
| Makefile | ||