Skip to content

stm32bs, a cargo tools for stm32 rust programming beginer start or study (BS)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

AtlasHW/stm32bs

cargo-stm32bs

This tools is stm32 cargo project generation tool, base on cargo-generate.

cargo-stm322bs, to create a stm32 project!

Documentation

proccess...

Templates

The default template is stm32bs-template-default in github.

Quickstart

Installation

cargo install cargo-stm32bs

If you haven't embedded target you rust tools, your need install them. for "STM32F0", "STM32G0", "STM32L0", "STM32C0", "STM32U0", "STM32WL3", "STM32WB0" family, you should install target "thumbv6m-none-eabi".

rustup target add thumbv6m-none-eabi

for "STM32F1", "STM32F2", "STM32L1" you should install target "thumbv7m-none-eabi".

rustup target add thumbv7m-none-eabi

for "STM32F3", "STM32F4", "STM32F7", "STM32G4", "STM32H7", "STM32L4", "STM32L4+", "STM32WB", "STM32WL" you should install target "thumbv7em-none-eabi".

rustup target add thumbv7em-none-eabi

for "STM32L5", "STM32U5", "STM32H5", "STM32WBA", "STM32N6", "STM32U3" you should install target "thumbv8m.main-none-eabihf".

rustup target add thumbv8m.main-none-eabihf

We recommend debug tools probe-rs as debug and download tools, you can download binstall first

cargo install binstall

and using binstall to install probe-rs

cargo binstall probe-rs-tools

Usage

if you want to use default template, you can change directory to you workspace or a directory to store rust code

cd ./rust
cargo stm32bs
🤷 Project Name: blink
🤷 Chip Part Number (eg. stm32g071cbt6): stm32g071cbt6tr
✔ 🤷 Choose a project type · Demo
Create a STM32 Demo project...
✔ 🤷 Choose a demo · blink
🔧 Destination: /home/atlassong-k/rust/cargo-stm32bs/blink ...
🔧 project-name: blink ...
🔧 username: "atlasHW" (placeholder provided by cli argument)
🔧 Generating template ...
🤷 Port of GPIO is used to LED, eg. B: B
🤷 Pin of GPIO is used to LED, eg. 5: 5
[1/6]   Done: Cargo.toml
[2/6]   Done: src/main.rs
[3/6]   Done: build.rs
[4/6]   Done: .cargo/config.toml
[5/6]   Done: memory.x
[6/6]   Done: README.md
✨ Done! New project created /home/atlassong-k/rust/cargo-stm32bs/blink

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

stm32bs, a cargo tools for stm32 rust programming beginer start or study (BS)

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 104

Languages