spi-memory
spi-memory copied to clipboard
Added a utility for interacting with SPI flash devices
Hey, I wrote a utility for interacting with SPI flash devices using linux_embedded_hal, gated behind the util feature.
I'm not sure if this is a thing you'd be interested in having here, or would rather it be an external project. I tend to ship a util with the driver because it makes testing and development a bit easier, but either way is good by me.
Sounds like a fine addition, thanks! I think I'd prefer to add it as an example instead of a binary though, since then you don't need Cargo features and the additional dependencies won't clutter the main dependency list (instead they'd be [dev-dependencies]).
Yeah fair, the only perk of a binary is you can cargo-install it which, afaik you can't do with an example
You can do cargo install spi-memory --examples, but yeah, that's not as convenient (and doesn't work with cargo-install-update)
@ryankurte take a look at https://github.com/flashrom/flashrom/issues/185 ... while it's not quite within the original spec (it would be a separate utility, rather than integrated into Flashrom with all the benefits that Flashrom integration offers) it's pretty close.
I'm happy to put a $100 bounty on this (payable in Bitcoin) if you can refashion it into a tool that meets the stated criteria:
- add status register write protect/block protect toggle support (as per the issue)
- make sure it supports the most common flashing hardware (CH341a and Raspberry Pi)
- make sure it supports the chips listed in the issue
- add a simple UI (as per the issue)
- make it installable with
cargo install, either as part of thespi-memorycrate or as a new crate - either get it merged into master here, or published as a separate crate