2

I have an ESP8266, specifically the ESP-12-E.

I am using this aruino tool to upload data to the 4MB of SPIFFS storage available to me: https://github.com/esp8266/arduino-esp8266fs-plugin

I am uploading a couple of files, which by my calculation add up to

148,269 Bytes
~145KB

When I upload the files

[SPIFFS] data : /Users/andy/Documents/Personal/proj/p/relay_controller/data

[SPIFFS] size : 1004

[SPIFFS] page : 256

[SPIFFS] block : 8192

/css/bootstrap.min.css

/pretty.html

/wifi.htm

skipping .DS_Store

[SPIFFS] upload : /var/folders/kq/jq1t3j257tn7n_dqy0m9_zl80000gn/T/arduino_build_804509/relay_controller.spiffs.bin

[SPIFFS] address: 0x300000

[SPIFFS] reset : nodemcu

[SPIFFS] port : /dev/cu.SLAB_USBtoUART

[SPIFFS] speed : 115200

Uploading 1028096 bytes from /var/folders/kq/jq1t3j257tn7n_dqy0m9_zl80000gn/T/arduino_build_804509/relay_controller.spiffs.bin

I have bolded the bits I have questions about.

It says size 1004....What is size 1004!?

At the end most importantly it says uploaded 1,028,096 bytes, Which is 1004 KB, which must explain the 1004. But why is it uploading 1004KB when my data folder is just ~145KB?

RenegadeAndy
  • 5,440
  • 18
  • 70
  • 130
  • 1
    it has to write out the whole SPIFFS space, even empty space, as some sort of pre-compiled layout image. Therefore, it doesn't matter what your actual payload size is, it will always upload the full storage footprint. – dandavis Jan 29 '18 at 21:45
  • In that case why isn't it uploading 4MB, as there is 4MB of SPIFFS storage! – RenegadeAndy Jan 29 '18 at 21:55
  • 3mb, not 4, if you have the config correct in the IDE. idk, maybe there's a few big banks of blocks it uses, so it only needs to fill the wear-leveling to the nearest bank? What i know for sure is that it always takes forever, even for one little tiny file... – dandavis Jan 29 '18 at 23:11

0 Answers0