spi-memory icon indicating copy to clipboard operation
spi-memory copied to clipboard

Added a utility for interacting with SPI flash devices

Open ryankurte opened this issue 5 years ago • 4 comments

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.

ryankurte avatar Jun 25 '20 01:06 ryankurte

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]).

jonas-schievink avatar Jun 25 '20 09:06 jonas-schievink

Yeah fair, the only perk of a binary is you can cargo-install it which, afaik you can't do with an example

ryankurte avatar Jun 27 '20 02:06 ryankurte

You can do cargo install spi-memory --examples, but yeah, that's not as convenient (and doesn't work with cargo-install-update)

jonas-schievink avatar Jun 27 '20 10:06 jonas-schievink

@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 the spi-memory crate or as a new crate
  • either get it merged into master here, or published as a separate crate

ln2max avatar Mar 15 '21 18:03 ln2max