Verify flash contents after programming
Add an option, on by default, to read out flash contents after programming and compare it to the programmed data. Without it, bugs in flash loader algos and other problems will silently leave flash corrupted.
Ref: #1700, #1696
Sorry, should pull-requests be based on develop or main?
develop is 28commits behind main (ie there are 28 extra commits on main) so I'd assume main to be the main target branch (I'm not 100% sure though).
I think there should be some tests added to make sure that it does capture cases where things don't match and possible future regression.
I unfortunately have no idea how those tests could be written. I did test manually using the broken flash driver mentioned in the referenced issues.