espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.28k stars 7.35k forks source link

ESP tool unhandled exception #7555

Open shraddhavsada opened 1 year ago

shraddhavsada commented 1 year ago

Board

ESP32

Device Description

Dev kit v1 Diot

Hardware Configuration

sample blink code

Version

latest master (checkout manually)

IDE Name

arduino ide

Operating System

windows 11

Flash frequency

80mhz

PSRAM enabled

yes

Upload speed

115200

Description

I am unable to upload any sketch on my esp32

Sketch

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Debug Message

Arduino: 1.8.19 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 115200, Debug, Enabled"

Sketch uses 253173 bytes (19%) of program storage space. Maximum is 1310720 bytes.

Global variables use 16632 bytes (5%) of dynamic memory, leaving 311048 bytes for local variables. Maximum is 327680 bytes.

esptool.py v4.2.1

Serial port COM3

Connecting...Traceback (most recent call last):

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

  File "esptool\__init__.py", line 1004, in _main

  File "esptool\__init__.py", line 646, in main

  File "esptool\__init__.py", line 895, in get_default_connected_device

  File "esptool\loader.py", line 631, in connect

  File "esptool\loader.py", line 572, in _connect_attempt

  File "esptool\loader.py", line 435, in sync

  File "esptool\loader.py", line 365, in command

  File "esptool\loader.py", line 317, in write

  File "serial\serialwin32.py", line 325, in write

serial.serialutil.SerialTimeoutException: Write timeout

[17372] Failed to execute script 'esptool' due to unhandled exception!

An error occurred while uploading the sketch

Invalid library found in C:\Arduino\libraries\esptool-3.0: no headers files (.h) found in C:\Arduino\libraries\esptool-3.0

Invalid library found in C:\Arduino\libraries\pyserial-3.4: no headers files (.h) found in C:\Arduino\libraries\pyserial-3.4

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

Other Steps to Reproduce

I have downloaded drivers and also tried different comp ports but i am unable to upload the code

I have checked existing issues, online documentation and the Troubleshooting Guide

sohamkarkhanis commented 1 year ago

Ensure that you're using a micro USB data cable and not just a regular charger wire. Faced the same issue, got resolved after changing the wire and rechecking the "Port" in the Toolbox dropdown.