Welcome to our Knowledge Base

Device Flashing Tools

You are here:
< Back

Device with an ESP8266/ESP8285 chip

Any variation of the ESP8266 chip can be flashed with Tasmota.

See a list of supported devices here https://blakadder.github.io/templates/us.html

Serial-to-USB adapter with 3.3V supply

The power supplied to the device is one of the most important elements for both flashing the device and for stable operation. You must ensure that the device receives sufficient power (current AND appropriate voltage level) to properly flash the firmware on the device.

  • CH340G is a reliable and very cheap adapter (example 12).
  • FTDI FT232 – these adapters have a lot of fakes in the market so buy only from reliable sources (example). Buy only the variant with a separate 3.3V regulator on PCB!
  • CP2102 or PL2303 – works with certain devices, but using an external 3.3V supply might be necessary. Not recommended for beginners!
  • RaspberryPi – only for advanced users. External 3.3V supply necessary.
  • NodeMCU and D1 mini (Pro/Lite) boards have a micro USB upload port and don’t require an adapter.

Flashing tools

  • Tasmota PyFlasher – official flashing tool intended for Tasmota. (Windows or Mac)
  • NodeMCU PyFlasher – easy to use GUI flasher based on esptool.py. (Windows or Mac)
  • Esptool.py – the official flashing tool from Espressif. (Requires Python)
  • Esptool executable – Esptool in executable form, no Python required. (Windows, Linux or Mac)

OTA Flashing Tools

esptool.py

Esptool is the official tool for flashing ESP8266 chips and is the most reliable.

It requires Python, if you do not have an installed copy of Python 2.x or 3.x download and install it from https://www.python.org.

Download the esptool Source code to a folder of your choice. Go to the folder and install Esptool with command

python setup.py install

Esptool for Debian and Ubuntu is installed with

sudo apt install esptool

Upload Tasmota

Make sure you followed the steps to put your device in flash mode. Place your chosen firmware binary file in the same folder as esptool.py.

Esptool uses the serial interface to communicate with your device. On Windows these interfaces are named COM1, COM2, etc. and on Linux they are named /dev/ttyUSB0, /dev/ttyUSB1, etc. Before using esptool, make sure you know which serial port your programming adapter is connected to.

The following use COM5 as an example. Change COM5 with your serial port designation.

Ensure the device is in flash mode before each step.

Optional: Backup firmware

Backup the current firmware with the following command:

esptool.py --port COM5 read_flash 0x00000 0x100000 fwbackup.bin

When the command completes the device is not in flash mode anymore. Repeat the process of putting your device in programming mode.

Erase flash memory

Erase the complete flash memory holding the firmware with the following command:

esptool.py --port COM5 erase_flash

It only takes a few seconds to erase 1M of flash.

When the command completes the device is not in flash mode anymore. Repeat the process of putting your device in programming mode.

Upload firmware

Load the chosen Tasmota firmware file with the following command (e.g., tasmota.bin in this example):

esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 tasmota.bin

Unplug your serial programming adapter or your device and plug it back in or connect to another power source. Your device is now ready for Initial configurationFor proper device initialization after the firmware upload completes, power down and power up the device.

Esptool executable

The executable version of esptool is maintained by Ivan Grokhotkov and releases are kept at https://github.com/igrr/esptool-ck/releases. Supports Linux, Linux ARM, Windows 32-bit and Mac

Download and install

For the purpose of simplicity only the Windows version will be explained here, but the commands and parameters are the same for Windows, Linux and Mac.

Download the latest release of Esptool-CK and extract the compressed file to a folder of your choice.

Upload Tasmota

Place your chosen firmware binary file (e.g., tasmota.bin in the example below) in the same folder as Esptool-CK to simplify the process.

The following commands use COM5 as an example. Change COM5 with your port designation.

Ensure the device is in flash mode before each step.

Erase flash memory

esptool -cp COM5 -ce -v

Upload firmware

Once the erase is complete, put device back into programming mode and upload the firmware

esptool -cp COM5 -bm dout -cf tasmota.bin -v

Unplug your serial programming adapter or your device and plug it back in or connect to another power source. Your device is now ready for Initial configurationFor proper device initialization after the firmware upload completes, power down and power up the device.

Flashing and compiling from source

Tutorials for setting up development environments if you want to modify the code or default settings and compile your own binaries.

  • PlatformIO – setup and configure PlatformIO for compilation and upload
  • PlatformIO CLI – use the PlatformIO command line interface on Linux for compilation and upload
  • PlatformIO-Core – automate firmware builds using PlatformIO-Core and flash with esptool
  • Visual Studio Code – setup and configure Visual Studio Code with PlatformIO for Tasmota
  • Atom – beginner guide building Tasmota firmware using Atom with PlatformIO plugin
  • Arduino IDE – setup and configure Arduino IDE for Tasmota compilation and upload
  • Docker Tasmota – compile from a Docker container using PlatformIO

In PlatformIO, be sure that you always have the latest build of the ESP Core. Delete the following in your .platformio folder (%USERPROFILE%\.platformio in Windows):

  • Everything in .platformio/platforms
  • All folders that begin with framework... in .platformio/packages

Online Compilers

Can only create a firmware binary. Use one of the tools to flash it to your device.

  • Gitpod – compile your own binary in the cloud using Gitpod.
  • TasmoCompiler – simple web GUI to compile Tasmota with your own settings

Tips

Don’t forget to install drivers for your serial-to-USB adapter.

Some adapters can be switched between 3.3V and 5V for the data pins, but still provide 5V on the power pin which will fry your device. You MUST make sure both the data and VCC pins are set for 3.3V.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Table of Contents