@bucknall I am able to corrupt the file system pretty easily. Running 1.7.6FW ATM. It seems to be when the program has a file open and an error occurs.
What is the file system running on these boards? It doesn't appear to be a journaling file system. It is way too easy to corrupt the file system and have it erase the whole flash.
I am developing a BT application that can update any file on the device and really need protection against this type of failure. I'm already doing a double buffer approach with the file writes so I have a good copy of the target file before deleting the original and renaming the file. The issue is resetting the board in the middle of a file write causes any manor of flash corruption. Before someone says "don't do that", I try very hard to design my system to recover from any type of errors. The cardinal rule is that there should be no way to brick a unit doing an update. To that end, I test every kind of failure during updates to make sure the device remains in a operating state.