ESP8266 SPIFFS build error -8

I’ve gone back to some old projects and can not longer build SPIFFS for them.

I get the following cryptic error code

Building SPIFFS image from 'MySONOFF/data' directory to .pioenvs/default/spiffs.bin
*** [.pioenvs/default/spiffs.bin] Error -8

What is weird is that if i create a new project then the tool works fine, even with the same board and settings and even with the data_dir also moved.

I’d like to know the meaning of the error code -8. googlefoo comes up blank.

These projects used to work just fine. I’ve updated and upgraded the project folder.

it does not depend on the contents of the data folders as i created a data dir at the same level of src, and omitted my data_dir flag in platform.ini but it still fails.

I’ve deleted the .pioenvs directory too so it started from scratch, same result.


1 Like

OK, that was easy.

Error -8

refers to the fact that I had a 0B SPIFFS size partition, presumably as i was compiling these like prior to really get ting SPIFFS working on PIO.

need to specify a correct linker that has enough SPIFFS space.


build_flags_common =