[−][src]Crate cube2rust
A tool for generating a rust project from a STM32CubeMX ioc file.
The tool will run cargo init
in the same directory as the ioc file.
It will then add dependencies to Cargo.toml
and generate a src/main.rs
, .cargo/config
and memory.x
.
Currently, running this tool will overwrite everything, so use with caution.
Installation
$ cargo install cube2rust
Usage
From inside a directory containing an ioc file
$ cube2rust
From anywhere
$ cube2rust path/to/project_directory
Currently supported
- Only STM32F0
- GPIO, RCC, SPI, USART, I2C
Structs
Config | A struct containing all the collected information from the ioc file |
Functions
generate | Generates a rust project from the given configuration |
load_ioc | Loads a project configuration from the ioc file content |
parse_ioc | Parses the ioc file content into nested HashMaps |