mirror of
https://github.com/espressif/esptool.git
synced 2025-10-20 22:09:59 +08:00
fix: pass error message to exception in OTG mode
Closes https://github.com/espressif/esptool/issues/996 Closes https://github.com/espressif/esptool/issues/997
This commit is contained in:

committed by
Radim Karniš

parent
7cc35e4e4d
commit
c266fdda71
@@ -296,15 +296,12 @@ class ESP32S2ROM(ESP32ROM):
|
||||
strap_reg & self.GPIO_STRAP_SPI_BOOT_MASK == 0
|
||||
and force_dl_reg & self.RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK == 0
|
||||
):
|
||||
print(
|
||||
"WARNING: {} chip was placed into download mode using GPIO0.\n"
|
||||
"esptool.py can not exit the download mode over USB. "
|
||||
"To run the app, reset the chip manually.\n"
|
||||
"To suppress this note, set --after option to 'no_reset'.".format(
|
||||
self.get_chip_description()
|
||||
)
|
||||
raise SystemExit(
|
||||
f"Error: {self.get_chip_description()} chip was placed into download "
|
||||
"mode using GPIO0.\nesptool.py can not exit the download mode over "
|
||||
"USB. To run the app, reset the chip manually.\n"
|
||||
"To suppress this note, set --after option to 'no_reset'."
|
||||
)
|
||||
raise SystemExit(1)
|
||||
|
||||
def hard_reset(self):
|
||||
uses_usb_otg = self.uses_usb_otg()
|
||||
|
@@ -358,15 +358,12 @@ class ESP32S3ROM(ESP32ROM):
|
||||
strap_reg & self.GPIO_STRAP_SPI_BOOT_MASK == 0
|
||||
and force_dl_reg & self.RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK == 0
|
||||
):
|
||||
print(
|
||||
"WARNING: {} chip was placed into download mode using GPIO0.\n"
|
||||
"esptool.py can not exit the download mode over USB. "
|
||||
"To run the app, reset the chip manually.\n"
|
||||
"To suppress this note, set --after option to 'no_reset'.".format(
|
||||
self.get_chip_description()
|
||||
)
|
||||
raise SystemExit(
|
||||
f"Error: {self.get_chip_description()} chip was placed into download "
|
||||
"mode using GPIO0.\nesptool.py can not exit the download mode over "
|
||||
"USB. To run the app, reset the chip manually.\n"
|
||||
"To suppress this note, set --after option to 'no_reset'."
|
||||
)
|
||||
raise SystemExit(1)
|
||||
|
||||
def hard_reset(self):
|
||||
uses_usb_otg = self.uses_usb_otg()
|
||||
|
Reference in New Issue
Block a user