Arduino-esp32: Failed to execute script esptool the selected serial port Failed to execute script esptool does not exist or your board is not connected

Created on 21 Feb 2018  路  10Comments  路  Source: espressif/arduino-esp32

Hardware:

Board: ?ESP32 Dev Module?
Core Installation/update date: ?11/jul/2017?
IDE name: ?Arduino IDE? ?Platform.io? ?IDF component?
Flash Frequency: ?40Mhz?
Upload Speed: ?115200?

Description:

Error when compiling a code to the microcontroller
this is the error message:

esptool.py v2.1
Traceback (most recent call last):
File "esptool.py", line 2524, in
File "esptool.py", line 2517, in _main
File "esptool.py", line 2246, in main
File "esptool.py", line 177, in __init__
File "site-packages\serial__init__.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM8': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected

Sketch:

define led 2

void setup () {
pinMode(led, OUTPUT);
}

void loop () {
digitalWrite (led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here 

Most helpful comment

Holding down the "Boot" button on my ESP-WROOM-32 while the Arduino IDE download the program worked. After the download I had to push the "EN" button to run the program. It did NOT start on it's own.

All 10 comments

I tried that, nothing worked.
also in the Arduino IDE I can't select
port
tools > port
it is in gray color

I am guessing you are on Windows????

  • 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.

Thank you,,,
The problem was the driver CP210x is missing
and the cable wasn't good, even though I tried 4 or 5 different cables and finally I got one working.

Issue Solved

Glad I could help.
Please push the CLOSE button for this issue.

Also, if you working on a laptop, make sure it is on full performance and plugged in.

Holding down the "Boot" button on my ESP-WROOM-32 while the Arduino IDE download the program worked. After the download I had to push the "EN" button to run the program. It did NOT start on it's own.

Hey, anyone here? I have a similar issue but unlike this one, I can select my COM Port and the drivers are also up to date. However, what I am finding out of place is that in the COM Port list I am getting some 17 options for COM1 even though nothing else is connected to the laptop. Any ideas?

Hey, anyone here? I have a similar issue but unlike this one, I can select my COM Port and the drivers are also up to date. However, what I am finding out of place is that in the COM Port list I am getting some 17 options for COM1 even though nothing else is connected to the laptop. Any ideas?

you can get those COM port options in Device Manager

push the "BOOT" button worked! Thx guys.

Was this page helpful?
0 / 5 - 0 ratings