PlatformIO Community

Cannot program esp32


#1

running platformio on windows 10, vs code. connected to nodemcu esp32-s. Whenever I try to program the device, I get this error. Any suggestions? Thank you!

esptool.py v2.6
Serial port COM5
Connecting…
Traceback (most recent call last):
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 2959, in
_main()
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 2952, in _main
main()
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 2653, in main
esp.connect(args.before)
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 460, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 440, in _connect_attempt
self.sync()
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 379, in sync
timeout=SYNC_TIMEOUT)
File “C:\Users\amikam.platformio\packages\tool-esptoolpy\esptool.py”, line 343, in command
self._port.timeout = saved_timeout
File “c:\users\amikam.platformio\penv\lib\site-packages\serial\serialutil.py”, line 368, in timeout
self._reconfigure_port()
File “c:\users\amikam.platformio\penv\lib\site-packages\serial\serialwin32.py”, line 222, in _reconfigure_port
‘Original message: {!r}’.format(ctypes.WinError()))
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(995, ‘The I/O operation has been aborted because of either a thread exit or an application request.’)
*** [upload] Error 1


#2

Is another program accessing COM5? Does this help?


#3

No. Not that I can determine.


#4

I ran procexp, and no other process is accessing the port. In addition, I can open the port with a terminal program like putty or termite


#5

Have you tried to use a slower upload_speed?