From a32a5b78491f00f09cd7297ea40d78076130dd69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Sun, 26 Nov 2023 23:20:57 +0100 Subject: [PATCH 1/6] Update dependecies --- Cargo.toml | 24 ++++++++++++------------ testsuite/Cargo.toml | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e2ce040d..b5f57dbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,38 +29,38 @@ members = [".", "testsuite", "codegen"] [dependencies] bxcan = { version = "0.7.0", optional = true } cfg-if = "1.0.0" -cortex-m = "0.7.4" +cortex-m = "0.7.7" cortex-m-rt = "0.7.3" critical-section = "1.1.2" defmt = { version = ">=0.2.3, <0.4.0", optional = true } embedded-dma = "0.2.0" -embedded-hal = { version = "0.2.5", features = ["unproven"] } -embedded-time = "0.12.0" -enumset = { version = "1.0.6", optional = true } +embedded-hal = { version = "0.2.7", features = ["unproven"] } +embedded-time = "0.12.1" +enumset = { version = "1.1.3", optional = true } nb = "1.0.0" num-traits = { version = "0.2.17", default-features = false} -paste = "1.0.5" +paste = "1.0.14" rtcc = { version = "0.3.0", optional = true } stm32-usbd = { version = "0.6.0", optional = true } stm32f3 = { version = "0.15.1", default-features = false } void = { version = "1.0.2", default-features = false } [dev-dependencies] -cortex-m-rtic = "1.0" +cortex-m-rtic = "1.1" cortex-m-semihosting = "0.5.0" -defmt = "0.3.0" +defmt = "0.3.5" defmt-rtt = "0.4.0" -defmt-test = "0.3.0" -panic-probe = "0.3.0" -panic-rtt-target = { version = "0.1", features = ["cortex-m"] } +defmt-test = "0.3.1" +panic-probe = "0.3.1" +panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] } panic-semihosting = "0.6.0" rtt-target = { version = "0.3.1", features = ["cortex-m"] } systick-monotonic = "1.0" -usb-device = "0.2.8" +usb-device = "0.2.9" usbd-serial = "0.1.1" [build-dependencies] -slice-group-by = "0.3.0" +slice-group-by = "0.3.1" [features] can = ["bxcan"] diff --git a/testsuite/Cargo.toml b/testsuite/Cargo.toml index 8c76ec91..b8d12ede 100644 --- a/testsuite/Cargo.toml +++ b/testsuite/Cargo.toml @@ -55,15 +55,15 @@ harness = false cfg-if = "1.0" cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] } cortex-m-rt = "0.7.3" -defmt = "0.3.0" +defmt = "0.3.5" defmt-rtt = "0.4.0" -defmt-test = "0.3.0" -enumset = { version = "1.0.6" } +defmt-test = "0.3.1" +enumset = { version = "1.1.3" } # TODO: Set stm32f303xc as default, but make it overwritable stm32f3xx-hal = { path = "..", features = ["defmt"]} -panic-probe = { version = "0.3.0", features = ["print-defmt"] } -nb = "1.0.0" -num-traits = { version = "0.2.14", default-features = false } +panic-probe = { version = "0.3.1", features = ["print-defmt"] } +nb = "1.1.0" +num-traits = { version = "0.2.17", default-features = false } [features] # enable all defmt logging levels From ced06258ba3a54eb1dee336a50a8f94b2d6a8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Sun, 26 Nov 2023 23:27:35 +0100 Subject: [PATCH 2/6] Upgrade dependecies --- Cargo.toml | 24 ++++++++++++------------ codegen/Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b5f57dbb..046a3b0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,24 +54,24 @@ defmt-test = "0.3.1" panic-probe = "0.3.1" panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] } panic-semihosting = "0.6.0" -rtt-target = { version = "0.3.1", features = ["cortex-m"] } +rtt-target = { version = "0.4.0" } systick-monotonic = "1.0" -usb-device = "0.2.9" -usbd-serial = "0.1.1" +usb-device = "0.3.1" +usbd-serial = "0.2.0" [build-dependencies] slice-group-by = "0.3.1" [features] -can = ["bxcan"] +can = ["dep:bxcan"] default = ["rt", "ld", "usb", "can", "rtc", "enumset"] -defmt-debug = ["defmt"] +defmt-debug = ["dep:defmt"] -defmt-default = ["defmt"] -defmt-error = ["defmt"] -defmt-info = ["defmt"] -defmt-trace = ["defmt"] -defmt-warn = ["defmt"] +defmt-default = ["dep:defmt"] +defmt-error = ["dep:defmt"] +defmt-info = ["dep:defmt"] +defmt-trace = ["dep:defmt"] +defmt-warn = ["dep:defmt"] device-selected = [] direct-call-deprecated = [] @@ -90,7 +90,7 @@ mem-c = [] mem-d = [] mem-e = [] rt = ["stm32f3/rt"] -rtc = ["rtcc"] +rtc = ["dep:rtcc"] # Any changes here should be mirrored in README.md, build.rs, src/lib.rs, and # .github/workflows/ci.yml. @@ -135,7 +135,7 @@ svd-f302 = ["stm32f3/stm32f302"] svd-f303 = ["stm32f3/stm32f303"] svd-f373 = ["stm32f3/stm32f373"] svd-f3x4 = ["stm32f3/stm32f3x4"] -usb = ["stm32-usbd"] +usb = ["dep:stm32-usbd"] # cargo build/run [profile.dev] diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 63eeae58..dac3cce6 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" anyhow = "1" once_cell = "1" regex = "1" -serde-xml-rs = "0.4" +serde-xml-rs = "0.6" [dependencies.structopt] version = "0.3" From b9680581000917e6313b7c2872f7d77712361cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Mon, 27 Nov 2023 07:48:06 +0100 Subject: [PATCH 3/6] Remove defmt 0.2 features --- CHANGELOG.md | 3 +++ Cargo.toml | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e865180..8d1d0006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Remove `Serial::split`, which possibly creates two mutable references two one Serial instance, which could've caused UB. The use case of this function was hard to find out anyway. ([#351]) + was hard to find out anyway. +- Remove `defmt-*` features (`defmt` feature is still available), to finalize + migration from `defmt-0.2.x` -> `defmt-0.3.x`. ### Added diff --git a/Cargo.toml b/Cargo.toml index 046a3b0c..04c300e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,13 +65,8 @@ slice-group-by = "0.3.1" [features] can = ["dep:bxcan"] default = ["rt", "ld", "usb", "can", "rtc", "enumset"] -defmt-debug = ["dep:defmt"] +defmt = ["dep:defmt"] -defmt-default = ["dep:defmt"] -defmt-error = ["dep:defmt"] -defmt-info = ["dep:defmt"] -defmt-trace = ["dep:defmt"] -defmt-warn = ["dep:defmt"] device-selected = [] direct-call-deprecated = [] From 7aee3db9554704c5421178910ad255914cc8aaaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Mon, 27 Nov 2023 08:15:15 +0100 Subject: [PATCH 4/6] Remove stm32-usbd feature --- .github/workflows/msrv.yml | 4 ++-- CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index c7fd6e91..58b89797 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -19,7 +19,7 @@ jobs: with: toolchain: 1.59.0 target: thumbv7em-none-eabihf - - run: cargo check --features=stm32f303xc,stm32-usbd,rt,can,ld --lib + - run: cargo check --features=stm32f303xc,usb,rt,can,ld --lib check-min-deps: name: Check Minimal Dependency Versions @@ -35,5 +35,5 @@ jobs: toolchain: nightly target: thumbv7em-none-eabihf - run: cargo +nightly update -Z minimal-versions - - run: cargo check --features=stm32f303xc,stm32-usbd,rt,can,ld --lib --examples + - run: cargo check --features=stm32f303xc,usb,rt,can,ld --lib --examples diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1d0006..5a7f0479 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). was hard to find out anyway. - Remove `defmt-*` features (`defmt` feature is still available), to finalize migration from `defmt-0.2.x` -> `defmt-0.3.x`. +- Removed implicit `stm32-usbd` feature (use `usb` instead) ### Added From 9e7c1e3cc99e5fa101001e3ea763026825c66932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Mon, 27 Nov 2023 08:18:50 +0100 Subject: [PATCH 5/6] Update MSRV to 1.60 --- .github/workflows/msrv.yml | 2 +- CHANGELOG.md | 6 +++++- Cargo.toml | 2 +- README.md | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 58b89797..94e2b4e8 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.59.0 + toolchain: 1.60.0 target: thumbv7em-none-eabihf - run: cargo check --features=stm32f303xc,usb,rt,can,ld --lib diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a7f0479..28748c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Update `stm32f3` pac to v0.15.1 ([#335]) - Update `bxcan` pac to v0.7.0 ([#335]) -- The MSRV was bumped to 1.59 ([#335]) - Deprecate `Toggle` enum and use `Switch` instead for better naming purposes ([#334]) - Add `impl From for Switch` to reduce churn. @@ -51,6 +50,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). It is also not consistent with the rest of the crates API. ([#352]) - Use [critical-section] crate instead of `interrupt_free`, which is not always sound. ([#350]) + It is also not consistent with the rest of the crates API. +- Use [critical-section] crate instead of `interrupt_free`, which is not always + sound. +- The MSRV was bumped to 1.60 ([#349]) [critical-section]: https://github.com/rust-embedded/critical-section @@ -621,6 +624,7 @@ let clocks = rcc [#352]: https://github.com/stm32-rs/stm32f3xx-hal/pull/352 [#351]: https://github.com/stm32-rs/stm32f3xx-hal/pull/351 [#350]: https://github.com/stm32-rs/stm32f3xx-hal/pull/350 +[#349]: https://github.com/stm32-rs/stm32f3xx-hal/pull/349 [#345]: https://github.com/stm32-rs/stm32f3xx-hal/pull/345 [#346]: https://github.com/stm32-rs/stm32f3xx-hal/pull/346 [#347]: https://github.com/stm32-rs/stm32f3xx-hal/pull/347 diff --git a/Cargo.toml b/Cargo.toml index 04c300e5..84efa8db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ documentation = "https://docs.rs/stm32f3xx-hal" version = "0.9.2" exclude = ["codegen", ".markdownlint.yml"] resolver = "2" -rust-version = "1.59" +rust-version = "1.60" [package.metadata.docs.rs] features = ["stm32f303xc", "rt", "usb", "can", "enumset"] diff --git a/README.md b/README.md index f94378eb..c94bd392 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Crate](https://img.shields.io/crates/v/stm32f3xx-hal.svg)](https://crates.io/crates/stm32f3xx-hal) [![Docs](https://docs.rs/stm32f3xx-hal/badge.svg)](https://docs.rs/stm32f3xx-hal) [![Crates.io](https://img.shields.io/crates/d/stm32f3xx-hal.svg)](https://crates.io/crates/stm32f3xx-hal) -![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.59+-blue.svg) +![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg) `stm32f3xx-hal` contains a multi device hardware abstraction on top of the peripheral access API for the STMicro STM32F3 series microcontrollers. The @@ -138,7 +138,7 @@ See the [examples folder](examples) for more example programs. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.59.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.60.0 and up. It *might* compile with older versions but that may change in any new patch release. From 02f0dd97975e3402eb4a7c1f0224f172dda19e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Vi=C3=B6l?= Date: Tue, 28 Nov 2023 09:40:00 +0100 Subject: [PATCH 6/6] update dependecies --- .github/workflows/msrv.yml | 7 +------ CHANGELOG.md | 5 ++--- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 94e2b4e8..b6fdfd00 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -1,8 +1,6 @@ name: MSRV on: - push: - branches: [master] pull_request: merge_group: @@ -26,14 +24,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - target: thumbv7em-none-eabihf - uses: dtolnay/rust-toolchain@stable with: toolchain: nightly target: thumbv7em-none-eabihf - run: cargo +nightly update -Z minimal-versions + - run: cargo tree - run: cargo check --features=stm32f303xc,usb,rt,can,ld --lib --examples diff --git a/CHANGELOG.md b/CHANGELOG.md index 28748c56..ba30b12a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,10 +27,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Remove `Serial::split`, which possibly creates two mutable references two one Serial instance, which could've caused UB. The use case of this function was hard to find out anyway. ([#351]) - was hard to find out anyway. - Remove `defmt-*` features (`defmt` feature is still available), to finalize - migration from `defmt-0.2.x` -> `defmt-0.3.x`. -- Removed implicit `stm32-usbd` feature (use `usb` instead) + migration from `defmt-0.2.x` -> `defmt-0.3.x`. ([#349]) +- Removed implicit `stm32-usbd` feature (use `usb` instead) ([#349]) ### Added diff --git a/Cargo.toml b/Cargo.toml index 84efa8db..ca03fc65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ embedded-dma = "0.2.0" embedded-hal = { version = "0.2.7", features = ["unproven"] } embedded-time = "0.12.1" enumset = { version = "1.1.3", optional = true } -nb = "1.0.0" +nb = "1.1.0" num-traits = { version = "0.2.17", default-features = false} paste = "1.0.14" rtcc = { version = "0.3.0", optional = true }