Skip to content

zephyr-cp/nrf7002dk: give slot0 the unused 32 KB storage partition - #11335

Open
mikeysklar wants to merge 1 commit into
adafruit:mainfrom
mikeysklar:nrf7002dk-reclaim-storage
Open

zephyr-cp/nrf7002dk: give slot0 the unused 32 KB storage partition#11335
mikeysklar wants to merge 1 commit into
adafruit:mainfrom
mikeysklar:nrf7002dk-reclaim-storage

Conversation

@mikeysklar

Copy link
Copy Markdown
Collaborator

What

nordic_nrf7002dk reserves 32 KB for storage_partition. Nothing reads it: the only
settings user is _bleio, and this board sets CONFIG_BT=n.

Partition Before After
boot 0x000000 + 0x00C000 unchanged
slot0 0x00C000 + 0x0EC000 0x00C000 + 0x0F4000
slot1 deleted deleted
storage 0x0F8000 + 0x008000 deleted

0x0C000 + 0x0F4000 = 0x100000, end of flash. CIRCUITPY is on the external mx25r64 on spi4.

Why

This board is the port's flash ceiling. shared-bindings additions overflow it and get
gated per board, most recently in #11309.

Testing

Not built. I don't have a nRF7002 to verify with. Opening it so someone with the board can check.

AI assistance: Claude read the devicetree and git history and drafted the change. I have
not built or run it.

nordic_nrf7002dk reserves 32 KB for storage_partition. Nothing reads it:
the port's only settings user is common-hal/_bleio/Adapter.c:351, and this
board sets CONFIG_BT=n. CIRCUITPY is on the external mx25r64 on spi4, not
internal flash.

0xC000 + 0xF4000 = 0x100000, exactly the end of the nRF5340 application
core's 1024 KB internal flash.

Not built. I don't have a nRF7002 to verify with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mikeysklar added a commit to mikeysklar/circuitpython that referenced this pull request Sep 10, 2026
The ja translation overflows FLASH by 176 bytes on this board with the
MicroPython v1.28.0 update. The board is at 99.99% on main, with 80 bytes free
in that translation, so a routine upstream release does not fit. The other 12
translations build.

The three new upstream modules are not the cause. On a board build py/modstring.c,
py/modweakref.c and py/objtemplate.c all have zero .text, no symbols in the ELF
and none of their error strings in the binary, because their feature gates sit
above CircuitPython's ROM level. The growth is ordinary expansion across py/.

msgpack is chosen because it is self contained and has no tie to any peripheral
on this board, so nothing else loses a capability.

This is temporary. adafruit#11335 gives slot0 the unused 32 KB storage partition, which
is 186 times the shortfall, and this gate should be reverted when that lands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant