Skip to content

feat(stm32): add Arduino UNO Q STM32U5 support - #365

Merged
zackees merged 1 commit into
mainfrom
codex/stm32u5-uno-q-fbuild
Jun 1, 2026
Merged

feat(stm32): add Arduino UNO Q STM32U5 support#365
zackees merged 1 commit into
mainfrom
codex/stm32u5-uno-q-fbuild

Conversation

@zackees

@zackeeszackees commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add a built-in arduino_uno_q board definition and preserve build.board = UNO_Q
  • add STM32U5/U585 native MCU config with Cortex-M33 hard-float flags
  • add focused tests for UNO Q board metadata and STM32U5 config selection

Fixes#363.
Refs FastLED/FastLED#2674.
Refs #364.

Verification

  • cargo fmt --check
  • cargo test -p fbuild-build stm32::mcu_config -- --nocapture
  • cargo test -p fbuild-config test_from_board_id_arduino_uno_q -- --nocapture
  • cargo build -p fbuild-cli -p fbuild-daemon
  • direct native fbuild clean build of C:\Users\niteris\dev\fastled3\.build\pio\arduino_uno_q passed with local target/debug/fbuild.exe

Summary by CodeRabbit

  • New Features

    • Added support for STM32U5 MCU family (Cortex-M33F with hardware FPU).
    • Added support for Arduino Uno Q board.
    • Enhanced board configuration handling to support additional build parameters.
  • Documentation

    • Updated STM32 MCU configuration documentation for STM32U5 family.
  • Tests

    • Added comprehensive test coverage for STM32U5 and Arduino Uno Q configurations.

@coderabbitai

coderabbitaiBot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 10dd4e23-e676-4ebe-96c2-c687ba377d83

📥 Commits

Reviewing files that changed from the base of the PR and between 9add9b3 and 284bf4d.

📒 Files selected for processing (6)
  • crates/fbuild-build/src/stm32/configs/README.md
  • crates/fbuild-build/src/stm32/configs/stm32u5.json
  • crates/fbuild-build/src/stm32/mcu_config.rs
  • crates/fbuild-config/assets/boards/json/arduino_uno_q.json
  • crates/fbuild-config/src/board/db.rs
  • crates/fbuild-config/src/board/tests.rs

📝 Walkthrough

Walkthrough

This PR adds native STM32U5 MCU support to fbuild and introduces the Arduino UNO Q board configuration. Changes include a new STM32U5 JSON config with compiler/linker flags and build profiles, MCU loader integration, board configuration file, optional board-field extraction in board defaults, and comprehensive unit tests.

Changes

STM32U5 MCU and Arduino UNO Q Board Support

Layer / File(s)Summary
STM32U5 MCU Configuration Schema and Loader
crates/fbuild-build/src/stm32/configs/stm32u5.json, crates/fbuild-build/src/stm32/configs/README.md, crates/fbuild-build/src/stm32/mcu_config.rs
New stm32u5.json defines Cortex-M33 hard-float configuration (compiler flags with -mcpu=cortex-m33, -mfpu=fpv4-sp-d16, -mfloat-abi=hard, release/quick build profiles). Loader is updated with STM32U5_JSON const, extended function documentation, and stm32u5 prefix dispatch. README documents the STM32U5xx (Cortex-M33F) family with hardware FPU.
STM32U5 Configuration Validation Tests
crates/fbuild-build/src/stm32/mcu_config.rs (tests)
Unit tests verify STM32U5 MCU parsing and architecture resolution, validate hard-float compiler and linker flags are present in config, and confirm case-insensitive MCU name handling (stm32u585zit6q etc.).
Arduino UNO Q Board Configuration and Integration
crates/fbuild-config/assets/boards/json/arduino_uno_q.json, crates/fbuild-config/src/board/db.rs, crates/fbuild-config/src/board/tests.rs
New board JSON specifies STM32U585 MCU, variant headers, STLink upload/debug configuration, CAN connectivity, and metadata. get_board_defaults now optionally extracts build.board field from board JSON. Board test verifies MCU/variant metadata and correct ARDUINO_UNO_Q and ARDUINO_NUCLEO_U575ZI_Q preprocessor defines without incorrect ARDUINO_ARDUINO_UNO_Q.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit hops through meadows green,
Where chips from M33 are seen,
UNO Q now speeds along,
With hard-float flags, precise and strong! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title 'feat(stm32): add Arduino UNO Q STM32U5 support' accurately reflects the main objective of adding STM32U5 MCU configuration and Arduino UNO Q board support to the fbuild STM32 backend.
Linked Issues check✅ PassedThe pull request fully implements all coding requirements from issue #363: STM32U5 config file created with Cortex-M33 hard-float flags, mcu_config.rs extended to route STM32U5 MCU names, comprehensive tests added, and diagnostics updated.
Out of Scope Changes check✅ PassedAll changes are in scope: STM32U5 config addition, board definition for arduino_uno_q, MCU routing logic, and related tests directly address the linked issue #363 objectives without introducing unrelated modifications.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/stm32u5-uno-q-fbuild

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees
zackees merged commit 9486e13 into mainJun 1, 2026
87 checks passed
@zackees
zackees deleted the codex/stm32u5-uno-q-fbuild branch June 1, 2026 22:03
Sign up for freeto 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.

feat(stm32): add native STM32U5/U585 MCU config for Arduino UNO Q

1 participant

@zackees