-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix Warning Handling in _check_if_can_reset
Method (ESPTOOL-894)
#997
Conversation
👋 Hello DocKenny, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. Click to see more instructions ...
Review and merge process you can expect ...
|
_check_if_can_reset
Method_check_if_can_reset
Method (ESPTOOL-894)
Hello @DocKenny, We believe the current behavior is correct. Please see this issue with an explanation: #912. Long story short, it is up to the user to configure the |
Hi @radimkarnis I wanted to share my perspective on the current implementation. From my testing and experience, even though the code gets successfully loaded onto the chip, the raised SystemExit gives the impression that the program has terminated unexpectedly. This can be misleading to users, especially those who may not be familiar with the underlying behavior of the method. The error message "Failed uploading: uploading error: exit status 1" may give users the impression that the code was not successfully uploaded to the chip, even though it has been. Thank you for considering this feedback. I am open to further discussions and suggestions on how we can enhance this feature. |
Thank you @DocKenny for the feedback! The I believe this should be fixed on the Arduino side: If ESP32-S2 or ESP32-S3 (or any other future USB-OTG-enabled chip) is selected in Arduino and USB-OTG is used to download the code, Arduino should set the |
This warning shows when the board has been put into download mode manually (pressing BOOT and EN). In Arduino we can not detect that the user has manually put the board in Download mode to change flags. IMHO the warning is fine |
Description of Change
This change modifies the
_check_if_can_reset
method to issue a warning instead of raising aSystemExit
when the chip is in download mode using GPIO0. This ensures that the method behaves as intended by only issuing a warning without terminating the program.Bug Fixes
This change fixes the following bug:
Hardware & Software Combinations Tested
I have tested this change with the following hardware & software combinations:
Automated Integration Tests
I have run the
esptool.py
automated integration tests with this change and the above hardware: