Merge #1383
1383: embassy-boot: Add nightly flag r=Dirbaio a=sawi97 This adds "nightly" as a flag to embassy-boot and embassy-boot-nrf which gates features requiring nightly, enabled by default. Makes it possible to build the bootloader with the stable compiler when setting `default-features=false`. It should be straight forward to do this for stm32 and rp as well, but I am not been able to test it. Co-authored-by: sander <sander.wittwer@dengineering.no> Co-authored-by: sawi97 <34313578+sawi97@users.noreply.github.com>
This commit is contained in:
commit
fb27594b2e
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
@ -71,7 +71,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Test boot
|
- name: Test boot
|
||||||
working-directory: ./embassy-boot/boot
|
working-directory: ./embassy-boot/boot
|
||||||
run: cargo test && cargo test --features "ed25519-dalek" && cargo test --features "ed25519-salty"
|
run: cargo test && cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly"
|
||||||
|
|
||||||
- name: Test sync
|
- name: Test sync
|
||||||
working-directory: ./embassy-sync
|
working-directory: ./embassy-sync
|
||||||
|
8
ci.sh
8
ci.sh
@ -69,10 +69,10 @@ cargo batch \
|
|||||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,unstable-traits \
|
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,unstable-traits \
|
||||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32h503rb,defmt,exti,time-driver-any,unstable-traits \
|
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32h503rb,defmt,exti,time-driver-any,unstable-traits \
|
||||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32h562ag,defmt,exti,time-driver-any,unstable-traits \
|
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32h562ag,defmt,exti,time-driver-any,unstable-traits \
|
||||||
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \
|
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840,nightly \
|
||||||
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns \
|
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns,nightly \
|
||||||
--- build --release --manifest-path embassy-boot/rp/Cargo.toml --target thumbv6m-none-eabi \
|
--- build --release --manifest-path embassy-boot/rp/Cargo.toml --target thumbv6m-none-eabi --features nightly \
|
||||||
--- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \
|
--- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4,nightly \
|
||||||
--- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \
|
--- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \
|
||||||
--- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \
|
--- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \
|
||||||
--- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \
|
--- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \
|
||||||
|
@ -9,6 +9,10 @@ export DEFMT_LOG=trace
|
|||||||
sed -i 's/channel.*/channel = "stable"/g' rust-toolchain.toml
|
sed -i 's/channel.*/channel = "stable"/g' rust-toolchain.toml
|
||||||
|
|
||||||
cargo batch \
|
cargo batch \
|
||||||
|
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \
|
||||||
|
--- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns \
|
||||||
|
--- build --release --manifest-path embassy-boot/rp/Cargo.toml --target thumbv6m-none-eabi \
|
||||||
|
--- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \
|
||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi \
|
||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features log \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features log \
|
||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features defmt \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features defmt \
|
||||||
|
@ -29,7 +29,7 @@ log = { version = "0.4", optional = true }
|
|||||||
ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true }
|
ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true }
|
||||||
embassy-sync = { version = "0.2.0", path = "../../embassy-sync" }
|
embassy-sync = { version = "0.2.0", path = "../../embassy-sync" }
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
embedded-storage-async = "0.4.0"
|
embedded-storage-async = { version = "0.4.0", optional = true}
|
||||||
salty = { git = "https://github.com/ycrypto/salty.git", rev = "a9f17911a5024698406b75c0fac56ab5ccf6a8c7", optional = true }
|
salty = { git = "https://github.com/ycrypto/salty.git", rev = "a9f17911a5024698406b75c0fac56ab5ccf6a8c7", optional = true }
|
||||||
signature = { version = "1.6.4", default-features = false }
|
signature = { version = "1.6.4", default-features = false }
|
||||||
|
|
||||||
@ -48,5 +48,7 @@ features = ["rand", "std", "u32_backend"]
|
|||||||
ed25519-dalek = ["dep:ed25519-dalek", "_verify"]
|
ed25519-dalek = ["dep:ed25519-dalek", "_verify"]
|
||||||
ed25519-salty = ["dep:salty", "_verify"]
|
ed25519-salty = ["dep:salty", "_verify"]
|
||||||
|
|
||||||
|
nightly = ["dep:embedded-storage-async"]
|
||||||
|
|
||||||
#Internal features
|
#Internal features
|
||||||
_verify = []
|
_verify = []
|
||||||
|
@ -18,7 +18,7 @@ The bootloader supports different hardware in separate crates:
|
|||||||
|
|
||||||
## Minimum supported Rust version (MSRV)
|
## Minimum supported Rust version (MSRV)
|
||||||
|
|
||||||
`embassy-boot` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals.
|
`embassy-boot` is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use digest::Digest;
|
use digest::Digest;
|
||||||
use embedded_storage::nor_flash::{NorFlash, NorFlashError, NorFlashErrorKind};
|
use embedded_storage::nor_flash::{NorFlash, NorFlashError, NorFlashErrorKind};
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash;
|
use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash;
|
||||||
|
|
||||||
use crate::{Partition, State, BOOT_MAGIC, SWAP_MAGIC};
|
use crate::{Partition, State, BOOT_MAGIC, SWAP_MAGIC};
|
||||||
@ -78,6 +79,7 @@ impl FirmwareUpdater {
|
|||||||
/// This is useful to check if the bootloader has just done a swap, in order
|
/// This is useful to check if the bootloader has just done a swap, in order
|
||||||
/// to do verifications and self-tests of the new image before calling
|
/// to do verifications and self-tests of the new image before calling
|
||||||
/// `mark_booted`.
|
/// `mark_booted`.
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn get_state<F: AsyncNorFlash>(
|
pub async fn get_state<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state_flash: &mut F,
|
state_flash: &mut F,
|
||||||
@ -108,7 +110,7 @@ impl FirmwareUpdater {
|
|||||||
///
|
///
|
||||||
/// The `_aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being read from
|
/// The `_aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being read from
|
||||||
/// and written to.
|
/// and written to.
|
||||||
#[cfg(feature = "_verify")]
|
#[cfg(all(feature = "_verify", feature = "nightly"))]
|
||||||
pub async fn verify_and_mark_updated<F: AsyncNorFlash>(
|
pub async fn verify_and_mark_updated<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
_state_and_dfu_flash: &mut F,
|
_state_and_dfu_flash: &mut F,
|
||||||
@ -172,6 +174,7 @@ impl FirmwareUpdater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Verify the update in DFU with any digest.
|
/// Verify the update in DFU with any digest.
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn hash<F: AsyncNorFlash, D: Digest>(
|
pub async fn hash<F: AsyncNorFlash, D: Digest>(
|
||||||
&mut self,
|
&mut self,
|
||||||
dfu_flash: &mut F,
|
dfu_flash: &mut F,
|
||||||
@ -194,7 +197,7 @@ impl FirmwareUpdater {
|
|||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// The `aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being written to.
|
/// The `aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being written to.
|
||||||
#[cfg(not(feature = "_verify"))]
|
#[cfg(all(feature = "nightly", not(feature = "_verify")))]
|
||||||
pub async fn mark_updated<F: AsyncNorFlash>(
|
pub async fn mark_updated<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state_flash: &mut F,
|
state_flash: &mut F,
|
||||||
@ -209,6 +212,7 @@ impl FirmwareUpdater {
|
|||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// The `aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being written to.
|
/// The `aligned` buffer must have a size of F::WRITE_SIZE, and follow the alignment rules for the flash being written to.
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn mark_booted<F: AsyncNorFlash>(
|
pub async fn mark_booted<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
state_flash: &mut F,
|
state_flash: &mut F,
|
||||||
@ -218,6 +222,7 @@ impl FirmwareUpdater {
|
|||||||
self.set_magic(aligned, BOOT_MAGIC, state_flash).await
|
self.set_magic(aligned, BOOT_MAGIC, state_flash).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
async fn set_magic<F: AsyncNorFlash>(
|
async fn set_magic<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
aligned: &mut [u8],
|
aligned: &mut [u8],
|
||||||
@ -258,6 +263,7 @@ impl FirmwareUpdater {
|
|||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// Failing to meet alignment and size requirements may result in a panic.
|
/// Failing to meet alignment and size requirements may result in a panic.
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn write_firmware<F: AsyncNorFlash>(
|
pub async fn write_firmware<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
offset: usize,
|
offset: usize,
|
||||||
@ -280,6 +286,7 @@ impl FirmwareUpdater {
|
|||||||
///
|
///
|
||||||
/// Using this instead of `write_firmware` allows for an optimized API in
|
/// Using this instead of `write_firmware` allows for an optimized API in
|
||||||
/// exchange for added complexity.
|
/// exchange for added complexity.
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn prepare_update<F: AsyncNorFlash>(
|
pub async fn prepare_update<F: AsyncNorFlash>(
|
||||||
&mut self,
|
&mut self,
|
||||||
dfu_flash: &mut F,
|
dfu_flash: &mut F,
|
||||||
@ -513,6 +520,7 @@ mod tests {
|
|||||||
use crate::mem_flash::MemFlash;
|
use crate::mem_flash::MemFlash;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
fn can_verify_sha1() {
|
fn can_verify_sha1() {
|
||||||
const STATE: Partition = Partition::new(0, 4096);
|
const STATE: Partition = Partition::new(0, 4096);
|
||||||
const DFU: Partition = Partition::new(65536, 131072);
|
const DFU: Partition = Partition::new(65536, 131072);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#![feature(async_fn_in_trait)]
|
#![cfg_attr(feature = "nightly", feature(async_fn_in_trait))]
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
@ -83,7 +83,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(feature = "_verify"))]
|
#[cfg(all(feature = "nightly", not(feature = "_verify")))]
|
||||||
fn test_swap_state() {
|
fn test_swap_state() {
|
||||||
const STATE: Partition = Partition::new(0, 4096);
|
const STATE: Partition = Partition::new(0, 4096);
|
||||||
const ACTIVE: Partition = Partition::new(4096, 61440);
|
const ACTIVE: Partition = Partition::new(4096, 61440);
|
||||||
@ -136,7 +136,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(feature = "_verify"))]
|
#[cfg(all(feature = "nightly", not(feature = "_verify")))]
|
||||||
fn test_separate_flash_active_page_biggest() {
|
fn test_separate_flash_active_page_biggest() {
|
||||||
const STATE: Partition = Partition::new(2048, 4096);
|
const STATE: Partition = Partition::new(2048, 4096);
|
||||||
const ACTIVE: Partition = Partition::new(4096, 16384);
|
const ACTIVE: Partition = Partition::new(4096, 16384);
|
||||||
@ -173,7 +173,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(feature = "_verify"))]
|
#[cfg(all(feature = "nightly", not(feature = "_verify")))]
|
||||||
fn test_separate_flash_dfu_page_biggest() {
|
fn test_separate_flash_dfu_page_biggest() {
|
||||||
const STATE: Partition = Partition::new(2048, 4096);
|
const STATE: Partition = Partition::new(2048, 4096);
|
||||||
const ACTIVE: Partition = Partition::new(4096, 16384);
|
const ACTIVE: Partition = Partition::new(4096, 16384);
|
||||||
@ -212,7 +212,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "_verify")]
|
#[cfg(all(feature = "nightly", feature = "_verify"))]
|
||||||
fn test_verify() {
|
fn test_verify() {
|
||||||
// The following key setup is based on:
|
// The following key setup is based on:
|
||||||
// https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example
|
// https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
use core::ops::{Bound, Range, RangeBounds};
|
use core::ops::{Bound, Range, RangeBounds};
|
||||||
|
|
||||||
use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash};
|
use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash};
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
|
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
|
||||||
|
|
||||||
pub struct MemFlash<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> {
|
pub struct MemFlash<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> {
|
||||||
@ -134,6 +135,7 @@ impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> NorFla
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> AsyncReadNorFlash
|
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> AsyncReadNorFlash
|
||||||
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
|
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
|
||||||
{
|
{
|
||||||
@ -148,6 +150,7 @@ impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> AsyncR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> AsyncNorFlash
|
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> AsyncNorFlash
|
||||||
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
|
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
|
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
|
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
|
||||||
|
|
||||||
/// A region in flash used by the bootloader.
|
/// A region in flash used by the bootloader.
|
||||||
@ -23,6 +24,7 @@ impl Partition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Read from the partition on the provided flash
|
/// Read from the partition on the provided flash
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn read<F: AsyncReadNorFlash>(
|
pub async fn read<F: AsyncReadNorFlash>(
|
||||||
&self,
|
&self,
|
||||||
flash: &mut F,
|
flash: &mut F,
|
||||||
@ -34,6 +36,7 @@ impl Partition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Write to the partition on the provided flash
|
/// Write to the partition on the provided flash
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn write<F: AsyncNorFlash>(&self, flash: &mut F, offset: u32, bytes: &[u8]) -> Result<(), F::Error> {
|
pub async fn write<F: AsyncNorFlash>(&self, flash: &mut F, offset: u32, bytes: &[u8]) -> Result<(), F::Error> {
|
||||||
let offset = self.from as u32 + offset;
|
let offset = self.from as u32 + offset;
|
||||||
flash.write(offset, bytes).await?;
|
flash.write(offset, bytes).await?;
|
||||||
@ -42,6 +45,7 @@ impl Partition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Erase part of the partition on the provided flash
|
/// Erase part of the partition on the provided flash
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub async fn erase<F: AsyncNorFlash>(&self, flash: &mut F, from: u32, to: u32) -> Result<(), F::Error> {
|
pub async fn erase<F: AsyncNorFlash>(&self, flash: &mut F, from: u32, to: u32) -> Result<(), F::Error> {
|
||||||
let from = self.from as u32 + from;
|
let from = self.from as u32 + from;
|
||||||
let to = self.from as u32 + to;
|
let to = self.from as u32 + to;
|
||||||
@ -51,6 +55,7 @@ impl Partition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Erase the entire partition
|
/// Erase the entire partition
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
pub(crate) async fn wipe<F: AsyncNorFlash>(&self, flash: &mut F) -> Result<(), F::Error> {
|
pub(crate) async fn wipe<F: AsyncNorFlash>(&self, flash: &mut F) -> Result<(), F::Error> {
|
||||||
let from = self.from as u32;
|
let from = self.from as u32;
|
||||||
let to = self.to as u32;
|
let to = self.to as u32;
|
||||||
|
@ -17,12 +17,12 @@ target = "thumbv7em-none-eabi"
|
|||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
|
||||||
embassy-sync = { path = "../../embassy-sync" }
|
embassy-sync = { path = "../../embassy-sync" }
|
||||||
embassy-nrf = { path = "../../embassy-nrf", default-features = false, features = ["nightly"] }
|
embassy-nrf = { path = "../../embassy-nrf", default-features = false }
|
||||||
embassy-boot = { path = "../boot", default-features = false }
|
embassy-boot = { path = "../boot", default-features = false }
|
||||||
cortex-m = { version = "0.7.6" }
|
cortex-m = { version = "0.7.6" }
|
||||||
cortex-m-rt = { version = "0.7" }
|
cortex-m-rt = { version = "0.7" }
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
embedded-storage-async = "0.4.0"
|
embedded-storage-async = { version = "0.4.0", optional = true }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
|
|
||||||
nrf-softdevice-mbr = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-softdevice.git", branch = "master", optional = true }
|
nrf-softdevice-mbr = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-softdevice.git", branch = "master", optional = true }
|
||||||
@ -36,3 +36,8 @@ defmt = [
|
|||||||
softdevice = [
|
softdevice = [
|
||||||
"nrf-softdevice-mbr",
|
"nrf-softdevice-mbr",
|
||||||
]
|
]
|
||||||
|
nightly = [
|
||||||
|
"dep:embedded-storage-async",
|
||||||
|
"embassy-boot/nightly",
|
||||||
|
"embassy-nrf/nightly"
|
||||||
|
]
|
||||||
|
@ -13,7 +13,7 @@ An adaptation of `embassy-boot` for nRF.
|
|||||||
|
|
||||||
## Minimum supported Rust version (MSRV)
|
## Minimum supported Rust version (MSRV)
|
||||||
|
|
||||||
`embassy-boot-nrf` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals.
|
`embassy-boot-nrf` is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(type_alias_impl_trait)]
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
mod fmt;
|
mod fmt;
|
||||||
|
@ -18,14 +18,14 @@ defmt-rtt = { version = "0.4", optional = true }
|
|||||||
log = { version = "0.4", optional = true }
|
log = { version = "0.4", optional = true }
|
||||||
|
|
||||||
embassy-sync = { path = "../../embassy-sync" }
|
embassy-sync = { path = "../../embassy-sync" }
|
||||||
embassy-rp = { path = "../../embassy-rp", default-features = false, features = ["nightly"] }
|
embassy-rp = { path = "../../embassy-rp", default-features = false }
|
||||||
embassy-boot = { path = "../boot", default-features = false }
|
embassy-boot = { path = "../boot", default-features = false }
|
||||||
embassy-time = { path = "../../embassy-time", features = ["nightly"] }
|
embassy-time = { path = "../../embassy-time" }
|
||||||
|
|
||||||
cortex-m = { version = "0.7.6" }
|
cortex-m = { version = "0.7.6" }
|
||||||
cortex-m-rt = { version = "0.7" }
|
cortex-m-rt = { version = "0.7" }
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
embedded-storage-async = "0.4.0"
|
embedded-storage-async = { version = "0.4.0", optional = true }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
@ -40,6 +40,12 @@ log = [
|
|||||||
"embassy-rp/log",
|
"embassy-rp/log",
|
||||||
]
|
]
|
||||||
debug = ["defmt-rtt"]
|
debug = ["defmt-rtt"]
|
||||||
|
nightly = [
|
||||||
|
"dep:embedded-storage-async",
|
||||||
|
"embassy-boot/nightly",
|
||||||
|
"embassy-rp/nightly",
|
||||||
|
"embassy-time/nightly"
|
||||||
|
]
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
debug = 2
|
debug = 2
|
||||||
|
@ -13,7 +13,7 @@ NOTE: The applications using this bootloader should not link with the `link-rp.x
|
|||||||
|
|
||||||
## Minimum supported Rust version (MSRV)
|
## Minimum supported Rust version (MSRV)
|
||||||
|
|
||||||
`embassy-boot-rp` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals.
|
`embassy-boot-rp` is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(type_alias_impl_trait)]
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
mod fmt;
|
mod fmt;
|
||||||
|
@ -19,12 +19,12 @@ defmt-rtt = { version = "0.4", optional = true }
|
|||||||
log = { version = "0.4", optional = true }
|
log = { version = "0.4", optional = true }
|
||||||
|
|
||||||
embassy-sync = { path = "../../embassy-sync" }
|
embassy-sync = { path = "../../embassy-sync" }
|
||||||
embassy-stm32 = { path = "../../embassy-stm32", default-features = false, features = ["nightly"] }
|
embassy-stm32 = { path = "../../embassy-stm32", default-features = false }
|
||||||
embassy-boot = { path = "../boot", default-features = false }
|
embassy-boot = { path = "../boot", default-features = false }
|
||||||
cortex-m = { version = "0.7.6" }
|
cortex-m = { version = "0.7.6" }
|
||||||
cortex-m-rt = { version = "0.7" }
|
cortex-m-rt = { version = "0.7" }
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
embedded-storage-async = "0.4.0"
|
embedded-storage-async = { version = "0.4.0", optional = true }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
@ -39,6 +39,11 @@ log = [
|
|||||||
"embassy-stm32/log",
|
"embassy-stm32/log",
|
||||||
]
|
]
|
||||||
debug = ["defmt-rtt"]
|
debug = ["defmt-rtt"]
|
||||||
|
nightly = [
|
||||||
|
"dep:embedded-storage-async",
|
||||||
|
"embassy-boot/nightly",
|
||||||
|
"embassy-stm32/nightly"
|
||||||
|
]
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
debug = 2
|
debug = 2
|
||||||
|
@ -11,7 +11,7 @@ An adaptation of `embassy-boot` for STM32.
|
|||||||
|
|
||||||
## Minimum supported Rust version (MSRV)
|
## Minimum supported Rust version (MSRV)
|
||||||
|
|
||||||
`embassy-boot-stm32` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals.
|
`embassy-boot-stm32` is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(type_alias_impl_trait)]
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
mod fmt;
|
mod fmt;
|
||||||
|
@ -9,8 +9,8 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
|
||||||
embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] }
|
embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] }
|
||||||
embassy-boot = { version = "0.1.0", path = "../../../../embassy-boot/boot" }
|
embassy-boot = { version = "0.1.0", path = "../../../../embassy-boot/boot", features = ["nightly"] }
|
||||||
embassy-boot-nrf = { version = "0.1.0", path = "../../../../embassy-boot/nrf" }
|
embassy-boot-nrf = { version = "0.1.0", path = "../../../../embassy-boot/nrf", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
|
||||||
embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] }
|
embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] }
|
||||||
embassy-boot-rp = { version = "0.1.0", path = "../../../../embassy-boot/rp" }
|
embassy-boot-rp = { version = "0.1.0", path = "../../../../embassy-boot/rp", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features
|
|||||||
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
|
||||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
|
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
|
||||||
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
|
embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] }
|
||||||
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
Loading…
Reference in New Issue
Block a user