Well, coincidentally, I too did the same project recently and even wrote a documentation for it - might want to give it a read ;) <a href="https://rounakdatta.github.io/ota-update-stm32-esp32.html" rel="nofollow">https://rounakdatta.github.io/ota-update-stm32-esp32.html</a>