Skip to content

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

Merged
tannewt merged 2 commits into
adafruit:mainfrom
mikeysklar:nrf7002dk-reclaim-storage
Sep 10, 2026
Merged

zephyr-cp/nrf7002dk: give slot0 the unused 32 KB storage partition#11335
tannewt merged 2 commits into
adafruit:mainfrom
mikeysklar:nrf7002dk-reclaim-storage

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

What

Delete the unused 32 KB storage_partition on nordic_nrf7002dk and give it to slot0. Settings is turned off to match.

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

Why

This board is the port's flash ceiling. CI builds it for nearly every core PR, so additions get gated here.

PR Turned off on nrf7002dk
#11229 radio.ping()
#11245 ulab
#11309 connect() with a scan result
#11334 msgpack, 176 B short, to be reverted after this

How I tested it

Built on Linux against the pinned Zephyr. CI's nordic_nrf7002dk build also passes.

Build Result
Without CONFIG_SETTINGS=n fails in settings_nvs.c, storage_partition undeclared
With it builds, 965,896 B image in 999,424 B slot0
.config diff only SETTINGS and its 12 sub-options change
Kconfig one new non-fatal warning, SETTINGS_NVS_SECTOR_COUNT from prj.conf

Hardware tested

None. I don't have an nRF7002 DK, so this needs someone with the board to boot it. Ordered board 9/10. Expected hardware test on 9/11.

Scope

Settings stays on port-wide. This is the first board without storage_partition; the nRF52840 Zephyr boards move it.

AI assistance

Claude traced the CI failure, wrote the board.conf change and ran the build on my Linux machine.

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>
The port Kconfig defaults SETTINGS to y and prj.conf enables its NVS
backend, which opens storage_partition. The previous commit deleted
that partition, so the build failed in settings_nvs.c. Only _bleio
uses settings, and this board has CONFIG_BT=n.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

@tannewt
tannewt merged commit a156588 into adafruit:main Sep 10, 2026
15 checks passed
mikeysklar added a commit to mikeysklar/circuitpython that referenced this pull request Sep 10, 2026
adafruit#11335 gave the nRF7002 DK the flash it needed, so every board gets
connect(network=). Removes CIRCUITPY_WIFI_CONNECT_NETWORK.

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.

2 participants