-
Notifications
You must be signed in to change notification settings - Fork 124
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
Espressif-IDE is not clearing serial port before trying to upload (IEP-1398) #1115
Comments
I have same problem. Did you found any solutions for this? I also noticed that if I close COM monitor with Ctrl+] next flashing is succesful |
Some weeks ago, my Espressif IDE version 3.0.0 installation worked as expected: However, this doesn't work anymore and I have exactly the same issue as described by jessecheu:
My solution is not restarting the computer. I investigated the issue further and my findings are:
Before updating to Windows 11 version 24H2, my Espressif IDE version 3.0.0 worked as expected (see my first lines above).
As I believe that controlling esp-idf-monitor in eclipse/Espressif IDE is broken, uploading firmware in combination with a running esp-idf-monitor is also broken (as described by the initial comment). |
Describe the bug
A clear and concise description of what the bug is.
When trying to upload any program to a ESP32 MCU. I get the error message:
�[0;33m--- esp-idf-monitor 1.5.0 on \\.\COM4 115200�[0m --- Warning: ELF file 'C:/Users/../build/udemy_esp32_iot_app.elf' does not exist --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H could not open port '\\\\.\\COM4': PermissionError(13, 'Access is denied.', None, 5) --- Connection to \\.\COM4 failed. Available ports: COM4
I tried it on different ESP32 target devices so it seems the problem is with uploading using the espressif-IDE.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Code is able to successfully upload code.
Screenshots
If applicable, add screenshots to help explain your problem.
Espressif-IDE Product Information:
Espressif > Product Information (Copy content from the console and attach as a file)
CDT Build environment variables.txt
Eclipse Error log:
Window > Show View > Other > Search for "Error Log" (Attach as a file)
Please attach the error log as described here !SESSION 2025-01-09 205241.515 ----.txt
I found that the fix is going to task manager and ending all python process related to espressif-ide.
It seems that the file that isn't being closed properly before trying to upload the code to the target is.
"C:\Espressif\python_env\idf5.3_py3.11_env\Scripts" and "C:\Espressif\tools\idf-python\3.11.2"
I believe that pySerial isn't being closed properly.
Another fix was to restart my computer which properly closed the serial port.
The text was updated successfully, but these errors were encountered: