// the find
stm32-rs/stm32f4xx-hal
A Rust embedded-hal HAL for all MCUs in the STM32 F4 family
A Rust HAL crate covering the STM32F4 family of ARM Cortex-M4 microcontrollers — F401 through F479. It implements embedded-hal traits for GPIO, SPI, I2C, UART, DMA, USB, timers, ADC, and a dozen other peripherals, with feature flags to select your specific chip. Aimed at embedded Rust developers who want a production-quality abstraction layer instead of writing directly to PAC registers.
The peripheral coverage is genuinely wide — DMA-backed serial, I2S audio, FSMC LCD, SDIO, QSPI, RTC, and CAN are all there as optional features, not afterthoughts. The examples directory is unusually good: 60+ working examples including RTIC v1/v2, SSD1306, WS2812, and stopwatch demos with interrupts and DMA chained together. The feature-flag approach keeps binary size down — you pay only for peripherals you enable. CI runs on every push and there's a separate clippy workflow, so the codebase stays linted.
RTICv2 support still requires nightly Rust, which is a real adoption blocker for production use — it's called out in the README but there's no timeline for stable support. The README gives minimal guidance on clock configuration, which is the first thing that burns newcomers — RCC/PLL setup is complex and you're largely on your own until you find the right example. Documentation on peripheral interaction patterns (e.g. using DMA with I2C) is scattered across examples rather than explained in the crate docs. Support is F4-only; if you're evaluating this and your next board is an STM32H7 or G0, you're starting over with a different crate.