Store/retrieve file to/from SPIFFS: tools?

zliudr
Posts: 11
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: 11
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,

Who is online

Users browsing this forum: MSN [Bot], WiFive and 15 guests