STM32G431 Hardware Abstraction Layer for bare-metal Ada applications.
stm32g431 provides hardware-specific implementations of generic peripheral interfaces for the STM32G431 microcontroller family. It instantiates generic packages (GPIO, SPI, I2C, USART) with STM32G431-specific drivers, providing a vendor-neutral API at the MCU level.
- STM32G431-specific peripheral drivers
- SVD-generated register definitions
- Clock tree configuration
- Generic interface instantiations for:
- GPIO (General Purpose Input/Output)
- SPI (Serial Peripheral Interface)
- I2C (Inter-Integrated Circuit)
- USART (Universal Synchronous/Asynchronous Receiver/Transmitter)
This crate sits between generic peripheral interfaces and board support packages:
Application
↓
Board Package (nucleo_g431kb)
↓
MCU Package (stm32g431) ← This crate
↓
Generic Interfaces (gpio_generic, spi_generic, i2c_generic, usart_generic)
Typically used as a dependency of board support packages. For direct use:
with Gpio;
with STM32G431_GPIO;
Led_Pin : Gpio.Pin := STM32G431_GPIO.Make_Pin (STM32G431_GPIO.B, 8);Add to your alire.toml:
[[depends-on]]
stm32g431 = "^0.1.0"gpio_generic- Generic GPIO interfacespi_generic- Generic SPI interfacei2c_generic- Generic I2C interfaceusart_generic- Generic USART interfacedebug_generic- Generic debug outputmachine_types- Machine-level typeslight_tasking_stm32g4xx- Lightweight Ada runtime
MIT OR Apache-2.0 WITH LLVM-exception