Repository navigation
feat(boards): declare the platform-renesas-ra upload block for the RA DFU boards (#2131) - #2139
Merged
Merged
Conversation
… 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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
13 tasks
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
Adds the
uploadblock to the three bundled boards that flash through the RADFU bootloader, so
upload.protocolstops resolving toNoneacross the wholerenesas-raplatform.portenta_c33dfuuno_r4_minimadfunano_r4dfuValues are the ones PlatformIO's
platform-renesas-ra(develop) board JSONscarry, and only for the fields
enrich_boardsemits (UPLOAD_FIELDS). Threeupstream keys are intentionally not copied:
native_usb,protocolsandoffset_addressare not in that list, so copying them here would read as driftagainst the generator and against
ci/validate_boards.py. The DFU offset(
0x10000C33,0x4000Minima/Nano) belongs with the deployer that consumesit (stage 3), which is where
UPLOAD_FIELDSshould grow.use_1200bps_touch/wait_for_upload_portare absent upstream for thesethree boards (absent means false), so they are not written explicitly — the
same rule as above.
Why
#2131 gap 2:
fbuild deployon a C33 fails withdeployer 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::RenesasRaarm falls into_ =>before anyupload.protocollookup, andfbuild-serial'sfamily_from_upload_hinthas nodfuarm, soUploadHintresolution stillfalls 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 perboard, asserts the top-level
ram/romstill agree with the upload block(the two spellings of the same numbers must not drift), and that no
hwidsleaks into the block.
ra_dfu_boards_surface_upload_protocol_through_the_loader— assertsBoardConfig::from_board_id(..).upload_protocol == Some("dfu"), i.e. theproduction loader path, not just the JSON on disk.
Both were written first and failed for the right reason
(
missing the upload block,left: None).ci/validate_boards.pycannot use this host's install set (requested platforms not installed: renesas-ra), so it was run with a synthetic$HOMEholding thefour fetched upstream board JSONs. Result on this branch vs
origin/main:uno_r4_wifi;this branch:
uno_r4_wifionly).develop-tip build-side drift:ldscript,f_cpu,mcuspelling,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. Itsupload block would flip the serial reset family to
NativeUsbCdcReset1200Bpson a path with no deployer, and there is no R4WiFi on the bench to check it against.
BoardFamilyfor Renesas, and any flash claim —no Renesas hardware is attached (
ESP32-C6+LPC11U3x CMSIS-DAPonly).#2131 stays open (remaining cells: the
DfuUtilDeployer, theBoardFamilyrow, the HIL flash proof, and the
uno_r4_wifibossac path).