Store/retrieve file to/from SPIFFS: tools?

zliudr
Posts: 366
Joined: Thu Oct 03, 2019 5:15 am

Store/retrieve file to/from SPIFFS: tools?

Postby zliudr » Thu Oct 10, 2019 5:07 am

I am learning the SDK by examples and I have a basic question: how to you store files to SPIFFS from PC? Is there any tool to do this?

I'm familiar with MicroPython and a tool called ampy that can list files, upload and download files. Is there such a tool when I'm just using the SDK? I've been using my modified file server sample code to access SPIFFS. I felt that there must be better ways.


zliudr
Posts: 366
Joined: Thu Oct 03, 2019 5:15 am

Re: Store/retrieve file to/from SPIFFS: tools?

Postby zliudr » Thu Oct 10, 2019 1:44 pm

Great! Thanks. So it looks like this tool only creates images with files you want on spiffs but I see no tools to interact with the spiffs onboard an esp32, other than the file server sample code. What do others use to read/write/delete files on the chip's spiffs?

Also, what does the "make flash" do? I'm still learning the esp32 system. I think there is a couple of small portions of the flash reserved for some nvr and other stuff before app-flash starts, say a 1MB block. Then the free space after app-flash block can be used as spiffs. If I use "make flash", that means if there is a spiffs and image from the build, it flashes it to the chip, erasing previous spiffs. If I do "make app-flash" instead, it doesn't touch the onboard spiffs as long as my app-flash size is within the size of current app-flash partition on chip.

Any errors in my understanding.

Best,

Negeko
Posts: 1
Joined: Wed Mar 12, 2025 7:29 pm

Re: Store/retrieve file to/from SPIFFS: tools?

Postby Negeko » Wed Mar 12, 2025 7:45 pm

Hi ! I am little late to the party, but I ran into similar needs and I did not find an easy to use tool that allowed to extract files from a spiffs partition on EPS32 in order to view them on my computer.

This is why I made this tool https://github.com/octopus-framework/spiffs-dumper. It is a simple "plug and play" project that allows you to extract your spiffs files without the need of an internet connection or any fancy tools, using esp-idf. I figured other people could have a use out of it too.

For the exact needs you mention, you can download your files using this dumper, modify them as needed, then re-uploading them to your ESP board using other already existing tools. If this is a common thing people need, I may extend my project and add a straightforward way to update your files.

Hope this helps someone that stumbles on this thread like I did ! :)

Who is online

Users browsing this forum: Amazon [Bot], Baidu [Spider], ChatGPT-User, Qwantbot and 2 guests