SD Card Not Found Mystery

Mostly. Everything will work the same as long as you don’t try to look inside the savefiles. If you want to read or modify the savefiles from outside of ProffieOS, some additional steps will be needed.

Modifying the safefiles directly is definitely peeking under the hood though…

1 Like

Thanks Prof.
Yeh I’ve never been one to mess with save files (other than simply deleting them) as I’ve always felt its too easy to cause conflicts with them. I think it sometimes gets to a point where learning how to tweak them safely is no less complicated than learning how to upload a new config.
Thanks for clarifying though.
:slight_smile:

1 Like

The added routine in the VERBOSE_SD_ERRORS condition fixes this mystery?

For reference, this is the section of code:

The thing is: VERBOSE_SD_ERRORS doesn’t really do anything unless there is a failure.
It’s very weird that it would actually fix anything.

Right, but this part is NOT run, so something with this?

    if (!DOSFS.begin()) return false;
    if (!DOSFS.check()) {
      DOSFS.end();
      return false;
    }

This functions just call f_initvolume() and f_checkvolume():

Well if that’s basically the same then, are we dealing with the potential influence of compiler optimizations depending on whether VERBOSE_SD_ERRORS is defined or not?

It doesn’t seem like a delay would help since if there are no errors, the talkie and STDOUT don’t even occur (and taking up some time), but just to test, should we try adding a delay something like

    if (!DOSFS.begin()) {
      delay(1000); 
      return false;
}

?

Grasping for ideas here.

This is why I think it might be a buffer overflow somewhere.
A buffer overflow is essentially a “holistic” error, because a problem in one part of the code can cause a symptom in another part of the code, and the link between the two can be determined by code order, optimizations and any combination of the two.

Are there some warnings flags we could enable when compiling that might point to a clue?

no, there is not.