Repository navigation
fix(boards): match upstream defines for uno_r4_wifi, rpipico2, pico, nanorp2040connect - #2050
Merged
Merged
Conversation
…nanorp2040connect
- uno_r4_wifi: add -DARDUINO_ARCH_RENESAS_UNO. ArduinoCore-renesas 1.6.0
recipes emit -DARDUINO_ARCH_{build.arch} with arch `renesas_uno`, and
platform-renesas-ra's uno_r4_wifi.json carries it (as #2025 did for Minima).
- rpipico2: -DARDUINO_ARCH_RP2350 -> -DARDUINO_ARCH_RP2040. arduino-pico
4.5.3 emits -DARDUINO_ARCH_{build.arch} with arch `rp2040` for every
board; ARDUINO_ARCH_RP2350 appears nowhere in the core (RP2350 is flagged
by PICO_RP2350=1 from lib/rp2350/platform_def.txt, which fbuild already
loads). maxgerhardt/platform-raspberrypi rpipico2.json agrees.
- pico, nanorp2040connect: `-D ARDUINO_X` -> `-DARDUINO_X`. The resolver
already pairs the separated form (pinned by a new test); the bundle keeps
one token per define, guarded bundle-wide.
Fixes #2038
…flags Upstream PlatformIO pico.json / nanorp2040connect.json write `-D ARDUINO_...`. enrich_boards overwrites extra_flags from upstream, so a re-run would reintroduce the spaced form fixed in the previous commit. Join it at the whitespace-token level (ini_parser::parse_flags does the same join but also strips the quoting layer the stored JSON must keep). The bin now has tests, so its harness is re-enabled (check_test_layout forbids test = false then). Refs #2038
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Validate Boards compares the bundle to upstream PlatformIO after the same merge enrich_boards applies. Mirror the new `-D NAME` -> `-DNAME` join so the normalised pico / nanorp2040connect flags are not reported as drift. Refs #2038
14 of 17 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.
Fixes #2038 (part of #2035).
Upstream check
uno_r4_wifi-DARDUINO_ARCH_{build.arch}; the package arch isrenesas_uno, so the result isARDUINO_ARCH_RENESAS_UNO(plus the literalARDUINO_ARCH_RENESAS). platform-renesas-rauno_r4_wifi.jsonlists it toorpipico2-DARDUINO_ARCH_{build.arch}, archrp2040for every board.ARDUINO_ARCH_RP2350appears nowhere in the core. RP2350 is flagged byPICO_RP2350=1fromlib/rp2350/platform_def.txt, which fbuild already loads. maxgerhardtrpipico2.jsonuses-DARDUINO_ARCH_RP2040ARDUINO_ARCH_RP2350(hand-written in be3f6ed);get_definesemitted both RP2040 and RP2350ARDUINO_ARCH_RP2040onlypico,nanorp2040connect-D ARDUINO_...(spaced)-DARDUINO_...Parser
get_definesalready handled-D NAME.ini_parser::parse_flagsfolds it into-DNAME, andparse_define_flagspairs a bare-Dwith the next token as well. The new testextra_flags_separated_define_resolves_like_the_joined_formpins that behaviour. So the spacing change only normalises the data; no parser fix was needed.Generator
enrich_boardsoverwritesextra_flagsfrom upstream PIO. Re-running it would have reintroduced the spaced form, so it now joins-D NAME(second commit). That bin now has tests, so its harness is re-enabled, ascheck_test_layoutrequires. The bundle-wide guardbundled_extra_flags_use_joined_define_formand the per-board define tests catch a regeneration that reverts any of these fixes.ci/enrich_extra_flags.pyonly fills missing entries and never overwrites.Library impact (FastLED)
src/platforms.hpicks RP2350 onPICO_RP2350 || ARDUINO_ARCH_RP2350, so detection still works throughPICO_RP2350, which matches what Arduino IDE builds see.ARDUINO_ARCH_RENESAS_UNOgates FastLED's Renesas UNO memory class (compile_test.hpp) and an alternate platform-detection arm. The WiFi board now matches the Minima.Validation
bash test -p fbuild-configpasses (258 lib + 2 bin).soldr cargo fmt --all,soldr cargo clippy --workspace --all-targets -- -D warnings, andci/check_test_layout.pyare clean.FBUILD_DEV_MODE=1,--clean, rebuilt CLI/daemon): uno_r4_wifi and rpipico2 (board_build.core = earlephilhower) blinks build. Incompile_commands.json, all 67 uno_r4_wifi TUs get-DARDUINO_ARCH_RENESAS_UNOand all 45 rpipico2 TUs get-DARDUINO_ARCH_RP2040and-DPICO_RP2350. There is noARDUINO_ARCH_RP2350and no bare-D.