Failed to execute script esptool

Hi! My institution gave me an esp32-wroom-32u to use for my project. I'm new to this basically. However upon trying to connect my mcu to laptop and uploading a sample sketch, the terminal outputs the lines below. I tried searching on google and youtube for possible solutions but as I have said earlier, I am new to this so I could not really point out what's wrong.

Sketch uses 198842 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13248 bytes (4%) of dynamic memory, leaving 314432 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM7
Connecting...
Traceback (most recent call last):
File "esptool.py", line 3682, in
File "esptool.py", line 3675, in _main
File "esptool.py", line 3330, in main
File "esptool.py", line 512, in connect
File "esptool.py", line 492, in _connect_attempt
File "esptool.py", line 431, in sync
File "esptool.py", line 369, in command
File "esptool.py", line 332, in write
File "site-packages\serial\serialwin32.py", line 323, in write
serial.serialutil.SerialTimeoutException: Write timeout
Failed to execute script esptool
Failed uploading: uploading error: exit status 0xffffffff

Can anyone here help me? Thanks!

Hi,

  • When you plug in your ESP32 to your PC, do you hear a sound? If not, try a different USB cable.
  • Does Windows say anything about installing drivers failed? You might need to manually install the drivers.
  • If you open the device manager of windows are there any USB devices listed (after you plugged in the ESP32) that have no drivers installed? Then you most likely need to manually install FTDI (USBtoSerial) drivers.
  • I needed to install separate drivers for the onboard USB of my ESP32. In my case it was for a CP2102 chip. You can find the drivers here: ESP32.net.
  • Did you try to use a different USB cable?

And last, some ESP32 boards need to be set manually into bootloader mode. On my board that would be pressing the RESET button and keep it hold, then press the USR button and keep it hold, then release the RESET button, then release the USR button. Might be different for your board.

(ref: Failed to execute script esptool the selected serial port Failed to execute script esptool does not exist or your board is not connected · Issue #1137 · espressif/arduino-esp32 · GitHub)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.