Skip to content

build_release_files: read the linker memory table when size.json is missing - #11314

Open
lynt-smitka wants to merge 1 commit into
adafruit:mainfrom
MakerClassCZ:ci-language-skip-fallback
Open

build_release_files: read the linker memory table when size.json is missing#11314
lynt-smitka wants to merge 1 commit into
adafruit:mainfrom
MakerClassCZ:ci-language-skip-fallback

Conversation

@lynt-smitka

Copy link
Copy Markdown

On pull requests the languages other than en_US are skipped when the en_US build leaves 10 KB of headroom. That reads firmware.size.json, which raspberrypi, mimxrt10xx, broadcom, silabs, cxd56, renode and zephyr-cp never write, so every PR builds all 17 languages for every board of those ports; a Pico 2 with 190 KB free included. Their link step prints the ld memory usage table (FLASH_FIRMWARE: 1378984 B 1532 KB 87.90%), so when size.json is missing the used and region sizes are taken from that line instead.

…issing

On pull requests the languages other than en_US are skipped when the
en_US build leaves 10 KB of headroom. That decision reads
firmware.size.json, which only the ports that run
tools/build_memory_info.py write (atmel-samd, nordic, stm, espressif,
analog, litex). raspberrypi, mimxrt10xx, broadcom, silabs, cxd56, renode
and zephyr-cp never write it, so the FileNotFoundError was swallowed and
every PR built all 17 languages for every board of those ports, however
much room they had.

All of them print the GNU ld memory usage table
("FLASH_FIRMWARE: 935364 B 1020 KB 89.55%"; zephyr calls the region
FLASH). Parse it from the make output as the fallback.

Measured: pajenicko_picopad (rp2, 190 KB free) 96 s -> 54 s per board
job. For a wide PR this is about 830 machine-minutes (zephyr-cp 635,
raspberrypi 150, mimxrt10xx 33, broadcom 16), and the zephyr-cp board
jobs, the longest of the run, drop from about 35 to about 12 minutes.
Push and release builds are unchanged.
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