Getting started with esptool for ESP8266 & ESP32

preview_player
Показать описание
Esptool is ESP8266 and ESP32 serial bootloader utility. This video tutorial demonstrates how to write binary blob to a ESP-based device, aka upload firmware. The example uses the open source hardware development board ANAVI Thermometer.
Learn more and download esptool from:

0:00 esptool
0:55 Required Hardware
1:53 Using esptool
2:35 Step 1: Install esptool
3:09 Step 2: Connect to PC
3:56 Step 3: Flash Firmware
6:05 FAQ
Рекомендации по теме
Комментарии
Автор

I am using pip3 (cmd Windows 10) to install esptool, since this is the latest version I have installed previously with Python 3.8. First it was showing an error while downloading ecdsa..., so I reinstalled wheel, and did this time pip3 installed esptool successfully.

daniilegle
Автор

Is it possible to press the boot button and program only via putty/serial-terminal?

Everything I've seen requires installing too much software (arduino ide, esp32 idf, vs-code, etc)... using just the esptool 4.4 executable seems like the next best thing.

The espressif download tool seems too error-prone.. is it possible to erase the bootloader?

bennguyen
Автор

3:00 i cant install this. I have this error message:
sudo: pip: command not found

coin
Автор

Awesome, and Thank you for the video. It helped me learn to flash my ttgo-t-display. This command worked for me "esptool --port /dev/ttyACM0 --baud 460800 write_flash --flash_size=detect 0

oieieio
Автор

Hello, I want to flash a Wemos D1 mini (ESP8266) with esptool and OS Linux Mint, but I got following error messages and I found no solution. May you can help me, thanks in advance Thorsten

sudo esptool --port /dev/ttyUSB0 --baud 9600 write_flash 0x0 firmware.bin
[sudo] Passwort für thorsten:
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting...
Traceback (most recent call last):
File "/usr/bin/esptool", line 3101, in <module>
_main()
File "/usr/bin/esptool", line 3094, in _main
main()
File "/usr/bin/esptool", line 2885, in main
esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
File "/usr/bin/esptool", line 274, in detect_chip

File "/usr/bin/esptool", line 475, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "/usr/bin/esptool", line 433, in _connect_attempt
self._setDTR(False) # IO0=HIGH
File "/usr/bin/esptool", line 399, in _setDTR
self._port.setDTR(state)
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 603, in setDTR
self.dtr = value
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 473, in dtr
self._update_dtr_state()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 715, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
OSError: [Errno 22] Invalid argument
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory:

Original exception was:
Traceback (most recent call last):
File "/usr/bin/esptool", line 3101, in <module>
_main()
File "/usr/bin/esptool", line 3094, in _main
main()
File "/usr/bin/esptool", line 2885, in main
esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
File "/usr/bin/esptool", line 274, in detect_chip

File "/usr/bin/esptool", line 475, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "/usr/bin/esptool", line 433, in _connect_attempt
self._setDTR(False) # IO0=HIGH
File "/usr/bin/esptool", line 399, in _setDTR
self._port.setDTR(state)
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 603, in setDTR
self.dtr = value
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 473, in dtr
self._update_dtr_state()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 715, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
OSError: [Errno 22] Invalid argument

thorstenjoos