nuttx/arch/arm
Marco Casaroli e7f9aaa52b
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
arch/arm/rp23xx: Check the flash MTD region against the flash size.
RP23XX_FLASH_MTD_OFFSET and RP23XX_FLASH_MTD_SIZE come from Kconfig.
If the region ends past the end of the flash, the flash wraps the
address around, and an erase or program hits the start of the flash,
where the NuttX image is.  For example, a 4M region at 1M does not
fit on the 4M flash of a Raspberry Pi Pico 2.

Read the JEDEC ID at initialization, in QMI direct mode as the Pico
SDK flash_do_cmd() does, and refuse a region that does not fit.  The
capacity byte is log2 of the size in bytes.  If the ID does not look
valid, warn and do not check.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-07 18:45:43 -03:00
..
include arch/arm/imxrt: ROM api support 2026-10-07 08:20:12 -03:00
src arch/arm/rp23xx: Check the flash MTD region against the flash size. 2026-10-07 18:45:43 -03:00
CMakeLists.txt
Kconfig arch/arm/ra8m1: Add DTC and per-instance SCI FIFO/DTC/termios support 2026-10-06 16:56:58 -03:00