Skip to content

Latest commit

 

History

History

readme.md

Web flash

The ESP32S3 that is used in the evaluation kit can be flashed from a browser. No need for dedicated tools.

Binaries

To flash an ESP from a browser you do need a binary file. This is more involved than it sounds: a build for an ESP32 generates four binaries (bootloader, partition table, boot code and the sketch) and they each have to be flashed at a specific address.

However, with the menu entry Sketch > Export Compiled Binary the Arduino IDE also generates a merged binary; and that is what we will use for web flash.

For some sketches we store the compiled binaries in the sketch folder in the repo so that they are easily accessible. We follow the file architecture of Arduino IDE; the Sketch > Export Compiled Binary creates a directory build in the sketch folder, for example see saidbasic. For web flash you would need saidbasic.ino.merged.bin.

Assets as local file

Some of those merged binaries are also published as assets with a release.

Assets on web

Flashing

  • With a USB cable connect the PC with the OSP32 board. It is suggested to use the port labeled "DBG" that seems to require no driver.

    USB DBG

    Using the port labeled "DBG" would require installation of the driver for the CP2102N (the USB to serial bridge used on the ESP32-S3-DevKitC-1). Find that driver at Silabs.

  • Start a modern browser (Chrome, Edge; unfortunately Safari does not support Web serial) and visit an ESP web flasher. We suggest ESP Tool from Espressif the manufacturer of ESPs. Alternative is Adafruit who cloned the Espressif page. They are very similar.

  • With the "Console" pane you can view the prints over Serial. We ignore that here, we focus on the "Program" pane.

    The default baud rate (921600) is ok; click on the "Connect" button in the "Program" pane. A security feature of the browser pops-up: the user has to grant the browser access to the USB port.

    Web flash connect

    Select the port and pres Connect.

  • The browser page starts communicating with the ESP. For example, we see it detects the ESP32-S3 (line 4).

    Web flash connected

    We also see that extra buttons are added to the UI. We ignore most of them; we need Choose File and Program.

  • After successful connection (0), click Choose File (1) and browse to a so-called merged bin file (xxx.ino.merged.bin).

    You find them with some of the examples, like saidbasic.ino.merged.bin in the build sub-directory, but they are also published as Assets with some releases.

    Web flash config

    Do not forget to set "Flash Address" to 0 (2), then press "Program" (3).

    If you forget the 0 address in (2), the firmware will be flashed to the wrong address and won't work. No harm done, just repeat the process, this time setting address to 0.

  • After pressing "Program", wait. Flashing takes time.

    You will see the remark about the address 0x0 (hexadecimal for the 0 we entered at "Flash Address"). Wait till you see the "Leaving..." message.

    Web flash program

  • The "Hard resetting" might not work; then press the RESET button on the ESP32 board (or unplug and re-plug the USB cable). This should start the just flashed firmware image.

(end)