mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
update comments
use 4/5/6 as new firmware for better understanding
This commit is contained in:
parent
1171e11655
commit
9bc00e68fa
@ -183,29 +183,29 @@ impl<ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> BootLoader<ACTIVE, DFU, S
|
|||||||
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|------------|--------|--------|--------|--------|
|
/// |-----------|------------|--------|--------|--------|--------|
|
||||||
/// | Active | 0 | 1 | 2 | 3 | - |
|
/// | Active | 0 | 1 | 2 | 3 | - |
|
||||||
/// | DFU | 0 | 3 | 2 | 1 | X |
|
/// | DFU | 0 | 4 | 5 | 6 | X |
|
||||||
///
|
///
|
||||||
/// The algorithm starts by copying 'backwards', and after the first step, the layout is
|
/// The algorithm starts by copying 'backwards', and after the first step, the layout is
|
||||||
/// as follows:
|
/// as follows:
|
||||||
///
|
///
|
||||||
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|------------|--------|--------|--------|--------|
|
/// |-----------|------------|--------|--------|--------|--------|
|
||||||
/// | Active | 1 | 1 | 2 | 1 | - |
|
/// | Active | 1 | 1 | 2 | 6 | - |
|
||||||
/// | DFU | 1 | 3 | 2 | 1 | 3 |
|
/// | DFU | 1 | 4 | 5 | 6 | 3 |
|
||||||
///
|
///
|
||||||
/// The next iteration performs the same steps
|
/// The next iteration performs the same steps
|
||||||
///
|
///
|
||||||
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|------------|--------|--------|--------|--------|
|
/// |-----------|------------|--------|--------|--------|--------|
|
||||||
/// | Active | 2 | 1 | 2 | 1 | - |
|
/// | Active | 2 | 1 | 5 | 6 | - |
|
||||||
/// | DFU | 2 | 3 | 2 | 2 | 3 |
|
/// | DFU | 2 | 4 | 5 | 2 | 3 |
|
||||||
///
|
///
|
||||||
/// And again until we're done
|
/// And again until we're done
|
||||||
///
|
///
|
||||||
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Swap Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|------------|--------|--------|--------|--------|
|
/// |-----------|------------|--------|--------|--------|--------|
|
||||||
/// | Active | 3 | 3 | 2 | 1 | - |
|
/// | Active | 3 | 4 | 5 | 6 | - |
|
||||||
/// | DFU | 3 | 3 | 1 | 2 | 3 |
|
/// | DFU | 3 | 4 | 1 | 2 | 3 |
|
||||||
///
|
///
|
||||||
/// ## REVERTING
|
/// ## REVERTING
|
||||||
///
|
///
|
||||||
@ -220,19 +220,19 @@ impl<ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> BootLoader<ACTIVE, DFU, S
|
|||||||
///
|
///
|
||||||
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|--------------|--------|--------|--------|--------|
|
/// |-----------|--------------|--------|--------|--------|--------|
|
||||||
/// | Active | 3 | 1 | 2 | 1 | - |
|
/// | Active | 3 | 1 | 5 | 6 | - |
|
||||||
/// | DFU | 3 | 3 | 1 | 2 | 3 |
|
/// | DFU | 3 | 4 | 1 | 2 | 3 |
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|--------------|--------|--------|--------|--------|
|
/// |-----------|--------------|--------|--------|--------|--------|
|
||||||
/// | Active | 3 | 1 | 2 | 1 | - |
|
/// | Active | 3 | 1 | 2 | 6 | - |
|
||||||
/// | DFU | 3 | 3 | 2 | 2 | 3 |
|
/// | DFU | 3 | 4 | 5 | 2 | 3 |
|
||||||
///
|
///
|
||||||
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
/// | Partition | Revert Index | Page 0 | Page 1 | Page 3 | Page 4 |
|
||||||
/// |-----------|--------------|--------|--------|--------|--------|
|
/// |-----------|--------------|--------|--------|--------|--------|
|
||||||
/// | Active | 3 | 1 | 2 | 3 | - |
|
/// | Active | 3 | 1 | 2 | 3 | - |
|
||||||
/// | DFU | 3 | 3 | 2 | 1 | 3 |
|
/// | DFU | 3 | 4 | 5 | 6 | 3 |
|
||||||
///
|
///
|
||||||
pub fn prepare_boot(&mut self, aligned_buf: &mut [u8]) -> Result<State, BootError> {
|
pub fn prepare_boot(&mut self, aligned_buf: &mut [u8]) -> Result<State, BootError> {
|
||||||
// Ensure we have enough progress pages to store copy progress
|
// Ensure we have enough progress pages to store copy progress
|
||||||
|
Loading…
Reference in New Issue
Block a user