SPIFFS: mount failed, -10025

Dear all,

In my platformio.ini I had:

board_build.partitions = default_16MB.csv  
board_build.filesystem = spiffs
board_upload.flash_size = 16MB 

This works fine! :grinning:

But… I want to change that to:

board_build.partitions = large_spiffs_16MB.csv 

Unfortunately, when I do that, an error pops up when booting the ESP32:

SPIFFS: mount failed, -10025

I can’t find much info on this here at the forum, but also not on GitHub/Google/etc…

Is there a reason that “large_spiffs_16MB.csv” doesn’t work directly?

(Before I try the new partition-table I do a full-erase on the chip).

Anyone who knows a solution? :sunglasses:

Thanks / best regards,

Stephan

Fixed it with:

build.arduino.memory_type = opi_qspi

:sunglasses:

Sure thing this fails. How could it ever succeed to mount the partition when the new partitions table puts the SPIFFS filesystem at a different address than the last one? o_O

You have

and

So when the SPIFFS is at 0xc90000 after the first firmware flash + format and then you change the partition table and now it’s trying to load it from 0x910000 there ain’t nothing there.

You’ll have to format the SPIFFS again by setting the first parameter formatOnFail to true for the first time.

1 Like

Thanks for your help again maxgerhardt :sunglasses:

Hmzzz, I didn’t do this, but it still works… How is that possible then? :innocent:

And can you also please tell me where in my code I have to do this:

bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);

Is that before I do:

  if (!SPIFFS.begin(true)) {
    Serial.println("An Error has occurred while mounting SPIFFS");
    return;
  }

Or where is it needed?

How could this ever work before if the memory type wasn’t set correctly – not quite understanding what’s going on here.