Skip to content

fix(renesas): lib-select uses the Portenta core; build the C33 in ci-full (#2131 stage 0) - #2138

Merged
zackees merged 2 commits into
mainfrom
agent/portenta-c33-stage0
Nov 21, 2026
Merged

zackees merged 2 commits into
mainfrom
agent/portenta-c33-stage0

Conversation

@zackees

@zackees zackees commented Nov 21, 2026

Copy link
Copy Markdown
Member

Stage 0 of #2131 (hardware-free). Two commits: the bug fix, and the test project + CI row. No deploy/upload work, no VID/PID anywhere.

1. fbuild lib-select reported the UNO core for a Portenta C33

crates/fbuild-cli/src/lib_select.rs built the Renesas framework from RenesasCores::new, which is always RenesasCoreKind::Uno. The build picks the kind from the MCU family (RenesasCoreKind::for_family), so a C33 project compiled against renesas_portenta while lib-select inspected renesas_uno.

Fix: fbuild_build::renesas::installed_cores(project_dir, env, board) exposes the selection the build already makes (family -> kind, plus the env's platform_packages override) and lib-select calls it. Same shape as nrf52::installed_cores from #2070. No second resolver: it calls the orchestrator's existing renesas_packages_from_resolved.

RED (helper extracted with the old behaviour, new tests failing):

test lib_select::tests::renesas_diagnostic_uses_the_core_the_build_selects ... FAILED
test lib_select::tests::renesas_diagnostic_uses_platform_package_override ... FAILED
  left: ".../platforms/arduino-ArduinoCore-renesas_uno-1.6.0/286186c7c4952653/1.6.0/ArduinoCore-renesas/libraries"
 right: ".../platforms/arduino-ArduinoCore-renesas_portenta-1.6.0/342ca2c492966a14/1.6.0/libraries"
test result: FAILED. 0 passed; 2 failed

GREEN:

test lib_select::tests::renesas_diagnostic_uses_platform_package_override ... ok
test lib_select::tests::renesas_diagnostic_uses_the_core_the_build_selects ... ok
test result: ok. 8 passed; 0 failed   (soldr cargo test -p fbuild-cli --bin fbuild lib_select)

Real binary, on the new project and on the UNO R4 WiFi one:

$ FBUILD_DEV_MODE=1 target/debug/fbuild lib-select tests/platform/portenta_c33 -e portenta_c33 --json
"libraries_dir": ".../platforms/arduino-ArduinoCore-renesas_portenta-1.6.0/342ca2c492966a14/1.6.0/ArduinoCore-renesas/libraries"
$ FBUILD_DEV_MODE=1 target/debug/fbuild lib-select tests/platform/uno_r4_wifi -e uno_r4_wifi --json
"libraries_dir": ".../platforms/arduino-ArduinoCore-renesas_uno-1.6.0/286186c7c4952653/1.6.0/ArduinoCore-renesas/libraries"

Decision: what name lib-select reports

  • (a) Keep framework-arduinorenesas for both cores (chosen). The bug is the directory; the name is unchanged for UNO R4 users and scripts.
  • (b) Report the kind's registry key (framework-arduinorenesas-uno / -portenta). More precise, but changes existing UNO R4 output in a bug-fix commit.
  • (c) Add a core field to the JSON. New output surface nobody asked for.

2. tests/platform/portenta_c33/ and a ci-full row

Blink project mirroring tests/platform/uno_r4_wifi/ (with READMEs), a row in tests/platform/README.md, and a ci-full.yml matrix row beside the UNO R4 WiFi.

Decision: how to add a ci-full row without a new workflow file

ci-full.yml is rendered from ci/board_families.json, and the renderer required every SOT board to own a build-<board>.yml (it fails on "SOT references workflows that don't exist on disk"). The issue and the repo owner's standing rule both say no new workflow file.

  • (a) Add build-portenta_c33.yml like every other board. Rejected: a new workflow file.
  • (b) Hand-edit ci-full.yml. Rejected: render_workflows.py --check (ci-workflow-drift.yml) fails on the next run.
  • (c) Mark the board "matrix_only": true in the SOT (chosen). The renderer and select_boards.py learn that such a board has no file: it is in the ci-full matrix and in the path-selected PR board matrix, and is never handed to the nightly dispatcher (gh workflow run on a file that does not exist would fail the dispatch job). Its workflow value is an id without .yml.
  • (d) Leave CI alone and rely on the Windows-only ignored acceptance test. Rejected: that is gap 5 of the issue.

Consequence of (c): the C33 has no README badge and no nightly run of its own. It builds on ci-full (release validation) and on any PR that touches crates/fbuild-build-arm/src/renesas/** or its test dir. docs/BOARD_STATUS.md and the root README list badges per workflow file, so they are unchanged.

Only ci-full.yml changed on re-render; the 80 build-*.yml, ci-test.yml, ci-minimal.yml and nightly-platforms.yml are byte-identical.

Verification

  • soldr cargo test -p fbuild-cli --bin fbuild lib_select -- 8 passed; soldr cargo test -p fbuild-build-arm renesas -- 45 passed
  • soldr cargo clippy -p fbuild-cli -p fbuild-build-arm --all-targets -- -D warnings
  • uv run --no-sync python -m ci.run_dylint --package fbuild-cli / --package fbuild-build-arm
  • uv run --with pyyaml --no-project python -m unittest ci.test_select_boards ci.test_fractional_workflows -- 54 passed
  • uv run --no-project python ci/render_workflows.py --check -- clean
  • ruff, basedpyright (ci/check_python_types.py: 0 errors), ci/check_python_complexity.py

Not verified locally: a full fbuild build of the new project (the dev daemon on this machine belongs to another session). The Arduino Portenta C33 job of ci-full on this PR is that proof.

Refs #2131 (stays open for the hardware-blocked stages).

Add tests/platform/portenta_c33 (blink) and a ci-full matrix row beside the
UNO R4 WiFi, so Linux builds the C33 as well as the Windows-only ignored
acceptance test.

ci-full.yml is rendered from ci/board_families.json, and every SOT board had
to own a build-<board>.yml. Adding a workflow file is not allowed, so a board
can now be marked "matrix_only": it is built by the ci-full matrix and the
path-selected PR boards, has no workflow file, and is never handed to the
nightly dispatcher.

Refs #2131
`fbuild lib-select` built its Renesas framework from `RenesasCores::new`,
which is always the `renesas_uno` core, so a Portenta C33 project reported
the UNO core's libraries dir while the build compiled against
`renesas_portenta`.

Expose `renesas::installed_cores` (the family -> core kind selection and
platform_packages override the build already uses, as nrf52::installed_cores
does for #2042) and use it from lib-select.

Refs #2131
@zackees zackees added the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 2cc5aa4 Nov 21, 2026
160 of 168 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 22, 2026
@zackees
zackees deleted the agent/portenta-c33-stage0 branch November 24, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run the complete release-equivalent CI matrix on this PR SHA

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant