EEPROM / FLASH access library

OK. So long as you won't be erasing Flash banks any more often than absolutely necessary. As you no doubt know, block erasures are where the wear and tear on the Flash memory kicks in, versus actual EEPROM. The somewhat convoluted yet clever scheme in the AN2594 app note is designed specifically to address that issue.

I think I mentioned earlier that, if memory serves, the STM32 MCU Flash is rated to only 10,000 cycles, whereas @zachary noted that the external Flash chip is rated at 100,000, which is much more in line with standard EEPROM. However, re-writes of short data chunks within any given bank can still mess things up pretty quick.

The external Flash chip also requires SPI access, which is shared with the WiFi module. So there be dragons there, me thinks.

In summary then, as far as a general Wiring style EEPROM library goes, I think that an AN2594-based solution in main MCU Flash is best. Larger storage requirements will clearly require something else and there is indeed a lot more of that in the external Flash chip.

Meanwhile, I see that @satishgn has already implemented a 255 byte solution, using spare main MCU Flash ...

He doesn't give any credits to AN2594 in his code, but it appears to be directly based on same.