Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrissyast opened this issue Mar 8, 2021 · 3 comments

Comments

@chrissyast
Copy link

chrissyast commented Mar 8, 2021

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
Copy link
Author

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
Copy link
Author

chrissyast commented Mar 9, 2021

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?

@SummerGift
Copy link
Member

It seems that you have solved the problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants