Basic Ota


This sample integrates Over-The-Air(OTA) Upgrader, Over-The-Air(OTA) Network Upgrader and Sming. It demonstrates dual rom booting, big flash support, OTA updates and dual spiffs filesystems. This sample should work on all supported architectures.


On Esp8266 we use rBoot as bootloader. When using rBoot big flash support with multiple 1MB slots only one rom image needs to be created. If you don’t want to use big flash support (e.g. for a device with smaller flash) see the separate instructions below. You can easily take the ota files and add them to your own project to add OTA support.


  1. Set WIFI_SSID & WIFI_PWD environment variables with your wifi details.

  2. Edit the OTA server details defined in the application file.

  3. make && make flash

  4. Put rom0.bin and spiff_rom.bin in the root of your webserver for OTA.

  5. Interact with the sample using a terminal (make terminal). Sorry - no web-gui (yet).


For testing purposes we provide an Ota server that can be started on your desktop machine:

make otaserver

The server listens on port 9999 and all network interfaces. If your desktop has the following IP address after connecting to your WIFI router then you can compile the sample to use this IP address and the testing OTA server:

make flash

Make sure to replace with your WIFI IP address.

Flash layout considerations


If you want to use, for example, two 512k roms in the first 1MB block of flash (old style) then Sming will automatically create two separately linked roms. If you are flashing a single rom to multiple 1MB flash blocks, all using the same offset inside their 1MB blocks, only a single rom is created. See rBoot for further details.

  • If using a very small flash (e.g. 512k) there may be no room for a spiffs filesystem, so use HWCONFIG = standard

  • After building copy all the rom*.bin files to the root of your web server.

If you want more than two roms you must be an advanced user and should be able to work out what to copy and edit to achieve this!




The URL where the firmware for the first application partition can be downloaded.



Used when RBOOT_TWO_ROMS is set. The URL where the firmware for the second application partition can be downloaded.



The URL where the spiffs partition attached can be downloaded.


The initial sample was made possible with the assistance of piperpilot, gschmott and robotiko on the forum.


Environment Variables

SoC support

  • esp32

  • esp32c2

  • esp32c3

  • esp32s2

  • esp32s3

  • esp8266

  • host