Crates.io | aemics-stm32g4xx-hal |
lib.rs | aemics-stm32g4xx-hal |
version | 0.1.0 |
source | src |
created_at | 2024-06-27 09:42:32.824629 |
updated_at | 2024-06-27 09:42:32.824629 |
description | Hardware abstraction layer (HAL) for STM32G473 |
homepage | https://www.aemics.nl |
repository | https://github.com/AEMICS/aemics-stm32g4xx-hal |
max_upload_size | |
id | 1285257 |
size | 710,390 |
This project contains the hardware abstraction layer used by the PYglet and PYg Mud Puddle Board Abstraction Layers. It can also be used independently to program MCUs of the STM32G4 family.
The HAL implements the embedded-hal crate which outlines a generic API to follow for Rust HAL projects.
This HAL uses the stm32g4 device support crate to interact with the MCU's registers.
The HAL was based off of the stm32g4xx-hal crate and updated to embedded-hal v1.0.0.
Currently, the only verified supported device is the STM32G473.
1. WINDOWS: C++ build tools for Visual Studio 2019.
go to https://www.rust-lang.org/tools/install
download and run installer.
select standard installation
check if installed by running rustc -V
Should say "rustc 1.78.0" or greater.
Note: In case of an existing installation, try running: rustup update
run rustup target add thumbv7em-none-eabihf
cargo install cargo-binutils
rustup component add llvm-tools
https://www.st.com/en/development-tools/stm32cubeprog.html
run installer, standard settings. Make a note of the installation folder.
Add the installation's 'bin' folder to your PATH environment variable.
Restart your pc
Note: At time of writing, the stm32cubeprogrammer installer does not support Wayland display driver.
If this issue comes up, instead try using dfu-util.
To add this HAL to your project, add the following line to your project's Cargo.toml file:
[dependencies]
aemics-stm32g4xx-hal = { git = "https://gitlab.aemics.nl/aepym/30023200.git", features = ["rt","stm32g473"]}
It is also possible to use the crates.io name, which when set up (to do as of 27-06-2024) should look like:
[dependencies]
aemics-stm32g4xx-hal = "0.1.0"
The /examples/ folder contains many examples which set up simple programs such as a blinky test program or I2C communication to use when getting started.
The USB implementation only functions in (optimized) release builds.