From 92d4b78282a52baff4ca200c11e3479c2b468a17 Mon Sep 17 00:00:00 2001 From: Romain Reignier Date: Fri, 1 Nov 2024 20:15:27 +0100 Subject: [PATCH] Follow ch32-hal usage and update dependencies (#9) --- Cargo.toml | 11 ++++++----- rust-toolchain.toml | 2 +- src/main.rs | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a326ea7..a8de1ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,18 +15,19 @@ ch32-hal = { git = "https://github.com/ch32-rs/ch32-hal.git", features = [ "embassy", "time-driver-tim2", "rt", + "memory-x", ] } -embassy-executor = { version = "0.5.0", features = [ - "nightly", +embassy-executor = { version = "0.6.1", features = [ "integrated-timers", "arch-riscv32", "executor-thread", + "task-arena-size-128", # or better use nightly, but fails on recent Rust versions ] } embassy-time = { version = "0.3.0" } -qingke-rt = "0.2.1" -qingke = "0.2.0" +qingke-rt = "0.4.0" +qingke = "0.4.0" embedded-hal = "1.0.0" -panic-halt = "0.2.0" +panic-halt = "1.0.0" [profile.release] strip = false # symbols are not flashed to the microcontroller, so don't strip them. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 68f6702..e319b91 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-06-12" +channel = "nightly" {% if mcu_family != "ch32v003" and mcu_family != "ch641" -%} targets = ["{{ target }}"] {%- endif %} diff --git a/src/main.rs b/src/main.rs index f6c7158..07f4b0a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,6 @@ async fn blink(pin: AnyPin, interval_ms: u64) { async fn main(spawner: Spawner) -> ! { ch32_hal::debug::SDIPrint::enable(); let p = ch32_hal::init(ch32_hal::Config::default()); - ch32_hal::embassy::init(); // Adjust the LED GPIO according to your board spawner.spawn(blink(p.PA0.degrade(), 1000)).unwrap();