Hi EPS-IDF,
I know I did not investigate enough time with google around this question
But is there a way to update the content (not Software, but only bunch of configuration files) of a spiffs partition of the spi flash chip?
cheers
Gfast2
How to update spiffs partition content
Re: How to update spiffs partition content
Better wounld be two possibilities:
1. Through Serial Port.
2. Through OTA way
cheers
Gfast
1. Through Serial Port.
2. Through OTA way
cheers
Gfast
Re: How to update spiffs partition content
I think I have some ideas to deploy the OTA update mechanism to update the spiffs partition first. But how to access / write spiffs through serial port is stil unclear.
Re: How to update spiffs partition content
I personally haven't looked into that area in depth .. but my loose thinking would be that since SPIFFs data is held in a partition and a partition is merely/just an area of flash memory that is "cataloged" then any data you receive (be it through WiFi, BLE, Serial, SPI, I2C or other mechanism) can be used as the new data to replace the existing content of that flash memory. The ESP-IDF APIs provide mechanisms to change the flash memory (re-write it) at run time.
That would seem to imply that arbitrary logic such as:
The choice of "source" becomes your own code. If this holds water, then the story splits into two areas. How do we get the source data and the second would be which APIs to use to write to flash.
That would seem to imply that arbitrary logic such as:
Code: Select all
while (notFinished) {
read a block of data from source;
write the block of memory to flash;
}
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: How to update spiffs partition content
Hi Kolban,kolban wrote:I personally haven't looked into that area in depth .. but my loose thinking would be that since SPIFFs data is held in a partition and a partition is merely/just an area of flash memory that is "cataloged" then any data you receive (be it through WiFi, BLE, Serial, SPI, I2C or other mechanism) can be used as the new data to replace the existing content of that flash memory. The ESP-IDF APIs provide mechanisms to change the flash memory (re-write it) at run time.
That would seem to imply that arbitrary logic such as:
The choice of "source" becomes your own code. If this holds water, then the story splits into two areas. How do we get the source data and the second would be which APIs to use to write to flash.Code: Select all
while (notFinished) { read a block of data from source; write the block of memory to flash; }
Huge thanks for your advice again!!!
Image I burn spi flash in batch. If I can't burn the spiffs partition in batch. I'd write code that do the writing job as you said, which increase the comlexity of the code which may be less cool as it can be.
Who is online
Users browsing this forum: Google [Bot] and 69 guests