mirror of
https://github.com/espressif/esptool.git
synced 2025-10-21 15:10:33 +08:00
fix(esp32c2): Recommend using higher baud rate if connection fails
This commit is contained in:
@@ -40,6 +40,12 @@ When communicating with the {IDF_TARGET_NAME} ROM serial bootloader, the followi
|
|||||||
| Flow control | None |
|
| Flow control | None |
|
||||||
+---------------------+-------------------+
|
+---------------------+-------------------+
|
||||||
|
|
||||||
|
.. only:: esp32c2
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
You might experience issues when using low baud rates on {IDF_TARGET_NAME}. If you encounter any problems when connecting, please use at least 115200 or higher.
|
||||||
|
|
||||||
.. only:: esp8266
|
.. only:: esp8266
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
@@ -682,8 +682,17 @@ class ESPLoader(object):
|
|||||||
print("") # end 'Connecting...' line
|
print("") # end 'Connecting...' line
|
||||||
|
|
||||||
if last_error is not None:
|
if last_error is not None:
|
||||||
|
additional_msg = ""
|
||||||
|
if self.CHIP_NAME == "ESP32-C2" and self._port.baudrate < 115200:
|
||||||
|
additional_msg = (
|
||||||
|
"\nNote: Please set a higher baud rate (--baud)"
|
||||||
|
" if ESP32-C2 doesn't connect"
|
||||||
|
" (at least 115200 Bd is recommended)."
|
||||||
|
)
|
||||||
|
|
||||||
raise FatalError(
|
raise FatalError(
|
||||||
"Failed to connect to {}: {}"
|
"Failed to connect to {}: {}"
|
||||||
|
f"{additional_msg}"
|
||||||
"\nFor troubleshooting steps visit: "
|
"\nFor troubleshooting steps visit: "
|
||||||
"https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html".format( # noqa E501
|
"https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html".format( # noqa E501
|
||||||
self.CHIP_NAME, last_error
|
self.CHIP_NAME, last_error
|
||||||
|
Reference in New Issue
Block a user