EEPROM emulation
Faking a byte-addressable EEPROM by appending log records to flash and compacting when a page fills up.
Plenty of microcontrollers no longer ship with EEPROM, yet firmware still needs somewhere to keep calibration and settings. Flash can only be erased a sector at a time, often kilobytes at once, and survives perhaps ten thousand erase cycles against EEPROM's hundreds of thousands. The trick is never to overwrite: each change is appended as a record holding a virtual address and a value, and the most recent record for an address wins.
When the page is full, the live values are copied to a spare page and the old one is erased. Status words in the page header decide, after a power cut, which page is valid — which is exactly where the bugs tend to live. ST, Microchip and others publish application notes with ready-made code. Arduino's EEPROM library on the ESP32 does the same thing behind a familiar face.