From 09082b24a525539d6c4689738ebf42ef460bf2de Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 5 Jan 2022 08:04:25 +0800 Subject: [PATCH] README: update build instructions --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3efcb27..55f65b2 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,19 @@ See the `mcu` folder of the [nix-scripts repository](https://git.m-labs.hk/M-Labs/nix-scripts). -### Debian-based systems (tested on Ubuntu 19.10) +### Development environment -- install git, clone this repository -- install [rustup](https://rustup.rs/) +Clone this repository and [nix-scripts](https://git.m-labs.hk/M-Labs/nix-scripts). ```shell -rustup toolchain install nightly -rustup update -rustup target add thumbv7em-none-eabihf --toolchain nightly -rustup default nightly +nix-shell -I nix-scripts=[path to nix-scripts checkout] cargo build --release ``` The resulting ELF file will be located under `target/thumbv7em-none-eabihf/release/thermostat` +Alternatively, you can install the Rust toolchain without Nix using rustup; see the channel manifest file in nix-scripts (`channel-rust-nightly.toml`) to determine which Rust version to use. + ## Debugging Connect SWDIO/SWCLK/RST/GND to a programmer such as ST-Link v2.1. Run OpenOCD: