diff options
| author | Ulf Lilleengen <[email protected]> | 2022-11-23 14:48:51 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-11-25 11:43:12 +0100 |
| commit | 89821846d77d85d940b87cfa4f62171bd532b27c (patch) | |
| tree | d14237e406262134e3a8b8d2bdc41961ed181ea5 | |
| parent | 758f5d7ea29f1df14d5ef59c82e4b7f22545d775 (diff) | |
fix: add required metadata for embassy-boot
| -rw-r--r-- | embassy-boot/boot/Cargo.toml | 12 | ||||
| -rw-r--r-- | embassy-boot/boot/README.md (renamed from embassy-boot/README.md) | 0 | ||||
| -rw-r--r-- | embassy-boot/boot/src/lib.rs | 2 | ||||
| -rw-r--r-- | embassy-boot/nrf/README.md | 26 | ||||
| -rw-r--r-- | embassy-boot/nrf/src/lib.rs | 2 | ||||
| -rw-r--r-- | embassy-boot/stm32/README.md | 27 | ||||
| -rw-r--r-- | embassy-boot/stm32/src/lib.rs | 2 |
7 files changed, 60 insertions, 11 deletions
diff --git a/embassy-boot/boot/Cargo.toml b/embassy-boot/boot/Cargo.toml index 54c67a375..0cc6a0584 100644 --- a/embassy-boot/boot/Cargo.toml +++ b/embassy-boot/boot/Cargo.toml | |||
| @@ -2,13 +2,23 @@ | |||
| 2 | edition = "2021" | 2 | edition = "2021" |
| 3 | name = "embassy-boot" | 3 | name = "embassy-boot" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | description = "Bootloader using Embassy" | 5 | description = "A lightweight bootloader supporting firmware updates in a power-fail-safe way, with trial boots and rollbacks." |
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | repository = "https://github.com/embassy-rs/embassy" | ||
| 8 | categories = [ | ||
| 9 | "embedded", | ||
| 10 | "no-std", | ||
| 11 | "asynchronous", | ||
| 12 | ] | ||
| 7 | 13 | ||
| 8 | [package.metadata.embassy_docs] | 14 | [package.metadata.embassy_docs] |
| 9 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-boot-v$VERSION/embassy-boot/boot/src/" | 15 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-boot-v$VERSION/embassy-boot/boot/src/" |
| 10 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-boot/boot/src/" | 16 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-boot/boot/src/" |
| 11 | target = "thumbv7em-none-eabi" | 17 | target = "thumbv7em-none-eabi" |
| 18 | features = ["defmt"] | ||
| 19 | |||
| 20 | [package.metadata.docs.rs] | ||
| 21 | features = ["defmt"] | ||
| 12 | 22 | ||
| 13 | [lib] | 23 | [lib] |
| 14 | 24 | ||
diff --git a/embassy-boot/README.md b/embassy-boot/boot/README.md index 414405377..414405377 100644 --- a/embassy-boot/README.md +++ b/embassy-boot/boot/README.md | |||
diff --git a/embassy-boot/boot/src/lib.rs b/embassy-boot/boot/src/lib.rs index 429323ec9..76b14bc8c 100644 --- a/embassy-boot/boot/src/lib.rs +++ b/embassy-boot/boot/src/lib.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #![feature(type_alias_impl_trait)] | 1 | #![feature(type_alias_impl_trait)] |
| 2 | #![no_std] | 2 | #![no_std] |
| 3 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 4 | #![doc = include_str!("../../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 5 | mod fmt; | 5 | mod fmt; |
| 6 | 6 | ||
| 7 | use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash}; | 7 | use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash}; |
diff --git a/embassy-boot/nrf/README.md b/embassy-boot/nrf/README.md new file mode 100644 index 000000000..02f35c0a6 --- /dev/null +++ b/embassy-boot/nrf/README.md | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # embassy-boot-nrf | ||
| 2 | |||
| 3 | An [Embassy](https://embassy.dev) project. | ||
| 4 | |||
| 5 | An adaptation of `embassy-boot` for nRF. | ||
| 6 | |||
| 7 | ## Features | ||
| 8 | |||
| 9 | * Load applications with our without the softdevice. | ||
| 10 | * Configure bootloader partitions based on linker script. | ||
| 11 | * Using watchdog timer to detect application failure. | ||
| 12 | |||
| 13 | |||
| 14 | ## Minimum supported Rust version (MSRV) | ||
| 15 | |||
| 16 | `embassy-boot-nrf` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals. | ||
| 17 | |||
| 18 | ## License | ||
| 19 | |||
| 20 | This work is licensed under either of | ||
| 21 | |||
| 22 | - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or | ||
| 23 | <http://www.apache.org/licenses/LICENSE-2.0>) | ||
| 24 | - MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>) | ||
| 25 | |||
| 26 | at your option. | ||
diff --git a/embassy-boot/nrf/src/lib.rs b/embassy-boot/nrf/src/lib.rs index 82475d1e2..205bbd6df 100644 --- a/embassy-boot/nrf/src/lib.rs +++ b/embassy-boot/nrf/src/lib.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![feature(type_alias_impl_trait)] | 2 | #![feature(type_alias_impl_trait)] |
| 3 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 4 | #![doc = include_str!("../../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 5 | mod fmt; | 5 | mod fmt; |
| 6 | 6 | ||
| 7 | pub use embassy_boot::{AlignedBuffer, BootFlash, FirmwareUpdater, FlashConfig, Partition, SingleFlashConfig}; | 7 | pub use embassy_boot::{AlignedBuffer, BootFlash, FirmwareUpdater, FlashConfig, Partition, SingleFlashConfig}; |
diff --git a/embassy-boot/stm32/README.md b/embassy-boot/stm32/README.md index a82b730b9..cb134b534 100644 --- a/embassy-boot/stm32/README.md +++ b/embassy-boot/stm32/README.md | |||
| @@ -1,11 +1,24 @@ | |||
| 1 | # Bootloader for STM32 | 1 | # embassy-boot-stm32 |
| 2 | 2 | ||
| 3 | The bootloader uses `embassy-boot` to interact with the flash. | 3 | An [Embassy](https://embassy.dev) project. |
| 4 | 4 | ||
| 5 | # Usage | 5 | An adaptation of `embassy-boot` for STM32. |
| 6 | 6 | ||
| 7 | Flash the bootloader | 7 | ## Features |
| 8 | 8 | ||
| 9 | ``` | 9 | * Configure bootloader partitions based on linker script. |
| 10 | cargo flash --features embassy-stm32/stm32wl55jc-cm4 --release --chip STM32WLE5JCIx | 10 | * Load applications from active partition. |
| 11 | ``` | 11 | |
| 12 | ## Minimum supported Rust version (MSRV) | ||
| 13 | |||
| 14 | `embassy-boot-stm32` requires Rust nightly to compile as it relies on async traits for interacting with the flash peripherals. | ||
| 15 | |||
| 16 | ## License | ||
| 17 | |||
| 18 | This work is licensed under either of | ||
| 19 | |||
| 20 | - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or | ||
| 21 | <http://www.apache.org/licenses/LICENSE-2.0>) | ||
| 22 | - MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>) | ||
| 23 | |||
| 24 | at your option. | ||
diff --git a/embassy-boot/stm32/src/lib.rs b/embassy-boot/stm32/src/lib.rs index d549eccc6..82f712c4d 100644 --- a/embassy-boot/stm32/src/lib.rs +++ b/embassy-boot/stm32/src/lib.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![feature(type_alias_impl_trait)] | 2 | #![feature(type_alias_impl_trait)] |
| 3 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 4 | #![doc = include_str!("../../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 5 | mod fmt; | 5 | mod fmt; |
| 6 | 6 | ||
| 7 | pub use embassy_boot::{AlignedBuffer, BootFlash, FirmwareUpdater, FlashConfig, Partition, SingleFlashConfig, State}; | 7 | pub use embassy_boot::{AlignedBuffer, BootFlash, FirmwareUpdater, FlashConfig, Partition, SingleFlashConfig, State}; |
