Crate lpc55

Source
Expand description

Host-side library to interact with and provision NXP LPC55 devices.

Additionally, a command-line tool lpc55 is implemented, so far it can list all properties via lpc55 info, and read out memory (with some restrictions).

For instance lpc55 read-memory $((0x9DE00)) $((7*512)) -o output.bin extracts the PFR (protected flash region) of an unlocked device.

The grand goal is to have an easily configurable cargo subcommand which allows creating and flashing SB2.1 (secure binary) files from regular ELF files, signed via a PKCS#11 backend.

§But why?!

Vendor tools blhost and elftosb are semi-open source, officially they are BSD-licensed, but code is only available behind a login screen.

pyMBoot is instructive but in Python (and a bit buggy in parts).

There is also the somehow underadvertised https://github.com/NXPmicro/spsdk.

Re-exports§

pub use bootloader::protocol::Error as ProtocolError;
pub use bootloader::Error as BootloaderError;
pub use bootloader::Bootloader;
pub use bootloader::UuidSelectable;
pub use uuid;

Modules§

bootloader
The bootloader interface
crypto
NXP’s CRC32 and AES-CTR algorithms
http
HTTP server interface to this crate’s functionality
pki
Abstraction allowing use of either PKCS1 PEM file or PKCS11 keys for signing data.
protected_flash
The protected flash area (PFR) as Rust types
secure_binary
Generator and parser for signed firmware and SB (secure binary) files
signed_binary
util