mpy-snippets icon indicating copy to clipboard operation
mpy-snippets copied to clipboard

The connected device may not be in repl state or may not be a micropython device.

Open chrissyast opened this issue 4 years ago • 3 comments

Device - ESP32 DEVKIT COM connection - Silicon Labs CP210x USB to UART Bridge System - Windows 10

I have already flashed this device with micropython on a Mac via the following commands.

esptool.py --chip esp32 --port /dev/cu.usbserial-0001 erase_flash
esptool.py --chip esp32 --port /dev/cu.usbserial-0001 --baud 460800 write_flash -z 0x1000 esp32-idf4-20210202-v1.14.bin

and was able to sync and run micropython fine.

I'm now trying to use the same device on my PC. I can find and connect to the device ok, and the Run button works, but when I try to sync the device it fails with.

The connected device may not be in repl state or may not be a micropython device.

chrissyast avatar Mar 08 '21 12:03 chrissyast

On disconnecting the usb I get a stack trace

Traceback (most recent call last):
  File "cli.py", line 800, in <module>
  File "site-packages\click\core.py", line 764, in __call__
  File "site-packages\click\core.py", line 717, in main
  File "site-packages\click\core.py", line 1137, in invoke
  File "site-packages\click\core.py", line 956, in invoke
  File "site-packages\click\core.py", line 555, in invoke
  File "cli.py", line 551, in repl
  File "ampy\pyboard.py", line 239, in read_until_hit
  File "ampy\pyboard.py", line 162, in read_until
  File "site-packages\serial\serialutil.py", line 590, in inWaiting
  File "site-packages\serial\serialwin32.py", line 257, in in_waiting
serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'Access is denied.', None, 5))
[33844] Failed to execute script cli

chrissyast avatar Mar 08 '21 13:03 chrissyast

I found the cause of this problem. I had created a git repository so that I could work on this project between two computers.

This created a .git folder in the project directory which RT-Thread was then trying to sync to the device. This must have caused some kind of problem or conflict for the board. Is there a way for RT thread to ignore this folder when syncing?

chrissyast avatar Mar 09 '21 14:03 chrissyast

It seems that you have solved the problem :)

SummerGift avatar Mar 27 '21 00:03 SummerGift