Thanks, yes with esptool.py it looks straightforward, first convert elf to bin, then flash
python esptool.py --chip esp32 elf2image myapp_esp32
python esptool.py --chip esp32 --port COM7 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 myapp_esp32.bin
This works directly under Windows Python 2.7 after installing pyserial so no dependence on the Espressif’s msys2 distribution.
I would have preferred a built-in automated way of flashing via USB directly after build, is this something that could be added in future releases?