aboutsummaryrefslogtreecommitdiff
path: root/examples/boot
diff options
context:
space:
mode:
authorQuentin Smith <[email protected]>2022-08-19 00:53:06 -0400
committerQuentin Smith <[email protected]>2022-08-19 00:53:41 -0400
commit71e468681b1c074e06276d34ff00e36169c632f5 (patch)
treece86220caabbdc044720df8efb23de7bc4c36ea0 /examples/boot
parent2edf532f8d8ce048137990bf74b07759428ed7c1 (diff)
parentaefa5275a2ab2cac6caef599e7adb76ce1beeddd (diff)
Merge branch 'master' of https://github.com/embassy-rs/embassy into rtos-trace
Diffstat (limited to 'examples/boot')
-rw-r--r--examples/boot/application/nrf/Cargo.toml5
-rw-r--r--examples/boot/application/nrf/src/bin/a.rs5
-rw-r--r--examples/boot/application/nrf/src/bin/b.rs7
-rw-r--r--examples/boot/application/stm32f3/Cargo.toml5
-rw-r--r--examples/boot/application/stm32f3/src/bin/a.rs5
-rw-r--r--examples/boot/application/stm32f3/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32f7/Cargo.toml5
-rw-r--r--examples/boot/application/stm32f7/src/bin/a.rs5
-rw-r--r--examples/boot/application/stm32f7/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32h7/Cargo.toml5
-rw-r--r--examples/boot/application/stm32h7/src/bin/a.rs5
-rw-r--r--examples/boot/application/stm32h7/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32l0/Cargo.toml5
-rw-r--r--examples/boot/application/stm32l0/src/bin/a.rs7
-rw-r--r--examples/boot/application/stm32l0/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32l1/Cargo.toml5
-rw-r--r--examples/boot/application/stm32l1/src/bin/a.rs7
-rw-r--r--examples/boot/application/stm32l1/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32l4/Cargo.toml5
-rw-r--r--examples/boot/application/stm32l4/src/bin/a.rs5
-rw-r--r--examples/boot/application/stm32l4/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32wl/Cargo.toml5
-rw-r--r--examples/boot/application/stm32wl/src/bin/a.rs5
-rw-r--r--examples/boot/application/stm32wl/src/bin/b.rs8
-rw-r--r--examples/boot/bootloader/nrf/Cargo.toml2
-rw-r--r--examples/boot/bootloader/stm32/Cargo.toml2
26 files changed, 84 insertions, 67 deletions
diff --git a/examples/boot/application/nrf/Cargo.toml b/examples/boot/application/nrf/Cargo.toml
index dd9bcc093..ef9346639 100644
--- a/examples/boot/application/nrf/Cargo.toml
+++ b/examples/boot/application/nrf/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util" } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util" }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
9embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly", "nrf52840"] } 10embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly", "nrf52840"] }
10embassy-boot-nrf = { version = "0.1.0", path = "../../../../embassy-boot/nrf" } 11embassy-boot-nrf = { version = "0.1.0", path = "../../../../embassy-boot/nrf" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,5 +16,5 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
diff --git a/examples/boot/application/nrf/src/bin/a.rs b/examples/boot/application/nrf/src/bin/a.rs
index 3044645a8..bd8fa3246 100644
--- a/examples/boot/application/nrf/src/bin/a.rs
+++ b/examples/boot/application/nrf/src/bin/a.rs
@@ -6,15 +6,16 @@
6 6
7use embassy_boot_nrf::FirmwareUpdater; 7use embassy_boot_nrf::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; 10use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
10use embassy_nrf::nvmc::Nvmc; 11use embassy_nrf::nvmc::Nvmc;
11use embassy_nrf::Peripherals;
12use panic_reset as _; 12use panic_reset as _;
13 13
14static APP_B: &[u8] = include_bytes!("../../b.bin"); 14static APP_B: &[u8] = include_bytes!("../../b.bin");
15 15
16#[embassy_executor::main] 16#[embassy_executor::main]
17async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 17async fn main(_spawner: Spawner) {
18 let p = embassy_nrf::init(Default::default());
18 let mut button = Input::new(p.P0_11, Pull::Up); 19 let mut button = Input::new(p.P0_11, Pull::Up);
19 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); 20 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard);
20 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); 21 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard);
diff --git a/examples/boot/application/nrf/src/bin/b.rs b/examples/boot/application/nrf/src/bin/b.rs
index 2f76d20c6..5394bf0c7 100644
--- a/examples/boot/application/nrf/src/bin/b.rs
+++ b/examples/boot/application/nrf/src/bin/b.rs
@@ -4,13 +4,14 @@
4#![feature(generic_associated_types)] 4#![feature(generic_associated_types)]
5#![feature(type_alias_impl_trait)] 5#![feature(type_alias_impl_trait)]
6 6
7use embassy_executor::time::{Duration, Timer}; 7use embassy_executor::Spawner;
8use embassy_nrf::gpio::{Level, Output, OutputDrive}; 8use embassy_nrf::gpio::{Level, Output, OutputDrive};
9use embassy_nrf::Peripherals; 9use embassy_time::{Duration, Timer};
10use panic_reset as _; 10use panic_reset as _;
11 11
12#[embassy_executor::main] 12#[embassy_executor::main]
13async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_nrf::init(Default::default());
14 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); 15 let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard);
15 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard); 16 //let mut led = Output::new(p.P1_10, Level::Low, OutputDrive::Standard);
16 17
diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml
index 313808a0d..27eafa653 100644
--- a/examples/boot/application/stm32f3/Cargo.toml
+++ b/examples/boot/application/stm32f3/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32f3/src/bin/a.rs b/examples/boot/application/stm32f3/src/bin/a.rs
index fd18e9373..11eecc5e2 100644
--- a/examples/boot/application/stm32f3/src/bin/a.rs
+++ b/examples/boot/application/stm32f3/src/bin/a.rs
@@ -6,16 +6,17 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
10use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
12use embassy_stm32::Peripherals;
13use panic_reset as _; 13use panic_reset as _;
14 14
15static APP_B: &[u8] = include_bytes!("../../b.bin"); 15static APP_B: &[u8] = include_bytes!("../../b.bin");
16 16
17#[embassy_executor::main] 17#[embassy_executor::main]
18async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 18async fn main(_spawner: Spawner) {
19 let p = embassy_stm32::init(Default::default());
19 let flash = Flash::unlock(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
20 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
21 22
diff --git a/examples/boot/application/stm32f3/src/bin/b.rs b/examples/boot/application/stm32f3/src/bin/b.rs
index 934f862d9..a5862b1b0 100644
--- a/examples/boot/application/stm32f3/src/bin/b.rs
+++ b/examples/boot/application/stm32f3/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 let mut led = Output::new(p.PA5, Level::High, Speed::Low); 15 let mut led = Output::new(p.PA5, Level::High, Speed::Low);
16 16
17 loop { 17 loop {
diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml
index 2a4741dc7..7de0b82d7 100644
--- a/examples/boot/application/stm32f7/Cargo.toml
+++ b/examples/boot/application/stm32f7/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32f7/src/bin/a.rs b/examples/boot/application/stm32f7/src/bin/a.rs
index 10d709cfd..a3b66e7c9 100644
--- a/examples/boot/application/stm32f7/src/bin/a.rs
+++ b/examples/boot/application/stm32f7/src/bin/a.rs
@@ -6,16 +6,17 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
10use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
12use embassy_stm32::Peripherals;
13use panic_reset as _; 13use panic_reset as _;
14 14
15static APP_B: &[u8] = include_bytes!("../../b.bin"); 15static APP_B: &[u8] = include_bytes!("../../b.bin");
16 16
17#[embassy_executor::main] 17#[embassy_executor::main]
18async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 18async fn main(_spawner: Spawner) {
19 let p = embassy_stm32::init(Default::default());
19 let flash = Flash::unlock(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
20 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
21 22
diff --git a/examples/boot/application/stm32f7/src/bin/b.rs b/examples/boot/application/stm32f7/src/bin/b.rs
index c89e8a310..16c94d845 100644
--- a/examples/boot/application/stm32f7/src/bin/b.rs
+++ b/examples/boot/application/stm32f7/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 Timer::after(Duration::from_millis(300)).await; 15 Timer::after(Duration::from_millis(300)).await;
16 let mut led = Output::new(p.PB7, Level::High, Speed::Low); 16 let mut led = Output::new(p.PB7, Level::High, Speed::Low);
17 led.set_high(); 17 led.set_high();
diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml
index c6420e8ad..65d34c70b 100644
--- a/examples/boot/application/stm32h7/Cargo.toml
+++ b/examples/boot/application/stm32h7/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32h7/src/bin/a.rs b/examples/boot/application/stm32h7/src/bin/a.rs
index cc363bb32..0ecf60348 100644
--- a/examples/boot/application/stm32h7/src/bin/a.rs
+++ b/examples/boot/application/stm32h7/src/bin/a.rs
@@ -6,16 +6,17 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
10use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
12use embassy_stm32::Peripherals;
13use panic_reset as _; 13use panic_reset as _;
14 14
15static APP_B: &[u8] = include_bytes!("../../b.bin"); 15static APP_B: &[u8] = include_bytes!("../../b.bin");
16 16
17#[embassy_executor::main] 17#[embassy_executor::main]
18async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 18async fn main(_spawner: Spawner) {
19 let p = embassy_stm32::init(Default::default());
19 let flash = Flash::unlock(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
20 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
21 22
diff --git a/examples/boot/application/stm32h7/src/bin/b.rs b/examples/boot/application/stm32h7/src/bin/b.rs
index 3fa63bdcf..34799279c 100644
--- a/examples/boot/application/stm32h7/src/bin/b.rs
+++ b/examples/boot/application/stm32h7/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 Timer::after(Duration::from_millis(300)).await; 15 Timer::after(Duration::from_millis(300)).await;
16 let mut led = Output::new(p.PB14, Level::High, Speed::Low); 16 let mut led = Output::new(p.PB14, Level::High, Speed::Low);
17 led.set_high(); 17 led.set_high();
diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml
index a6936419c..8f37869e3 100644
--- a/examples/boot/application/stm32l0/Cargo.toml
+++ b/examples/boot/application/stm32l0/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32l0/src/bin/a.rs b/examples/boot/application/stm32l0/src/bin/a.rs
index fcf3f2ef1..f4f1d7119 100644
--- a/examples/boot/application/stm32l0/src/bin/a.rs
+++ b/examples/boot/application/stm32l0/src/bin/a.rs
@@ -6,17 +6,18 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::time::{Duration, Timer}; 9use embassy_executor::Spawner;
10use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
11use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
13use embassy_stm32::Peripherals; 13use embassy_time::{Duration, Timer};
14use panic_reset as _; 14use panic_reset as _;
15 15
16static APP_B: &[u8] = include_bytes!("../../b.bin"); 16static APP_B: &[u8] = include_bytes!("../../b.bin");
17 17
18#[embassy_executor::main] 18#[embassy_executor::main]
19async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 19async fn main(_spawner: Spawner) {
20 let p = embassy_stm32::init(Default::default());
20 let flash = Flash::unlock(p.FLASH); 21 let flash = Flash::unlock(p.FLASH);
21 let mut flash = BlockingAsync::new(flash); 22 let mut flash = BlockingAsync::new(flash);
22 23
diff --git a/examples/boot/application/stm32l0/src/bin/b.rs b/examples/boot/application/stm32l0/src/bin/b.rs
index 46e394c4c..ee40274ff 100644
--- a/examples/boot/application/stm32l0/src/bin/b.rs
+++ b/examples/boot/application/stm32l0/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 let mut led = Output::new(p.PB6, Level::High, Speed::Low); 15 let mut led = Output::new(p.PB6, Level::High, Speed::Low);
16 16
17 loop { 17 loop {
diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml
index 5e53cd5f6..6abf1986d 100644
--- a/examples/boot/application/stm32l1/Cargo.toml
+++ b/examples/boot/application/stm32l1/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32l1/src/bin/a.rs b/examples/boot/application/stm32l1/src/bin/a.rs
index fcf3f2ef1..f4f1d7119 100644
--- a/examples/boot/application/stm32l1/src/bin/a.rs
+++ b/examples/boot/application/stm32l1/src/bin/a.rs
@@ -6,17 +6,18 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::time::{Duration, Timer}; 9use embassy_executor::Spawner;
10use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
11use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
13use embassy_stm32::Peripherals; 13use embassy_time::{Duration, Timer};
14use panic_reset as _; 14use panic_reset as _;
15 15
16static APP_B: &[u8] = include_bytes!("../../b.bin"); 16static APP_B: &[u8] = include_bytes!("../../b.bin");
17 17
18#[embassy_executor::main] 18#[embassy_executor::main]
19async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 19async fn main(_spawner: Spawner) {
20 let p = embassy_stm32::init(Default::default());
20 let flash = Flash::unlock(p.FLASH); 21 let flash = Flash::unlock(p.FLASH);
21 let mut flash = BlockingAsync::new(flash); 22 let mut flash = BlockingAsync::new(flash);
22 23
diff --git a/examples/boot/application/stm32l1/src/bin/b.rs b/examples/boot/application/stm32l1/src/bin/b.rs
index 46e394c4c..ee40274ff 100644
--- a/examples/boot/application/stm32l1/src/bin/b.rs
+++ b/examples/boot/application/stm32l1/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 let mut led = Output::new(p.PB6, Level::High, Speed::Low); 15 let mut led = Output::new(p.PB6, Level::High, Speed::Low);
16 16
17 loop { 17 loop {
diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml
index bbb5e7e1d..6f2d12ff1 100644
--- a/examples/boot/application/stm32l4/Cargo.toml
+++ b/examples/boot/application/stm32l4/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32l4/src/bin/a.rs b/examples/boot/application/stm32l4/src/bin/a.rs
index f092f0239..178b2e04a 100644
--- a/examples/boot/application/stm32l4/src/bin/a.rs
+++ b/examples/boot/application/stm32l4/src/bin/a.rs
@@ -6,16 +6,17 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
10use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
12use embassy_stm32::Peripherals;
13use panic_reset as _; 13use panic_reset as _;
14 14
15static APP_B: &[u8] = include_bytes!("../../b.bin"); 15static APP_B: &[u8] = include_bytes!("../../b.bin");
16 16
17#[embassy_executor::main] 17#[embassy_executor::main]
18async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 18async fn main(_spawner: Spawner) {
19 let p = embassy_stm32::init(Default::default());
19 let flash = Flash::unlock(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
20 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
21 22
diff --git a/examples/boot/application/stm32l4/src/bin/b.rs b/examples/boot/application/stm32l4/src/bin/b.rs
index 934f862d9..a5862b1b0 100644
--- a/examples/boot/application/stm32l4/src/bin/b.rs
+++ b/examples/boot/application/stm32l4/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 let mut led = Output::new(p.PA5, Level::High, Speed::Low); 15 let mut led = Output::new(p.PA5, Level::High, Speed::Low);
16 16
17 loop { 17 loop {
diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml
index 62123a870..be97d4ebb 100644
--- a/examples/boot/application/stm32wl/Cargo.toml
+++ b/examples/boot/application/stm32wl/Cargo.toml
@@ -5,7 +5,8 @@ version = "0.1.0"
5 5
6[dependencies] 6[dependencies]
7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] } 7embassy-util = { version = "0.1.0", path = "../../../../embassy-util", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "time-tick-32768hz"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] }
9embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
10embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
11embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
@@ -15,7 +16,7 @@ defmt-rtt = { version = "0.3", optional = true }
15panic-reset = { version = "0.1.1" } 16panic-reset = { version = "0.1.1" }
16embedded-hal = { version = "0.2.6" } 17embedded-hal = { version = "0.2.6" }
17 18
18cortex-m = "0.7.3" 19cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
19cortex-m-rt = "0.7.0" 20cortex-m-rt = "0.7.0"
20 21
21[features] 22[features]
diff --git a/examples/boot/application/stm32wl/src/bin/a.rs b/examples/boot/application/stm32wl/src/bin/a.rs
index 14408a90a..c71a42654 100644
--- a/examples/boot/application/stm32wl/src/bin/a.rs
+++ b/examples/boot/application/stm32wl/src/bin/a.rs
@@ -6,16 +6,17 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_boot_stm32::FirmwareUpdater; 7use embassy_boot_stm32::FirmwareUpdater;
8use embassy_embedded_hal::adapter::BlockingAsync; 8use embassy_embedded_hal::adapter::BlockingAsync;
9use embassy_executor::Spawner;
9use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
10use embassy_stm32::flash::Flash; 11use embassy_stm32::flash::Flash;
11use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
12use embassy_stm32::Peripherals;
13use panic_reset as _; 13use panic_reset as _;
14 14
15static APP_B: &[u8] = include_bytes!("../../b.bin"); 15static APP_B: &[u8] = include_bytes!("../../b.bin");
16 16
17#[embassy_executor::main] 17#[embassy_executor::main]
18async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { 18async fn main(_spawner: Spawner) {
19 let p = embassy_stm32::init(Default::default());
19 let flash = Flash::unlock(p.FLASH); 20 let flash = Flash::unlock(p.FLASH);
20 let mut flash = BlockingAsync::new(flash); 21 let mut flash = BlockingAsync::new(flash);
21 22
diff --git a/examples/boot/application/stm32wl/src/bin/b.rs b/examples/boot/application/stm32wl/src/bin/b.rs
index e565fd7c6..f9f0ffc60 100644
--- a/examples/boot/application/stm32wl/src/bin/b.rs
+++ b/examples/boot/application/stm32wl/src/bin/b.rs
@@ -4,14 +4,14 @@
4 4
5#[cfg(feature = "defmt-rtt")] 5#[cfg(feature = "defmt-rtt")]
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_executor::time::{Duration, Timer};
9use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
10use embassy_stm32::Peripherals; 9use embassy_time::{Duration, Timer};
11use panic_reset as _; 10use panic_reset as _;
12 11
13#[embassy_executor::main] 12#[embassy_executor::main]
14async fn main(_spawner: Spawner, p: Peripherals) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default());
15 let mut led = Output::new(p.PB15, Level::High, Speed::Low); 15 let mut led = Output::new(p.PB15, Level::High, Speed::Low);
16 16
17 loop { 17 loop {
diff --git a/examples/boot/bootloader/nrf/Cargo.toml b/examples/boot/bootloader/nrf/Cargo.toml
index 9683bff19..aa2a13ecb 100644
--- a/examples/boot/bootloader/nrf/Cargo.toml
+++ b/examples/boot/bootloader/nrf/Cargo.toml
@@ -10,7 +10,7 @@ defmt-rtt = { version = "0.3", optional = true }
10 10
11embassy-nrf = { path = "../../../../embassy-nrf", default-features = false, features = ["nightly"] } 11embassy-nrf = { path = "../../../../embassy-nrf", default-features = false, features = ["nightly"] }
12embassy-boot-nrf = { path = "../../../../embassy-boot/nrf", default-features = false } 12embassy-boot-nrf = { path = "../../../../embassy-boot/nrf", default-features = false }
13cortex-m = { version = "0.7" } 13cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
14cortex-m-rt = { version = "0.7" } 14cortex-m-rt = { version = "0.7" }
15cfg-if = "1.0.0" 15cfg-if = "1.0.0"
16 16
diff --git a/examples/boot/bootloader/stm32/Cargo.toml b/examples/boot/bootloader/stm32/Cargo.toml
index 4a3319528..491777103 100644
--- a/examples/boot/bootloader/stm32/Cargo.toml
+++ b/examples/boot/bootloader/stm32/Cargo.toml
@@ -10,7 +10,7 @@ defmt-rtt = { version = "0.3", optional = true }
10 10
11embassy-stm32 = { path = "../../../../embassy-stm32", default-features = false, features = ["nightly"] } 11embassy-stm32 = { path = "../../../../embassy-stm32", default-features = false, features = ["nightly"] }
12embassy-boot-stm32 = { path = "../../../../embassy-boot/stm32", default-features = false } 12embassy-boot-stm32 = { path = "../../../../embassy-boot/stm32", default-features = false }
13cortex-m = { version = "0.7" } 13cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
14cortex-m-rt = { version = "0.7" } 14cortex-m-rt = { version = "0.7" }
15embedded-storage = "0.3.0" 15embedded-storage = "0.3.0"
16embedded-storage-async = "0.3.0" 16embedded-storage-async = "0.3.0"