Repository navigation
feat(renesas): support the Portenta C33 (renesas_portenta core, RA6M5) - #2091
Merged
Merged
Conversation
…a (RA6M5) The Portenta C33 was rejected before the build because fbuild only knew the `arduino:renesas_uno` core and only had an RA4M1 MCU config (#2054). - `RenesasCores` takes a `RenesasCoreKind`: `uno` (default, unchanged) or `portenta`, a second pinned download (`ArduinoCore-renesas_portenta-1.6.0`, SHA-256 from Arduino's package_index.json) installed under its own cache name so both cores can coexist. `platform_packages` for the Portenta board is `framework-arduinorenesas-portenta`. - The board's MCU picks the core package and the MCU config through one mapping, `renesas_mcu_family` (`RA4M1`/`R7FA4M1…` -> ra4m1, `R7FA6M5BH2CBG`/`ra6m5` -> ra6m5). Both the build and `fbuild install` provision the same package. - `configs/ra6m5.json`: Cortex-M33, `-mfpu=fpv5-sp-d16`, hard float, and the link libraries the package's `boards.txt` gives `portenta_c33` (`-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys`). The variant's prebuilt `libs/libfsp.a` and `fsp.ld` are picked up by the existing linker path. - Bundled libraries come from the core's own `libraries/` tree through the existing `framework_libs` selection, so `Wire`, `SPI`, `WiFi` … link for the C33 with no orchestrator change. - `portenta_c33.json` loses `unsupported_reason` and leaves the reject list; the guard/daemon/build-engine tests that used it as the "rejected board" example now use `wasm` (still unimplemented). Builds an actual blink (RA6M5, no board attached needed) and a Wire sketch; see the PR body for the receipts. Fixes #2054
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
What this does
Makes
board = portenta_c33build (#2054). The bundled board datawas already right since #2025; what was missing was a core package and an MCU
config.
Core package —
RenesasCoresnow carries aRenesasCoreKind:Uno(default; every existing call site andwith_overridebehaviour isunchanged) and
Portenta, a second pinned, checksummed download(
ArduinoCore-renesas_portenta-1.6.0.tar.bz2, SHA-256363d1aae…5d5896a0from Arduino'spackage_index.json) installed under its owncache name (
renesas-portenta-core), so installing one core never satisfies oroverwrites the other.
Selection —
renesas_mcu_family(mcu)is the one mapping from a board'smcufield to the family:RA4M1/R7FA4M1…→ra4m1,R7FA6M5BH2CBG/ra6m5→
ra6m5. It picks both the MCU config and the core package, in the build andin
fbuild installprovisioning.platform_packagesfor the C33 isframework-arduinorenesas-portenta; the Uno keys are unchanged.RA6M5 config —
configs/ra6m5.json:-mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16, and the link libraries the package'sboards.txtgivesportenta_c33(-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys).The variant ships a prebuilt
libs/libfsp.aandvariants/PORTENTA_C33/fsp.ld;the existing linker already adds the archive (whole-archive) and
-Lfor thescript's
INCLUDE memory_regions.ld, so no linker change was needed.Bundled libraries — no change needed:
framework_libsselection alreadyreads whichever core's
libraries/tree the board installed, and the C33'stree is the same flat layout.
Board data —
portenta_c33.jsondropsunsupported_reasonand leaves thereject list. The guard / daemon / build-engine tests that used the C33 as the
"rejected board on a supported platform" example now use
wasm, which is stillgenuinely unimplemented.
Receipts
Unit tests (real output):
soldr cargo test -p fbuild-library --lib→ 365 passed, 0 failed, 9 ignoredsoldr cargo test -p fbuild-config --lib→ 269 passed, 0 failed, 1 ignoredsoldr cargo test -p fbuild-build-arm --lib→ 309 passed, 0 failed, 2 ignoredsoldr cargo test -p fbuild-build-engine --lib resolution→ 11 passed, 0 failedsoldr cargo test -p fbuild-daemon --lib rejected_board→ 1 passed, 0 failedsoldr cargo fmt --all -- --checkclean;clippy --all-targets --no-deps -D warningsclean on
fbuild-library,fbuild-config,fbuild-build-arm,fbuild-build-engine,fbuild-build --tests,fbuild-daemon --libNew tests pin the parts a future data refresh could silently break: the
Portenta pin/checksum, the separate install dir,
for_family, the RA6M5 flags,the C33 variant/defines, and "the C33 is buildable".
End-to-end, real build (
FBUILD_DEV_MODE=1, no board attached):and a sketch that
#include <Wire.h>+Wire.begin()(bundled-library path):New ignored acceptance test
portenta_c33_blink_builds_against_the_renesas_portenta_coreasserts the core sources come from the
renesas_portentapackage (notrenesas_uno), the RA6M5 flags, and a real ELF — 1 passed — and the siblinguno_r4_default_core_builds_string_and_ipaddressstill passes 1 passed on thesame run (no regression for the RA4M1 boards through the shared plumbing).
Not in this PR
Upload/flash for the C33 (
dfu-util,upload.maximum_size=2097152) is untouched —the issue scopes the build path, and there is no C33 on the bench here to verify a
flash against.