etch341’s chip database lives in two TOML files at the repo root,
embedded into the binary at build time via include_str!. Running
etch341 chips from the CLI lists the live, in-binary set.
Source: chips/i2c_chips.toml. No JEDEC ID for I²C; chips are
identified by name only via --chip <NAME>. The bit-stuffing /
addr-width / page-size differences across the family are handled
automatically.
Most chips that aren’t in the database still work via the
--chip <NAME> override if their pinout and opcodes match a chip
that is in the database (it’s almost always one of the W25Q /
MX25L / GD25Q / 24Cxx clones).
For chips that need first-class support, add an entry to the right
TOML file:
[[chip]]
name = "MX25R8035F"
jedec_id = "C22814"
size_kb = 1024
page_size = 256
sector_size = 4096
erase_time_ms = 60
notes = "Macronix 8 Mbit, low-power 1.8V"
The chipdb unit tests validate that every entry has a unique
JEDEC ID (6 hex chars, all-hex) at build time, so a duplicate or
malformed ID will fail CI before the chip lands in a release.
PRs welcome at
github.com/packetThrower/etch341.