Repository navigation
Description
Context
ARM family orchestrators currently consume URL/archive overrides for selected framework packages, but registry versions in platform = <name>@<version> and platform_packages = <package>@<version> do not reach package resolution. The shared fbuild_config::parse_platform_packages_entry intentionally returns None for a bare version; family constructors then choose fbuild's const-pinned defaults. This is a successful-build substitution, not just a missing warning.
Confirmed representative repro (using the existing tests/platform/teensy41 board):
[env:teensy41]
platform = teensy@5.1.0
board = teensy41
framework = arduino
platform_packages =
framework-arduinoteensy@1.159.0Both teensy@5.1.0 and framework versions 1.159.0 / 1.160.0 are present in the PlatformIO registry. The focused parser test fbuild_config::platform_packages::tests::version_only_returns_none confirms that the explicit package pin produces no override. teensy_packages then takes its None branch and constructs TeensyCores::new, whose resolved framework is framework-arduinoteensy@1.160.0 from the 1.160.0 registry archive URL. The requested 1.159.0 is therefore replaced by 1.160.0. The same constructor selects toolchain-gccarmnoneeabi-teensy@1.110301.0; the repro does not request a toolchain version, so there is no requested toolchain version to compare. The platform version is warned about by ignored_version_pins, but ARM framework resolution does not resolve the PlatformIO platform registry package.
Proposal
Resolve valid PlatformIO registry aliases for ARM platform and platform_packages requests to the requested platform/package archive and its compatible dependency set; build using those packages. Fail before compilation only for unavailable versions, unsupported hosts, or genuinely unsupported inputs. Keep the fix at the shared parsing/resolution boundary where possible, and preserve the current URL/archive override behavior. Cover family-specific package names and layouts rather than assuming one framework mapping.
Families in this audit scope: RP2040/RP2350, STM32 (including Arduino Mbed/GIGA routing), SAM/SAMD/ClearCore, nRF52, Teensy, NXP LPC8xx, Apollo3, Renesas RA, and Silicon Labs.
PlatformIO alias requirement
Resolve short and owner-qualified platform/package aliases through PlatformIO registry metadata, including archive URL, SHA-256 and host-specific files. Apply platform_packages precedence over platform defaults and keep family-specific build layouts/flags aligned with the resolved version; a metadata server may provide the mapping without mirroring binaries.
Acceptance criteria
- RED: a focused Teensy resolution test or build using the ini above demonstrates that
framework-arduinoteensy@1.159.0currently resolves to 1.160.0 (and thatteensy@5.1.0does not resolve a platform registry package). - GREEN: valid published registry aliases for each supported ARM family resolve the requested platform/package version and compatible host-specific dependencies and build with them; the Teensy
1.159.0repro no longer selects1.160.0. Unavailable or unsupported aliases fail before compilation, but refusal of a valid supported alias is not completion. - Tests cover the family package mapping and the
platform = name@versionpath, including toolchain/SDK pins where accepted. - Existing URL/archive package overrides remain honored. Platform URL schemes outside the archive resolver's supported HTTP(S) archive form are identified as unsupported and are not treated as registry-version support.
- Build output or metadata identifies requested and resolved package versions.
- Unit tests: table-drive offline alias-to-payload fixtures for every ARM family named above (including the Teensy
1.159.0counterexample), covering short/owner-qualified names, host files, framework/toolchain dependencies, and package-override precedence through the sharedfbuild-coreAPI. Keep each family adapter test focused on consuming the normalized payload rather than reimplementing registry lookup.
Decisions
- Keep the ARM scope in one child because the confirmed registry-version failure shares the same parser/resolver boundary across these families; framework defaults and package layouts remain family-specific test cases.
- Treat an explicit package version substituted by a family default as a correctness/reproducibility defect even when fbuild emits the A pinned platform version is silently ignored — in
platformand inplatform_packages#1407 warning. - Use the existing Teensy 4.1 fixture for the minimal regression repro; its package registry includes adjacent versions, making the mismatch observable without conflating it with an unavailable version.
- Preserve URL/archive overrides; they are already parsed separately and are not evidence that registry semver pins work.
Related issues
- A pinned platform version is silently ignored — in
platformand inplatform_packages#1407 fixed warning visibility for ignored pins; it did not resolve them. - audit: teensy / framework-arduinoteensy — does platform_packages override work? (parent #664) #680 audited Teensy URL-based framework overrides under tracking: platform_packages override silently ignored across framework packages (audit, sibling of #663) #664, not semver registry pins.
Core and ARM testing gate
- RED → GREEN: before adapter fixes, add a failing exact-payload assertion for each ARM family to the shared offline
fbuild-coregeneric-path suite. Cover RP2040/RP2350, STM32 and Arduino Mbed/GIGA, SAM/SAMD/ClearCore, nRF52, Teensy, NXP LPC8xx, Apollo3, Renesas RA, and Silicon Labs. The Teensy1.159.0pin is a mandatory counterexample. - For each path, assert short/owner-qualified/typed alias normalization, exact selected version and host-specific URL/SHA-256 or VCS ref, cache identity, manifest framework/SDK/toolchain dependencies, and explicit package override precedence. A syntactically valid unknown platform must still resolve core payload metadata before native dispatch rejects its build.
- Where an upstream registry platform manifest does not contain the Arduino framework required by fbuild's native adapter, assert a specific incompatibility error before compilation; do not substitute the adapter's pinned default or count that rejection as support for a valid compatible alias.
- Separate ARM adapter/build tests prove each family consumes the core result, preserves URL/archive overrides, and reports requested versus resolved identities. Shared core tests run offline in CI without PlatformIO or compiler downloads.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Sep 26, 2026
Testing-criteria clarification: this child’s representative platform fixture must pass through the public, platform-agnostic
fbuild-coreresolver specified in #1491, then through its native adapter. Assert the exact requested payload/source identities (including host-specific URL and checksum when published), manifest dependency and explicit override precedence, and no substitution by the family default. Core unit tests must also cover synthetic unknown-platform and generic PlatformIO package paths independently of native build support. Keep offline unit tests separate from the actual compile/build integration repro.zackees commentedon Sep 27, 2026
Implementation is in #1515. Shared offline core suite: 21 generic PlatformIO path/payload tests; resolver: 14 tests; ARM adapters: 226 tests; workspace Clippy/formatting green. Live pinned ARM builds were exercised across the scoped families, including STM32 v20 and Atmel SAM v9 after deriving board-specific GCC/CMSIS requirements from their selected platform metadata. STM32 v19 is a useful negative case: its manifest asks for framework-arduinoststm32 ~4.20900.0, but the live registry currently offers no matching published version, so fbuild fails before compilation rather than substituting v20 packages. The offline test still verifies that v19 selects CMSIS ~2.50900.0 versus v20 ~2.60300.0.
zackees commentedon Sep 27, 2026
Additional RED→GREEN SAMD repro in #1515:
zeroUSBwithplatform = atmelsam@9.0.0previously succeeded using the Adafruit framework/GCC 9.3.1 despite the board declaringbuild.core = arduino. The adapter now resolvesframework-arduino-samd@1.8.14, GCC 7.2.1, and CMSIS 1.40500.0 from the pinned PlatformIO manifest. The older CMSIS archive usesCMSIS/Include, so the package manager accepts both that and modernCMSIS/Core/Include. After discarding the initial wrong-stack build artifacts, a clean rebuild compiled 33 core files and linked successfully. Exact core payload and adapter/layout unit tests are included.