GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zephyr-cp: build ulab, and let boards opt out by mikeysklar · Pull Request #11245 · adafruit/circuitpython

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Aug 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What

Builds ulab on zephyr-cp and adds CIRCUITPY_ULAB so boards that cannot spare the flash can turn it off. On by default; two boards opt out.

Why

zephyr-cp builds without py/circuitpy_mpconfig.mk, so the ulab wiring every other port gets from py/py.mk does not exist here and ulab could not be built at all. This adds the flags and sources the same way py.mk does.

It costs roughly 90 KB, so the two boards without room set CIRCUITPY_ULAB = false in their circuitpython.toml:

  • nordic_nrf7002dk is at 99.73% of flash, under 3 KB free.
  • st_nucleo_n657x0_q has no internal user flash and executes from RAM, which is already 93% full. CI caught this one; ulab overflowed it by 56520 bytes.

Every other board has at least 135 KB of headroom in whichever region holds code.

Hardware tested

Build only, which is the whole surface of this change. On silabs_siwx917_dk2605a:

build flash
main 799136 B, 76.21%
this PR, ulab off 799136 B, byte-identical to baseline
this PR, ulab on 890168 B, 84.89%, +91032 B, 163 ulab sources

Both opt-out boards were built locally to confirm they link, and the full CI matrix is green.

Not tested: importing ulab on hardware.

Scope

Build plumbing and two board opt-outs. No docs change.

AI assistance

Written with Claude Code. I ran the builds and compared the figures myself.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tannewt
tannewt requested changes Aug 25, 2026
View reviewed changes

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please do include some changes in the circuitpython.tomls to show how it looks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ports/zephyr-cp/cptools/build_circuitpython.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mikeysklar
zephyr-cp: build ulab, and let boards opt out
b7cdd2f
zephyr-cp builds without py/circuitpy_mpconfig.mk, so the ulab wiring every
other port gets from py/py.mk does not exist here and ulab cannot be built at
all. This adds the flags and sources the way py.mk does.

ulab is on by default. Boards that cannot spare the flash set
CIRCUITPY_ULAB = false in their circuitpython.toml, which nordic_nrf7002dk
does here: it has under 3 KB of headroom before this change and ulab costs
about 90 KB.

Flash cost measured on silabs_siwx917_dk2605a: 799136 to 890168 bytes,
76.21% to 84.89% of 1 MB, with 163 ulab sources compiled.

Headroom on the other zephyr-cp boards that report a flash figure is at least
135 KB, so nrf7002dk is the only one that has to opt out.
@mikeysklar
mikeysklar force-pushed the zephyr-cp/ulab-opt-in branch from 3b653fe to b7cdd2f Compare August 25, 2026 17:17
@mikeysklar

mikeysklar commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

Defaults on now, and bool() is gone, TOML gives a real bool.

Added the opt-out to nordic_nrf7002dk to show how it looks. It is the only board that needs one. Flash headroom before ulab, from the last green run:

nordic_nrf7002dk      2584 B      99.73% used
nordic_nrf54l15dk   135524 B      81.41% used
everything else     more

ulab costs about 91 KB, measured on siwx917_dk2605a, 799136 to 890168 bytes. That is headroom from the logs rather than a build with ulab on, so CI on this push is the real check.

tannewt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikeysklar
zephyr-cp: opt nucleo_n657x0_q out of ulab
aa83082
CI caught this one. The STM32N6 has no internal user flash and executes from
RAM, which is already 93% full at 486984 of 523264 bytes, so the roughly 90 KB
ulab adds overflows it by 56520 bytes.

My earlier headroom survey only looked at FLASH figures and this board reports
none, so it was missing from it. Rechecked both regions for every board: this
is the only other one that cannot fit, and nordic_nrf7002dk stays out on flash.
@mikeysklar mikeysklar changed the title zephyr-cp: allow boards to opt in to ulab zephyr-cp: build ulab, and let boards opt out Aug 26, 2026
tannewt
tannewt approved these changes Aug 26, 2026
View reviewed changes

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tannewt
tannewt merged commit 93fb91e into adafruit:main Aug 26, 2026
15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikeysklar mikeysklar mentioned this pull request Sep 10, 2026
zephyr-cp/nrf7002dk: give slot0 the unused 32 KB storage partition #11335
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tannewt tannewt tannewt approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mikeysklar @tannewt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.