pub enum BootCommandSequenceDescription {
    UploadSignedImage,
    CheckDerivedFirmwareVersions,
}
Expand description

High level commands that lpc55 will convert safely into commands used to define SB2.1 files

Example

[[commands]]
seq = "UploadImage"
image = "Signed"

Variants

UploadSignedImage

Takes the filename specified in image from config.firmware, pads to 512B if necessary, erases flash, then uploads securely (all but first block, only then the first block).

CheckDerivedFirmwareVersions

Takes the version specified in config.firmware.product and checks that it is greater than or equal to both the “Secure” and “Nonsecure” firmware versions in the customer data page on the device.

This uses an interpretation and encoding of the [u16; 3] Version as an incrementing u32 counter. Namely, major version is interpreted as an era (signaling breaking changes) and restricted to below 1024. Minor version is interpreted as days since the twenties (unrestricted for practical purposes). Patch version is restricted to below 64, and would rarely be used.

So, for instance, 1:20210520 would correspond to 1.505.0, since (dt.date(2021, 5, 20) - dt.date(2020, 1, 1)).days = 505, and map to the counter (1 << 22) + (505 << 6) = 4226624.

If the check fails, then the SB2 update stops.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.