From 522a76ff5d1d76e8d600930707511ff6f28fddbd Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Tue, 28 Dec 2021 08:48:54 -0800 Subject: [PATCH 1/4] remove release mode requirement from USB examples This was fixed in usb-device: https://github.com/mvirkkunen/usb-device/pull/41 --- examples/usb_passthrough.rs | 2 -- examples/usb_serial.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/examples/usb_passthrough.rs b/examples/usb_passthrough.rs index 6886f964..bd521317 100644 --- a/examples/usb_passthrough.rs +++ b/examples/usb_passthrough.rs @@ -1,8 +1,6 @@ //! Dual CDC-ACM serial port example using polling in a busy loop. //! //! Characters written to one serial port appear on both. -//! -//! Note: This example must be built in release mode to work reliably #![no_std] #![no_main] diff --git a/examples/usb_serial.rs b/examples/usb_serial.rs index 8c1b9f3e..f4ef2c1a 100644 --- a/examples/usb_serial.rs +++ b/examples/usb_serial.rs @@ -1,6 +1,4 @@ //! CDC-ACM serial port example using polling in a busy loop -//! -//! Note: This example must be built in release mode to work reliably #![no_std] #![no_main] From 4c9ae034d7f9852bc03fd6f651206511be47732e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20B=C3=B6ving?= Date: Sat, 24 Jul 2021 13:04:20 +0200 Subject: [PATCH 2/4] Migrate to Rust 2021 as part of the public testing --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a550be08..d3244ef7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ authors = ["Andrew Straw ", "Matthew Meyer ", "Florian Jung ", "Matt Ickstadt "] -edition = "2018" +edition = "2021" categories = ["embedded", "hardware-support", "no-std"] description = "Hardware Abstraction Layer implementation for STM32H7 series microcontrollers" keywords = ["arm", "cortex-m", "stm32h7xx", "hal", "embedded-hal"] From be64eb798dd88a8dfb68cf4d3c4576a9502f6117 Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Mon, 3 Jan 2022 21:14:22 +0100 Subject: [PATCH 3/4] Increase MSRV to 1.56.1 --- .github/bors.toml | 16 ++++++++-------- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 2 ++ README.md | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/bors.toml b/.github/bors.toml index 17156a70..d0a679ca 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -2,14 +2,14 @@ block_labels = ["wip"] delete_merged_branches = true status = [ "Rustfmt", - "ci (1.52.0, stm32h743)", - "ci (1.52.0, stm32h753)", - "ci (1.52.0, stm32h743v)", - "ci (1.52.0, stm32h753v)", - "ci (1.52.0, stm32h747cm7)", - "ci (1.52.0, stm32h7b3)", - "ci (1.52.0, stm32h7b0)", - "ci (1.52.0, stm32h735)", + "ci (1.56.1, stm32h743)", + "ci (1.56.1, stm32h753)", + "ci (1.56.1, stm32h743v)", + "ci (1.56.1, stm32h753v)", + "ci (1.56.1, stm32h747cm7)", + "ci (1.56.1, stm32h7b3)", + "ci (1.56.1, stm32h7b0)", + "ci (1.56.1, stm32h735)", "ci (stable, stm32h743)", "ci (stable, stm32h753)", "ci (stable, stm32h743v)", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 752e0c66..683f70ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: # All permutations of {rust, mcu} rust: - - 1.52.0 # MSRV + - 1.56.1 # MSRV - stable mcu: - stm32h743 diff --git a/CHANGELOG.md b/CHANGELOG.md index c05e0692..45c39b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +* MSRV increased to 1.56.1 + ## [v0.11.0] 2021-12-18 * **Breaking**: Simplified API for reading device signature diff --git a/README.md b/README.md index d4efd94e..544c8e94 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ stm32h7xx-hal [![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/12691) [![CI](https://github.com/stm32-rs/stm32h7xx-hal/workflows/Continuous%20integration/badge.svg)](https://github.com/stm32-rs/stm32h7xx-hal/actions) [![Crates.io](https://img.shields.io/crates/v/stm32h7xx-hal.svg)](https://crates.io/crates/stm32h7xx-hal) -![Minimum rustc version](https://img.shields.io/badge/rustc-1.52.0+-yellow.svg) +![Minimum rustc version](https://img.shields.io/badge/rustc-1.56.1+-yellow.svg) [_stm32h7xx-hal_](https://github.com/stm32-rs/stm32h7xx-hal) contains a hardware abstraction layer on top of the peripheral access API for @@ -111,7 +111,7 @@ programming interfaces are only available on the high density connectors. Minimum supported Rust version ------------------------------ -The Minimum Supported Rust Version (MSRV) at the moment is **1.52.0**. Older +The Minimum Supported Rust Version (MSRV) at the moment is **1.56.1**. Older versions **may** compile, especially when some features are not used in your application. From 2cf6553ef2a7821001c1e7cf34efbda53c63e1da Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Mon, 3 Jan 2022 21:24:29 +0100 Subject: [PATCH 4/4] Pick up a depreciation warning from cortex-m v0.7.4 --- examples/mdma_bursts.rs | 4 ++-- examples/sdmmc.rs | 4 ++-- src/time.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/mdma_bursts.rs b/examples/mdma_bursts.rs index ccd7776d..0fb4e14f 100644 --- a/examples/mdma_bursts.rs +++ b/examples/mdma_bursts.rs @@ -112,7 +112,7 @@ fn main() -> ! { let mut cycles = 0; for _ in 0..10 { cycles += { - let start = DWT::get_cycle_count(); + let start = DWT::cycle_count(); // Start block transfer.start(|_| {}); @@ -120,7 +120,7 @@ fn main() -> ! { // Wait for transfer to complete while !transfer.get_transfer_complete_flag() {} - DWT::get_cycle_count() - start + DWT::cycle_count() - start }; } diff --git a/examples/sdmmc.rs b/examples/sdmmc.rs index 5751e43a..613fb64d 100644 --- a/examples/sdmmc.rs +++ b/examples/sdmmc.rs @@ -141,14 +141,14 @@ fn main() -> ! { let mut buffer = [0u8; 5120]; cp.DWT.enable_cycle_counter(); - let start = pac::DWT::get_cycle_count(); + let start = pac::DWT::cycle_count(); for i in 0..10 { // Read 10 blocks sdmmc.read_blocks(10 * i, &mut buffer).unwrap(); } - let end = pac::DWT::get_cycle_count(); + let end = pac::DWT::cycle_count(); let duration = (end - start) as f32 / ccdr.clocks.c_ck().0 as f32; info!("Read 100 blocks at {} bytes/s", 5120. / duration); diff --git a/src/time.rs b/src/time.rs index 6ce9c5ac..741f0947 100644 --- a/src/time.rs +++ b/src/time.rs @@ -273,6 +273,6 @@ pub struct Instant { impl Instant { /// Ticks elapsed since the `Instant` was created pub fn elapsed(&self) -> u32 { - DWT::get_cycle_count().wrapping_sub(self.now) + DWT::cycle_count().wrapping_sub(self.now) } }