From 67602240b4282e2745c4202887f80d5a3f871171 Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 10 May 2022 22:23:18 +0200 Subject: [PATCH 1/2] generic: Depend on avr-device 0.3.3 This will transitively pull in the new version for all crates depending on `avr-hal-generic` as well so it should be enough to specify the new version here. Version 0.3.3 is required for building with newer rustc versions, so this commit is in preparation for finally upgrading to a recent rust compiler... --- avr-hal-generic/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avr-hal-generic/Cargo.toml b/avr-hal-generic/Cargo.toml index 81a940ac65..20f8b0fade 100644 --- a/avr-hal-generic/Cargo.toml +++ b/avr-hal-generic/Cargo.toml @@ -9,7 +9,7 @@ cfg-if = "0.1.7" nb = "0.1.2" ufmt = "0.1.0" paste = "1.0.0" -avr-device = "0.3" +avr-device = "0.3.3" [dependencies.embedded-hal] version = "0.2.3" From d0d2f243bd3e10b49f6a78d44839a6caa8be7d43 Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 10 May 2022 22:24:59 +0200 Subject: [PATCH 2/2] Upgrade to rust nightly 2022-05-10 Finally! Update the rust-toolchain file to reference the new nightly which can build for AVR again. Also update CI to use the new version. And finally, drop the note in the README about the old version being necessary. --- .github/workflows/ci.yml | 2 +- README.md | 2 +- rust-toolchain.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91f3f30587..6d0e1324c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly-2021-01-07 + toolchain: nightly-2022-05-10 override: true components: rust-src - name: Install avr-gcc, binutils, and libc diff --git a/README.md b/README.md index 050a9365d0..3907716072 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Hardware Abstraction Layer for AVR microcontrollers and common boards (for examp **This is a new version of `avr-hal`! Older versions can be found in the `old` branch but will no longer get support.** ## Quickstart -You need a nightly Rust compiler for compiling Rust code for AVR. **Note**: Due to a regression, versions after `nightly-2021-01-07` are currently broken (see [#124](https://github.com/Rahix/avr-hal/issues/124)). Please use that version of the compiler for now. The correct version will be installed automatically. +You need a nightly Rust compiler for compiling Rust code for AVR. The correct version will be installed automatically due to the `rust-toolchain.toml` file. On Ubuntu, you'll need to install dependencies: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 66d37572aa..07824bc4ed 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2021-01-07" +channel = "nightly-2022-05-10" components = [ "rust-src" ] -profile = "minimal" \ No newline at end of file +profile = "minimal"