Paul liked the sync() idea - that is probably needed on any FLASH using data_cache as well, or pending changes would be lost on Power Loss on what should be 'permanent' media?
I'll go back to doing a PR with your confirmation that it is at least sane and seemingly safe and complete.
This will require any 'Warm Start' user on RAM2 or PSRAM Media to do some format if they expect to start with a fresh drive on any entry to setup() - but that is easier to explain than 'Lost Data' because they found a bug and edited code to new code, or touched the Button, or had a code Fault after some hours or days of trusting the data to be there.
Looking at the .ld files I don't see any easy way to avoid using this hardcoded value to skip RAM1 flush? :: if ( c->context >= (void *)0x20200000 ) {
> Not sure this is a usable 'named item' :: RAM (rwx): ORIGIN = 0x20200000