User Tools

Site Tools


programming:esp_programming_tool

ESPtool

The tool is used to program ESP based chips such as the ESP8266/ESP8285 located in Sonoff units.

Installing esptool on Ubuntu 18.04/Mint 19

First install python and pip.

sudo apt install python python-pip python-setuptools python-serial

Then install wheel package using pip

pip install wheel

Finally install esptool

pip install esptool

Add to your path in .bashrc

export PATH="$PATH:$HOME/.local/bin/"
NB! Make sure you have access to the USB serial port. e.g. make your user a member of dialout group.

Installing esptool on Windows

First install python and pip. On windows you need to download the package from http://python.org

When installing choose to add python to the path and select custom installation.

Leave all other options at default except the installation path. Set it to something simple like C:\python\python37

After the installation finishes check that python and pip are accessible from a command prompt/Windows powershell.

PS C:\> python --version
Python 3.7.3
 
PS C:\> pip --version
pip 19.0.3 from c:\python\python37\lib\site-packages\pip (python 3.7)

Then install esptool using pip

pip install esptool

example usage

Read flash
esptool.py -p <port> read_flash 0 0x100000 <output_file>
Write flash
esptool.py -p <port> write_flash 0 <input_file>
Erase flash
esptool.py -p <port> erase_flash
programming/esp_programming_tool.txt ยท Last modified: 2022/06/10 19:19 by 127.0.0.1