Skip to content

ci: stop building every translation on five Zephyr boards - #11336

Merged
tannewt merged 4 commits into
adafruit:mainfrom
MakerClassCZ:fix-sparse-image
Sep 10, 2026
Merged

tannewt merged 4 commits into
adafruit:mainfrom
MakerClassCZ:fix-sparse-image

Conversation

@lynt-smitka

Copy link
Copy Markdown

Five Zephyr boards build all 17 translations on a pull request, for two reasons.

The three native_* boards link a host executable with no flash region in the map, so there is nothing to measure, no firmware.size.json, and a missing one means build them all. native_native_sim spends 21 of its 26 minutes there.

renesas_ek_ra8d1 and renesas_ek_ra6m5 keep their option bytes 16 MB above flash, so zephyr.bin is sparse and its size is the span. Both report 16818896 bytes used of a 2 MB region and never fit.

A board whose only artifact is a host executable has no flash to fit in, so it skips them now. An image bigger than its region is measured from the hex instead: ra8d1 reads 523932 bytes, 4 bytes from ld's own --print-memory-usage. About 85 minutes per run that builds Zephyr.

CIRCUITPY_BUILD_EXTENSIONS is ["exe"] on those three boards. build_memory_info.py gives the same numbers as before on 30 linker maps from three ports.

objcopy writes one image from the lowest address to the highest, so a board
with a region far above the firmware one gets a sparse file whose size is the
span rather than the usage. renesas_ek_ra8d1 keeps its option bytes 16 MB
above flash and reports 16818896 bytes used of 2064384, so it never looks
like it fits and every language is built.

When the image is larger than the region it has to fit in, it cannot be a
usage figure. Take the bytes the hex puts inside the region instead:
renesas_ek_ra8d1 now reads 523932 bytes, 4 bytes from what ld's own
--print-memory-usage table prints.

Unchanged on 30 local maps across atmel-samd, raspberrypi and zephyr-cp.
The three native_* Zephyr boards link a host executable, so there is no
zephyr.bin, build_memory_info has nothing to measure and writes no
firmware.size.json. The missing file reads as "size unknown, build them
all", which is right for a board with flash and pointless for one without:
native_native_sim spends 21 of its 26 minutes proving that 16 translations
fit in a flash it doesn't have.

A board whose only artifact is a host executable skips them, like a board
with room to spare. CIRCUITPY_BUILD_EXTENSIONS == ["exe"] holds for the
three native_* boards and for no other board in any port.
regions_from_map() returns (origin, length) now and the RAM line still
read it as a length, so every board with a RAM region failed after
printing the flash line.

@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.

Thank you!

@tannewt
tannewt merged commit c538c87 into adafruit:main Sep 10, 2026
686 checks passed
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