ESP32 Update.h V2 #7693
-
I'm having some problems when updating my project to use ESP32 V2.0.6. With the code below, all works as expected in V1.0.6, and both SPIFFS data and sketch data is updated from bin files. I have recently tried to do this with the later V2 library and have an issue with the SPIFFS update - it seems Update.onProgress is never called. I'm sure I must be missing an obvious change, any help gratefully received.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
We wrote our own library based on an example. See https://github.com/mikalhart/ESP32-OTA-Pull/blob/main/src/ESP32OTAPull.h DoOTAUpdate(). The callback works correctly in their example. |
Beta Was this translation helpful? Give feedback.
-
As an update for anyone searching and finding this in the future. |
Beta Was this translation helpful? Give feedback.
As an update for anyone searching and finding this in the future.
The main issue I was suffering did indeed turn out to be something simple. The default ESP32 partition map has changed between V1 and V2. In V1 the SPIFFS partition has size 0x170000, in V2 this is reduced to 0x160000. So the SPIFFS images (which I was creating from command line using mkspiffs rather than from the arduino IDE) would not fit.
In V2 there is a partition coredump at 0x3F0000 size 0x10000
It was also necessary to change, for example:
SYSTEM_EVENT_ETH_START to ARDUINO_EVENT_ETH_START as required.