1 Star 0 Fork 0

Joker2770 / stm32-with-rust-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

stm32-template

A template for building applications for STM32 microcontrollers

Dependencies

To build embedded programs using this template you'll need:

$ cargo install cargo-generate
  • Flash and run/debug tools:
$ cargo install probe-rs --features cli
  • rust-std components (pre-compiled core crate) for the ARM Cortex-M targets. Run:
$ rustup target add thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf

Instantiate the template.

  1. Run and enter project name
$ cargo generate --git https://github.com/burrbull/stm32-template/
 Project Name: app
  1. Specify chip product name and answer on several other guide questions.

  2. Your program is ready to compile:

$ cargo build --release

Flash and run/debug

You can flash your firmware using one of those tools:

  • cargo flash --release — just flash
  • cargo run --release — flash and run using probe-rs run runner or probe-run runner (deprecated) which you can set in .cargo/config.toml
  • cargo embed --release — multifunctional tool for flash and debug

You also can debug your firmware on device from VS Code with probe-rs extention or with probe-rs gdb command. You will need SVD specification for your chip for this. You can load patched SVD files here.

Contribution

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.

Code of Conduct

Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, promises to intervene to uphold that code of conduct.

MIT License Copyright (c) 2024 Joker2770 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

stm32 demo with rust 展开 收起
Rust
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Rust
1
https://gitee.com/Joker2770/stm32-with-rust-demo.git
git@gitee.com:Joker2770/stm32-with-rust-demo.git
Joker2770
stm32-with-rust-demo
stm32-with-rust-demo
main

搜索帮助