Tools required:
First create a binary payload from the directory to be uploaded to the SPIFFs filesystem using mkspiffs
:
mkspiffs -c PATH -b 4096 -p 256 data.bin
where:
PATH
is the path to a directory that will become the root on the SPIFFs filesystem
Next, use esptool
to write the binary data.bin
into flash:
esptool --chip esp8266 --port /dev/ttyUSB --baud 115200 write_flash 0xEB000 data.bin
where:
/dev/ttyUSB
is the serial port to use.0xEB000
is the start address of the SPIFFS filesystem.
And finally verify that the data was written using esptool
:
esptool --chip esp8266 --port /dev/ttyUSB --baud 115200 read_flash 0xEB000 0x1000 data.txt
where:
0x1000
is the size of the memory to read.