Skip to content

feat(renesas): support the Portenta C33 (renesas_portenta core, RA6M5) - #2091

Merged
zackees merged 1 commit into
mainfrom
agent/portenta-c33-2054
Nov 18, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/portenta-c33-2054

Conversation

@zackees

@zackees zackees commented Nov 18, 2026

Copy link
Copy Markdown
Member

What this does

Makes board = portenta_c33 build (#2054). The bundled board data
was already right since #2025; what was missing was a core package and an MCU
config.

Core package — RenesasCores now carries a RenesasCoreKind:
Uno (default; every existing call site and with_override behaviour is
unchanged) and Portenta, a second pinned, checksummed download
(ArduinoCore-renesas_portenta-1.6.0.tar.bz2, SHA-256
363d1aae…5d5896a0 from Arduino's package_index.json) installed under its own
cache name (renesas-portenta-core), so installing one core never satisfies or
overwrites the other.

Selection — renesas_mcu_family(mcu) is the one mapping from a board's
mcu field to the family: RA4M1/R7FA4M1… → ra4m1, R7FA6M5BH2CBG/ra6m5
→ ra6m5. It picks both the MCU config and the core package, in the build and
in fbuild install provisioning. platform_packages for the C33 is
framework-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's
boards.txt gives portenta_c33 (-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys).
The variant ships a prebuilt libs/libfsp.a and variants/PORTENTA_C33/fsp.ld;
the existing linker already adds the archive (whole-archive) and -L for the
script's INCLUDE memory_regions.ld, so no linker change was needed.

Bundled libraries — no change needed: framework_libs selection already
reads whichever core's libraries/ tree the board installed, and the C33's
tree is the same flat layout.

Board data — portenta_c33.json drops unsupported_reason and leaves the
reject 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 still
genuinely unimplemented.

Receipts

Unit tests (real output):

  • soldr cargo test -p fbuild-library --lib → 365 passed, 0 failed, 9 ignored
  • soldr cargo test -p fbuild-config --lib → 269 passed, 0 failed, 1 ignored
  • soldr cargo test -p fbuild-build-arm --lib → 309 passed, 0 failed, 2 ignored
  • soldr cargo test -p fbuild-build-engine --lib resolution → 11 passed, 0 failed
  • soldr cargo test -p fbuild-daemon --lib rejected_board → 1 passed, 0 failed
  • soldr cargo fmt --all -- --check clean; clippy --all-targets --no-deps -D warnings
    clean on fbuild-library, fbuild-config, fbuild-build-arm,
    fbuild-build-engine, fbuild-build --tests, fbuild-daemon --lib

New 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):

$ fbuild build -e portenta_c33     # blink sketch
Board: Arduino Portenta C33 / R7FA6M5BH2CBG @ 200MHz
Memory: 2.00MB Flash, 511.35KB RAM
Toolchain: arm-none-eabi-gcc 15.2.1
Flash: 39.02KB / 2.00MB (1.9%)
RAM:   17.96KB / 511.35KB (3.5%)
build succeeded in 6.9s (flash: 39952 bytes, ram: 18392 bytes)

and a sketch that #include <Wire.h> + Wire.begin() (bundled-library path):

build succeeded in 8.6s (flash: 50372 bytes, ram: 22828 bytes)
compile_commands.json: libraries/Wire/Wire.cpp

New ignored acceptance test portenta_c33_blink_builds_against_the_renesas_portenta_core
asserts the core sources come from the renesas_portenta package (not
renesas_uno), the RA6M5 flags, and a real ELF — 1 passed — and the sibling
uno_r4_default_core_builds_string_and_ipaddress still passes 1 passed on the
same 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.

…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
@coderabbitai

coderabbitai Bot commented Nov 18, 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
  • 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 18, 2026
Merged via the queue into main with commit d2926d2 Nov 18, 2026
33 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 19, 2026
@zackees
zackees deleted the agent/portenta-c33-2054 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

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant