A template for building applications for ARM Cortex-M microcontrollers
To build embedded programs using this template you'll need:
-
Rust 1.31, 1.30-beta, nightly-2018-09-13 or a newer toolchain. e.g.
rustup default beta
-
The
cargo generate
subcommand. Installation instructions. -
rust-std
components (pre-compiledcore
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.
$ git clone https://github.com/osterwood/cortex-m-quickstart app
$ cd app
$ pip3 install -r requirements.txt
- Set a default compilation target.
$ invoke target MCUNAME
This will setup the appropiate options in .cargo/config
and layout in memory.x
. The devices.yml holds data which feeds these files.
- Build the template application or one of the examples.
$ invoke run blink
This template is licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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.
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the Cortex-M team, promises to intervene to uphold that code of conduct.