-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
We do have the uploadfs
target to pack and upload our data/
folder as a filesystem (SPIFFS or LittleFS) binary to the ESP8266, but there is no built-in reverse: To download the memory contents of flash at the right place and unpack the filesystem again.
This feature request was also made in https://community.platformio.org/t/download-or-view-esp8266-file-system/17749 and https://community.platformio.org/t/esp8266fs-file-uploader-for-esp/16327 and https://community.platformio.org/t/littlefs-how-to-dump-download-the-file-system-image-from-board-to-computer/18044, so there is some demand for it.
I've created an extra_scripts
extension at https://github.com/maxgerhardt/pio-esp32-esp8266-filesystem-downloader that works for both ESP8266 and ESP32 and provides the target downloadfs
. By duplicating some of the platform's code (which I somehow couldn't import
.. would give a weird base64 error..), I can reconstruct where the filesystem is supposed to be, download it and decode it using mklittlefs
or mkspiffs
respectively.
It would be great if this code (or a better version of it) would be directly in the platform (ESP8266 + ESP32) so that it's a built-in project task to download the configured filesystem again.