Skip to content

Instantly share code, notes, and snippets.

@voteblake
Last active August 3, 2017 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voteblake/2c5c83b771a3335482ddabae4093403c to your computer and use it in GitHub Desktop.
Save voteblake/2c5c83b771a3335482ddabae4093403c to your computer and use it in GitHub Desktop.
Process of building a new board support package for #rust-embedded projects
  1. Install Rust with rustup - default nightly
  2. cargo install xargo
  3. cargo install cargo-edit
  4. cargo install svd2rust
  5. Find and dowload SVD file (https://github.com/posborne/cmsis-svd)
  6. cargo new boardname
  7. cd boardname
  8. svd2rust -i board.svd | tee src/lib.rs (Many boards seem too large for rustfmt)
  9. cargo add bare-metal cortex-m vcell
  10. cargo add cortex-m-rt --optional
  11. Append to Cargo.toml: [features] rt = ["cortex-m-rt"]
  12. unset CARGO_INCREMENTAL
  13. xargo build --target thumbv6m-none-eabi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment