flashprog/v1.6
This release brings a huge overhaul of flashprog's chip probing. Mostly
SPI chips benefit from much faster probing times. Some refactoring was
necessary to make this possible. As a positive side-effect, this should
also make it easier to keep all programmer drivers maintained long-term,
no matter if they serve old parallel flash or modern QSPI.
What Changed?
Chip Probing
So far, flashprog walked through the whole chip database, executing the listed probing functions for every chip. That is, if a probing function was listed for n chips, it was executed n times! Even though, it should return the same result every time. Now we run the available probing functions for each supported bus, store their results and then compare these to the database entries.
There was one obstacle on the path, though: We used to pass a whole flash context including the chip description into the programmer drivers. Why not? we knew which chip we wanted to talk to, even during probing; until now. Fortunately, the flash context wasn't used much in the programmer drivers, so we could get rid of this quirk (with a few exceptions like optional, optimized read/write functions). This lowers the coupling between chip and programmer drivers, which again enhances maintainability.
Emulated Dediprog Support
A small tweak in the Dediprog driver improves support for alternative implementations of the Dediprog protocol on microcontrollers. For instance, dedipico, dedich32.
Intel Chipset Handling
We skip some more futile probing for memory-mapped flash chips on systems where their bus simply isn't memory mapped. So far we limited the probing only on laptops out of caution. Now this is decided by the detected chipset's configuration. Skipping unnecessary probing again speeds up probing for what we are looking for.
We've always warned the user when the BWE bit (BIOS Write Enable aka. Write Protect Disable, WPD) couldn't be set. It still led to confusion when the message got lost in too elaborate logs. We now set an internal flag that disables writing and triggers the proper error message.
What's New?
New Chip-Enumeration API
The chip-probing overhaul also provided some incentive to extend libflashprog's API. There are new functions to enumerate either the whole chip database or the chips matching the probing results. A chip from such an enumeration can then be turned into a flash context to be used with the usual read/write/erase APIs. Details about the chips can be queried too, of course.
Individual Chip-Name Matching
One thing led to another and with the libflashprog changes, we ended up having all matching of chip names from the command line to database entries in a single function. This provided the opportunity to relax the matching consistently for all CLIs. So far, when a database entry covered multiple chips, one had to specify the whole string that identified the database entry, e.g.
$ flashprog -p ft4222_spi -c MX25L1605A/MX25L1606E/MX25L1608E
That was a lot to type for some entries and also confusing to the users. Now it's possible to specify individual chip names, e.g.
$ flashprog -p ft4222_spi -c MX25L1606E
matches the same database entry. Another pattern were optional or alternative suffixes in parentheses. For instance "MX25L1005(C)/MX25L1006E" can be matched with
- MX25L1005
- MX25L1005C
- MX25L1005(C)
- MX25L1006E
or even
- MX25L1005/MX25L1006E
which should provide some backwards compatibility when database names are adapted in the future.
Additional New & Old Chips And Programmers
Beside a few new XMC SPI chips, we added support for very old M28F parallel flash chips. The latter were mostly added to increase the test coverage of the new probing code. For the same reason, a few simple programmer drivers popped up:
- gfxmatrox for Matrox Millenium graphics cards,
- scsilsi for old LSI SCSI adaptors, and
- nicamd for old AMD PCnet32 network cards.
Smaller Changes & Fixes
- Few build infrastructure improvements:
- The DJGPP container got an overdue update to GCC 12.
- Makefile was fixed for a corner case, when pkgconf's --static was failing.
- Meson linker arguments were fixed for Darwin.
- ni845x_spi our only Windows-only driver gets always build tested now, with a dummy header file.
- ch347_spi got a segfault fixed in combination with older libusb versions.
- A few chipset updates:
- Intel Wildcat Lake support,
- older Intel Q87 and H170 are tested now, and
- AMD Phoenix is finally tested! though it's hard to get an unlocked system.
Download RC1
flashprog v1.6 can be downloaded in various ways:
Anonymous checkout of the tag v1.6-rc1 from git repositories at
A tarball is available for download at
https://flashprog.org/releases/flashprog-v1.6-rc1.tar.bz2 (GPG signature) (see GPG_Signatures)
Supported hardware
Please see the archived status page for the hardware supported by this release.