Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Build one flash image

nanoflash image build merges the images of a board into one flash image, with 0xFF between them. Use it for a production programmer, an emulator or a comparison.

$ nanoflash image build --board boards/esp32-s3.toml --fill --output flash.bin
wrote 8388608 bytes to flash.bin
  • The image holds the images of the manifest and the partition table generated from the layout.
  • --fill pads the image to the flash size of the layout.
  • --json prints one JSON document instead of the sentence.

A layout that detects the flash size

A merged image cannot follow the chip, so image build builds a detect layout for its minimum flash size, and --fill pads to the minimum. To build for another size, pass --flash-size:

$ nanoflash image build --board boards/esp32-s3-detect.toml --flash-size "16 MiB" --fill --output flash-16.bin

The partition table is generated for that size, the images go where their partitions then are, and --fill pads to that size.

Check the headroom first

nanoflash layout check --manifest boards/esp32-s3.toml shows the headroom of every image that the manifest writes. See Check a layout.