Github Devices Community Docs Blog

Use esptool to flash esp32

Usually I flash my omg with Platform in VSC, but lately I figured out how to get to the .bin file. (it’s in the pio folder).

When I flash my tasiota devices I always use esptool. But I’m not sure which command to use for the esp32.

lets say the file I’d like to flash is named omg.bin

This is an example, which might not work:
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash -fm=dio -fs=4MB 0x00000 /Users/myuser/Desktop/omg.bin

I’m always unsure about parts like write_flash -fm=dio -fs=4MB 0x00000. Can someone explain how to do this right?

You have to use several binaries for the ESP32, you can take the adress and binaries from below:
https://docs.openmqttgateway.com/upload/binaries.html#esp32

And convert them into a command line, if you succeed it could be interesting to share the used command.

Did not know that. Ok so I probably don’t even have those binary.

Don’t want to mess things up. I might give up on that and keep flashing with platformio. Thanks

This seems interesting (but don’t know if it’s still valid):

This seems interesting (but don’t know if it’s still valid):

It should be valid