-
Notifications
You must be signed in to change notification settings - Fork 0
Writing and Verifying

From CLI and firmware 3.1.0b1, the CLI — not the firmware — checks that a
chip is blank before a write, can read a write back and compare it, and runs
verify and blank. You need the beta — see Install Beta.
firestarter write <chip> <file>
firestarter verify <chip> <file>
firestarter blank <chip>
firestarter erase <chip> -bBefore the write reaches the programmer, the CLI reads exactly the bytes about
to be written and refuses if any is not blank, printing a line of the form
Refusing write to <chip>: not blank at 0x…, v: 0x…..
- UV-erasable EPROMs — always checked.
-
Electrically erasable parts (EEPROM-type 27-series parts such as the
W27C512, and flash) — the pre-write erase runs first, so they are checked
only with
--skip-erase, and NOR flash is also checked when the write starts at a non-zero address, because that erases one sector rather than the chip. -
Never checked — 28C EEPROMs (protocol
0x0D) and page-write flash (0x05), which erase each page as they write it, and SRAM and FRAM, which have no blank state.
-b / --no-blank-check: skips that check only; the erase still runs. It
means what it always meant, and from 3.1.0b1 it skips the CLI's check instead
of the firmware's.
--skip-erase: skips the erase too. Skipping erase on a non-blank
electrically erasable chip leaves un-erased bits that cannot be reprogrammed.
Opt-in; after a successful write it reads the written region back and
compares it through the same engine verify uses. Plain write is not
slowed.
| Exit code | Meaning |
|---|---|
| 0 | The write landed and the read-back matched. |
| 1 | The invocation ended for a reason the CLI or the firmware decided — a blank-check refusal, a firmware error during the write, a malformed address, or a read-back that completed and disagreed. |
| 2 | The connection or the hardware failed at any step. |
Verdict lines, with <chip> in place of the format field:
| Verdict line | When it appears |
|---|---|
Write to <chip>: verified -- the read-back matches. |
Exit 0: the write landed and the read-back matched. |
Write to <chip>: landed, but the read-back did not verify. |
Exit 1: the write completed, but the read-back disagreed. |
Write to <chip>: landed, but could not be verified -- the read-back failed. |
Exit 2: the write completed, but the read-back itself failed on transport or hardware. |
Write to <chip>: did not complete -- nothing was verified. |
Exit 1 or 2: the write itself did not finish, so there was nothing to read back. |
--full: with --verify, report every mismatching range of the read-back.
Refused without --verify.
Plain write keeps its 0 (success) / 1 (any failure) contract.
Both read the chip and compare on your computer, so they also work against older firmware — see Breaking-Changes.
Options: -a/--address, -s/--size, -f/--force, --full.
The compared region: verify defaults to the input file's length, blank to
the whole chip, and --size wins. A region that runs past the chip's end (or,
for verify, a --size longer than the file) is refused before the serial
port opens.
Exit codes: 0 match or blank, 1 mismatch or not blank, 2 transport, hardware, setup or region failure.
Output: by default the first mismatching range; with --full every range, at
most 64 listed, then a line of the form … and N more ranges, M bytes, then
one summary line naming a classification — blank/contact, address-line,
match or indeterminate — with the counts and the span compared.
-b / --blank-check checks after the erase, through the same engine as
blank — the opposite sense of write -b, which skips a check before the
write.
Without -b: 0 erased, 1 not.
With -b: 0 erased and blank, 1 erased but not blank, 2 the check itself
failed on transport, hardware or setup.
-s / --sector-address together with -b is refused, exit 2, before
anything is erased.
For every non-blank range afterwards, run firestarter blank <chip> --full.
| Command | 0 | 1 | 2 |
|---|---|---|---|
write |
landed | any failure | - |
write --verify |
landed and verified | ended for a decided reason | transport or hardware failure |
verify |
match | mismatch | transport, hardware, setup or region failure |
blank |
blank | not blank | transport, hardware, setup or region failure |
erase |
erased | not erased | - |
erase -b |
erased and blank | erased but not blank | the check itself failed |
Upgrade the CLI first, then the firmware — see Breaking-Changes for what each mixed pairing does.