Create a .bin file from data folder

I’m creating an OTA update procedure, and for that I want to update the files in the data folder as well.
Can I create a .bin file from only that folder?

Cheers,
t.

For both ESP8266 and ESP32 (I’m assuming you’re using one of those, but you didn’t say so) there is the uploadfs target which also works via OTA. See docs and docs. That should work out of the box without you needing the bin file directly.

Of course, you can also use the documented buildfs target to just get the spiffs.bin without an upload.

$ pio run -t buildfs
[..]
Building in release mode
Building SPIFFS image from 'data' directory to .pio\build\esp32dev\spiffs.bin
/test.txt
===================== [SUCCESS] Took 1.30 seconds ===================== 
$ ls -lh .pio\build\esp32dev\spiffs.bin
-rw-rw-rw-  1 Maxi 0 1,5M 2020-03-29 15:48 .pio\build\esp32dev\spiffs.bin
1 Like

Perfect, that worked! You were right assuming that I used an ESP8266.
Thanks