Skip to content

feat(boards): declare the platform-renesas-ra upload block for the RA DFU boards (#2131) - #2139

Merged
zackees merged 1 commit into
mainfrom
agent/renesas-upload-blocks
Nov 21, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/renesas-upload-blocks

Conversation

@zackees

@zackees zackees commented Nov 21, 2026

Copy link
Copy Markdown
Member

What

Adds the upload block to the three bundled boards that flash through the RA
DFU bootloader, so upload.protocol stops resolving to None across the whole
renesas-ra platform.

board protocol maximum_ram_size maximum_size
portenta_c33 dfu 523624 2097152
uno_r4_minima dfu 32768 262144
nano_r4 dfu 32768 262144

Values are the ones PlatformIO's platform-renesas-ra (develop) board JSONs
carry, and only for the fields enrich_boards emits (UPLOAD_FIELDS). Three
upstream keys are intentionally not copied: native_usb, protocols and
offset_address are not in that list, so copying them here would read as drift
against the generator and against ci/validate_boards.py. The DFU offset
(0x10000 C33, 0x4000 Minima/Nano) belongs with the deployer that consumes
it (stage 3), which is where UPLOAD_FIELDS should grow.

use_1200bps_touch / wait_for_upload_port are absent upstream for these
three boards (absent means false), so they are not written explicitly — the
same rule as above.

Why

#2131 gap 2: fbuild deploy on a C33 fails with deployer for RenesasRa not yet implemented, and this board data is the input that arm will dispatch on.
Landing it separately keeps the data reviewable and lets the deployer PR stay
about the deployer.

Additive and inert today: the daemon's Platform::RenesasRa arm falls into
_ => before any upload.protocol lookup, and fbuild-serial's
family_from_upload_hint has no dfu arm, so UploadHint resolution still
falls back to VID/PID exactly as before (nothing about serial/DTR behaviour
changes).

Tests

New, in crates/fbuild-config/src/board/tests_renesas_boards.rs:

  • ra_dfu_boards_declare_the_upstream_upload_block — pins protocol/ram/size per
    board, asserts the top-level ram/rom still agree with the upload block
    (the two spellings of the same numbers must not drift), and that no hwids
    leaks into the block.
  • ra_dfu_boards_surface_upload_protocol_through_the_loader — asserts
    BoardConfig::from_board_id(..).upload_protocol == Some("dfu"), i.e. the
    production loader path, not just the JSON on disk.

Both were written first and failed for the right reason
(missing the upload block, left: None).

soldr cargo test -p fbuild-config --lib   -> ok. 279 passed; 0 failed; 1 ignored
soldr cargo test -p fbuild-serial --lib   -> ok. 211 passed; 0 failed; 1 ignored
soldr cargo clippy -p fbuild-config --all-targets -- -D warnings -> exit 0
soldr cargo fmt -p fbuild-config -- --check -> clean
uv run --no-project python ci/check_usb_vidpid_literals.py -> passed
uv run --no-project python -m unittest ci.test_validate_boards -> 38 tests OK

ci/validate_boards.py cannot use this host's install set (requested platforms not installed: renesas-ra), so it was run with a synthetic $HOME holding the
four fetched upstream board JSONs. Result on this branch vs origin/main:

  • upload drift lines: 14 -> 5 (main: 3 per dfu board + 5 for uno_r4_wifi;
    this branch: uno_r4_wifi only).
  • every non-upload diff line is byte-identical to main's (pre-existing
    develop-tip build-side drift: ldscript, f_cpu, mcu spelling,
    normalized extra_flags), so this change introduces no new drift.

Not in scope

  • uno_r4_wifi (sam-ba / 1200-bps touch, i.e. bossac): separate stage. Its
    upload block would flip the serial reset family to
    NativeUsbCdcReset1200Bps on a path with no deployer, and there is no R4
    WiFi on the bench to check it against.
  • The Renesas deployer itself, BoardFamily for Renesas, and any flash claim —
    no Renesas hardware is attached (ESP32-C6 + LPC11U3x CMSIS-DAP only).

#2131 stays open (remaining cells: the DfuUtilDeployer, the BoardFamily
row, the HIL flash proof, and the uno_r4_wifi bossac path).

… DFU boards (#2131)

portenta_c33, uno_r4_minima and nano_r4 carried no `upload` section, so
`upload.protocol` resolved to None on the whole renesas-ra platform and the
daemon RenesasRa arm had nothing to dispatch on (#2131 gap 2). Copy the
upstream PlatformIO platform-renesas-ra values for the fields `enrich_boards`
emits: protocol=dfu plus maximum_ram_size/maximum_size. Pin them with two
tests, one on the bundled JSON and one through BoardConfig::from_board_id so
the loader wiring is proven, not just the file.

uno_r4_wifi (protocol sam-ba, 1200-bps touch) is deliberately left for the
bossac stage: its upload block flips the serial reset family to
NativeUsbCdcReset1200Bps on a path that has no deployer yet.
@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 f3ac976 Nov 21, 2026
33 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 22, 2026
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