Skip to main content

Crate nanoflash

Crate nanoflash 

Source
Expand description

Lay out flash and write firmware to microcontroller boards of any vendor, through one API.

One layout file per board gives the flash size and the named partitions with a role; nanoflash computes the offsets, checks alignment, overlap and size, and reports the headroom of every partition.

Re-exports§

pub use error::Error;
pub use error::ErrorClass;

Modules§

avr
The AVR backend: the STK500v1 (Optiboot, ATmegaBOOT), STK500v2 (the wiring bootloader of the Mega 2560) and AVR109 (Caterina) bootloaders of Arduino’s boards.
backend
What every flashing backend offers: connect, erase, write, verify and reset, with progress.
build
Generate the constants and the linker scripts of a firmware from its layout file, in build.rs.
cargo
The board of a Cargo package, named in [package.metadata.nanoflash] of its Cargo.toml.
error
The errors of connecting to a board and writing it, and their classes.
espressif
The Espressif ROM loader backend: reset into download mode, synchronise, detect the chip and its flash, over SLIP-framed commands.
flash
Flashing a board from its manifest and detecting a chip, through one code path for every backend: choosing the board a device is, preparing its images, then connecting, erasing, writing, verifying and resetting.
layout
The layout model: the flash of a board and its named partitions.
manifest
The board manifest: which boards a project supports, how to reset them and what to write.
native
The serial transport of the host, over the serialport crate.
quantity
Sizes and offsets written as integers, hexadecimal or numbers with a binary unit.
samba
The SAM-BA backend: Arduino’s SAM-BA bootloaders of the Nano 33 BLE (nRF52840) and of the SAMD21 boards, over an ASCII monitor protocol.
table
Writers of the partition table each family needs, and of the linker script and constants.
testing
Transcripts of a serial session, to replay against a backend and to record from a real one.
transport
The serial transport a backend talks through, and the errors it can report.
web
The serial transport of the browser, over Web Serial (Chromium-based browsers).