From 706ffce2fc758eec5239b845a018d703d9e9a8f6 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 3 Jan 2022 19:02:57 +0100 Subject: [PATCH] Updated to RTIC 1.0 and defmt 0.3 --- Cargo.toml | 25 ++++--------------------- src/bin/minimal.rs | 2 -- testsuite/Cargo.toml | 29 +++++++---------------------- 3 files changed, 11 insertions(+), 45 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a4d6d86..6c22f9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,30 +9,13 @@ version = "0.1.0" members = ["testsuite"] [dependencies] -cortex-m = "0.7.1" -cortex-m-rt = "0.6.13" -defmt = "0.2.0" -defmt-rtt = "0.2.0" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } -cortex-m-rtic = "0.6.0-rc.4" +defmt = "0.3.0" +defmt-rtt = "0.3.0" +panic-probe = { version = "0.3.0", features = ["print-defmt"] } +cortex-m-rtic = "1" # TODO(4) enter your HAL here # some-hal = "1.2.3" -[features] -# set logging levels here -default = [ - "defmt-default", - # "dependency-a/defmt-trace", -] - -# do NOT modify these features -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - # cargo build/run [profile.dev] codegen-units = 1 diff --git a/src/bin/minimal.rs b/src/bin/minimal.rs index e9988ee..5fef442 100644 --- a/src/bin/minimal.rs +++ b/src/bin/minimal.rs @@ -43,8 +43,6 @@ mod app { } // Optional idle, can be removed if not needed. - // Note that removing this will put the MCU to sleep when no task is running, and this - // generally breaks RTT based printing. #[idle] fn idle(_: idle::Context) -> ! { defmt::info!("idle"); diff --git a/testsuite/Cargo.toml b/testsuite/Cargo.toml index 3567356..5ee1296 100644 --- a/testsuite/Cargo.toml +++ b/testsuite/Cargo.toml @@ -3,7 +3,7 @@ authors = ["{{authors}}"] name = "testsuite" publish = false -edition = "2018" +edition = "2021" version = "0.1.0" [lib] @@ -15,25 +15,10 @@ harness = false [dependencies] {{project-name}} = { path = ".." } -cortex-m = "0.7.1" -cortex-m-rt = "0.6.12" -defmt = "0.2.0" -defmt-rtt = "0.2.0" -defmt-test = "0.2.0" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +cortex-m = "0.7" +cortex-m-rt = "0.7" +defmt = "0.3.0" +defmt-rtt = "0.3.0" +defmt-test = "0.3.0" +panic-probe = { version = "0.3.0", features = ["print-defmt"] } -[features] -# set logging levels here -default = [ - # in tests, enable all logs - "defmt-trace", - # "dependency-a/defmt-trace", -] - -# do NOT modify these features -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = []