Page 1 of 1

How i can use OTA and SPI flash together

Posted: Tue Nov 14, 2017 10:57 am
by amalamal
Hi

I tried the example "wear_levelling" in esp32 to store some data in the SPI flash, for working with this example we changed the partition type to csv and made a partition "partitions_example.csv" and it is working, writing and reading in spi flash happening. But i need to work with OTA also same time, but for OTA the partition type is different, if i change to it the spi flash write wont work, How i can fix it, Any suggestion please.


Thanks

Re: How i can use OTA and SPI flash together

Posted: Thu Nov 16, 2017 9:18 pm
by NateBowen
I'm also interested in this. I'd like to update a SPIFFS partition with OTA. However, the documentation is clear that the OTA partition must of the app type with ota_x subtype. I tried to mount a SPIFFS partition with those settings in the partition table. Not surprisingly, it failed:

Code: Select all

E (272) SPIFFS: spiffs partition could not be found
Are there any known workarounds for this? Any future plans for extending OTA beyond the app partitions?

Re: How i can use OTA and SPI flash together

Posted: Sat Nov 18, 2017 1:42 pm
by ESP_Sprite
If you need to update a non-OTA partition, you should be able to just use the SPI flash partition read/write/erase API. Just make sure the spiffs is unmounted first.

Re: How i can use OTA and SPI flash together

Posted: Sun Nov 19, 2017 3:27 pm
by Gfast2
ESP_Sprite wrote:If you need to update a non-OTA partition, you should be able to just use the SPI flash partition read/write/erase API. Just make sure the spiffs is unmounted first.
I think we just need some idiomatic way to handle files upload for file update in spiffs. I believe kolban's book has some secret recipe for this.

Dose ESP-IDF has a webserver as a stock component? I can image how to get new "app.bin" and all files that need to be updated in spiffs from SD card through the right now APIs from ESP-IDF. But how to update these files wirelessly?

Cheers

Gfast2