Or you can use an esp8266 module as a full debugger for the STM32:<p><a href="https://github.com/markrages/blackmagic/blob/esp8266/src/platforms/esp8266/Readme.md" rel="nofollow">https://github.com/markrages/blackmagic/blob/esp8266/src/pla...</a>
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>
Sorry, for going a little off topic here but the same implementation was also done for AVR MCUs (include the famous Arduino UNO & MEGA). Feel free to check it out here -<p><a href="https://github.com/laukik-hase/OTA_update_AVR_using_ESP32" rel="nofollow">https://github.com/laukik-hase/OTA_update_AVR_using_ESP32</a>