Repository navigation
boards: lib-select uses the build's nRF52 core; reject boards without the env framework; Renesas flash excludes .id_code - #2070
Merged
Merged
Conversation
…mework Behaviour-preserving: the display-name/libraries/root helper moves to module level so resolve_framework has room under clippy's too_many_lines for the nRF52 core selection that follows. Part of #2042 (boards group).
fbuild lib-select showed Adafruit's libraries folder for every nRF52 board, but the Seeed XIAO nRF52840 boards build with Seeed's core since #2030. New fbuild_build::nrf52::installed_cores reuses core_select's selected_framework and the orchestrator's nrf52_packages_from_resolved (platform_packages override included), without downloading. lib-select resolves the board through the build funnel, so board_build.* overrides and project-local boards also apply to its board defines. Part of #2042 (boards group).
…work PlatformIO's BuildFrameworks stops with "This board doesn't support arduino framework!" when the env's framework is not in the board's frameworks list; fbuild failed late in the compiler instead. ensure_board_buildable now takes the env's framework (comma-separated, case-insensitive) and raises UnsupportedBoard for a missing one. A board JSON without a frameworks key is not checked; an empty list supports no framework, as in PlatformIO. ResolutionContext::resolve_board and the daemon's resolve_env_platform pass the env framework. With framework = arduino this rejects 101 bundled boards on supported platforms (Zephyr/mbed/ESP-IDF/bare-metal only); every env under tests/ still passes. Part of #2042 (boards group).
fsp.ld places .id_code in the ID_CODE region (0x01010018), not code flash, and firmware.bin (-j .text -j .data) does not carry it. Counting it against the 256 KiB max_flash gave 28,060 on uno_r4_minima; leaving it out gives 28,032, PlatformIO renesas-ra's SIZEPROGREGEXP figure (.text|.data|.rodata|.text.align|.ARM.exidx). Other platforms keep the generic allocated-with-contents classification. Part of #2042 (boards group).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #2042 (boards group): item 2, the framework check from #2039 / #2055, and the Renesas flash figure left over from #2065.
Item 2:
fbuild lib-selectnow uses the nRF52 core the build usesfbuild lib-selectused to show Adafruit'sframework-arduinoadafruitnrf52/librariesfor every nRF52 board. Since fix(nrf52): build Seeed XIAO nRF52840 boards against Seeed's core (#2017) #2030, the Seeed XIAO nRF52840 boards build with Seeed's core.fbuild_build::nrf52::installed_cores(crates/fbuild-build-arm/src/nrf52/mod.rs) picks the core through the existingcore_select::selected_framework. It then builds the package with the samenrf52_packages_from_resolvedthe orchestrator uses, so the env'splatform_packagesoverride is applied too. Nothing is downloaded.fbuild_build::resolution::resolve_board, soboard_build.*overrides and project-local boards are honored. That board config now also supplies the board defines, which were previously read without overrides.infohelper to module level, soresolve_frameworkstays under the 100-line clippy limit.Framework check (from #2039 / #2055)
ensure_board_buildable(board_id, framework: Option<&str>)now also rejects a bundled board whoseframeworkslist is missing a framework named in the env'sframeworkvalue. That value is comma-separated and matched case-insensitively. PlatformIO'sBuildFrameworks(platformio 6.1.18,builder/tools/piobuild.py) stops with "This board doesn't support arduino framework!" in the same case.frameworkskey, the board is not rejected. Currently no bundled board lacks the key.[]) means the board supports no framework, as in PlatformIO. Three boards on supported platforms have one:at90pwm216andat90pwm316(atmelavr) andsamc21_xpro(atmelsam). They don't build today: onmain,at90pwm216fails in the compiler onpins_arduino.h, andsamc21_xprodownloads the 36 MB SAM core and then fails withunsupported SAM MCU.ResolutionContext::resolve_board, which is the build funnel and reads the env'sframework, and in the daemon'sresolve_env_platform. The freeresolve_boardandplatform_for_boardhave no env and passNone.framework = arduino, 101 bundled boards on supported platforms are now rejected. The guard test pins that number, and it checks that the rejected boards are exactly the ones whose list lacksarduino.tests/were checked, after resolving theesp32c6andadafruit_grand_central_m4aliases. Every one that names a framework lists it.tests/platform/ch559has noframework. Its platform,intel_mcs51, was already rejected.ci/boards.pyboards found in the bundle is rejected.Renesas flash figure (from #2065)
builder/main.pyusesSIZEPROGREGEXP=r"^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+(\d+).*".platform.txtusesrecipe.size.regex=^(?:\.data|\.text|\.rodata)\S*?\s+([0-9]+).*, and itscompiler.elf2hex.bin.flags=-O binary -j .text -j .data.fsp.ldplaces.id_codein theID_CODEregion. Invariants/MINIMA/memory_regions.ld,ID_CODE_START = 0x01010018with length 0x20, whileFLASHis0x0–0x40000..id_codeis neither code flash nor part of firmware.bin. Counting it against the 256 KiBmax_flashwas wrong.RenesasLinker::report_sizenow leaves outNON_CODE_FLASH_SECTIONS = [".id_code"]before the generic classification. On the realuno_r4_minimasection table, flash goes from 28,060 to 28,032, which matches PlatformIO. RAM stays 4,140.Tests
main:ensure_board_buildabletook one argument, andrenesas_size_infoandnrf52_framework_librariesdid not exist.main, lib-select mapped every nRF52 board toNrf52Cores::new, which is Adafruit's core.fbuild-configboard::(133 tests)fbuild-build-engineresolution(11)fbuild-coreelf_size(16)fbuild-build-armrenesas/nrf52(78)fbuild-clilib_select(6)fbuild-daemonhandlers::operations(66)-D warningsis clean, and dylint passes on the touched crates.E2E (dev mode, scratch projects)
fbuild lib-selectonxiaoble_adafruit:framework: framework-arduinoadafruitnrf52-seeed @ .../files-Seeed_nRF52_Boards-1.1.13/.... It selected Adafruit_TinyUSB_Arduino, SPI and Wire from the Seeed core.fbuild lib-selectonadafruit_feather_nrf52840:framework: framework-arduinoadafruitnrf52 @ .../dl-framework-arduinoadafruitnrf52-1.10601.0/....nrf52840_mdk(Zephyr-only nRF52840) withframework = arduino:main: it fetched packages and compiled, then failed in the compiler on Adafruit_TinyUSB (FreeRTOS.h: No such file or directory).board 'nrf52840_mdk' cannot be built by fbuild: it doesn't support the arduino framework (its frameworks: zephyr).at90pwm216now stops with... (its frameworks: none). Onmainit failed in the compiler onpins_arduino.h.tests/platform/nrf52840_dkand a scratchnrf52840_dkblink: 47,308 B flash, 8,584 B RAM.xiaoble_adafruit: 28,348 / 7,476.adafruit_feather_nrf52840: 47,204 / 8,416.uno_r4_minimablink:build succeeded (flash: 28032 bytes, ram: 4140 bytes). It was 28,060 before this change.Not in scope, found during E2E
SPIandWirefolders as include directories only.Wire.begin()fails to link (undefined reference to TwoWire::begin()), even though lib-select selects Wire.crates/fbuild-build-arm/src/nrf52/orchestrator.rs, "Framework library includes").