Esp 32 Code won´t Upload: Failed to execute script esptool

If I try to upload code to an esp 32 Wroom it won´t work. I already checked if I use the right com, but everything seems to be fine. I also use the esp 32 board manager library

Here is the error message:

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

Sketch uses 214849 bytes (16%) of program storage space. Maximum is 1310720 bytes.

Global variables use 15388 bytes (4%) of dynamic memory, leaving 312292 bytes for local variables. Maximum is 327680 bytes.

esptool.py v2.6

Serial port COM3

Connecting...

Traceback (most recent call last):

  File "esptool.py", line 2959, in <module>

  File "esptool.py", line 2952, in _main

  File "esptool.py", line 2653, in main

  File "esptool.py", line 460, in connect

  File "esptool.py", line 440, in _connect_attempt

  File "esptool.py", line 379, in sync

  File "esptool.py", line 322, in command

  File "esptool.py", line 285, in write

  File "site-packages\serial\serialwin32.py", line 323, in write

serial.serialutil.SerialTimeoutException: Write timeout

Failed to execute script esptool

An error occurred while uploading the sketch



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

If you have Question or if anything is not clear just write a question.

Hi there, which esp32 wroom board are you using to upload the sketch? Because they´re different versions with the same esp32 chip and is this the first time you upload a sketch to this board or not? Please paste a link of the board you´re using.

Hello, I have tried to use this esp 32 multiple times in the past, but it never worked and also had the same problems.

Here is the link: https://www.amazon.de/ESP-WROOM-32-Development-Bluetooth-Microcontroller-Integrated/dp/B07YKBY53C/ref=sr_1_1_sspa?crid=1YXVCUKDCZVT8&keywords=Hailege+ESP32+ESP-32D+ESP-WROOM-32+Development+Board&qid=1692081001&sprefix=hailege+esp32+esp-32d+esp-wroom-32+development+board%2Caps%2C202&sr=8-1-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

Thank you for helping

Did you have installed following package in File>preferences>Boards Manager URL, you can simply paste the link into the URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
If you haven't installed the ESP32 module won't work.

You can find a lot of free e-books on the following link, I always buy my boards here:

In this e-book they explain how to setup your board. The ESP32 Dev Kit C version 4 is the latest one, but you can use the same library on your version without problems, only the pins/GPIO's can be different. To download you only have to register and login.

@einkleinesquack I wrote a little testcode which you can upload to the board, hold in mind to hold down the boot button on the board for a second or 2 (the button on the right side next to the µusb port) when you see in the output panel connecting... else you will see an exit status.

#include <SPI.h>  // In board manager search esp8266 for ESP8266 Community and install library

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.println("Testing ESP32 board");
  delay(2000);
}

When you open the Serial monitor (Tools > Serial Monitor) now, you'll see the test text in the panel send from the ESP32.

Yes, I have already done that

I have got it to work by using the manual you sent me and the boot button while it was uploading.

Thank you :grinning:

1 Like

You´re very welcome. Have fun with your board and programming in C++ and Arduino. :smiley: With kind regards, Rudy.

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