mirror of
https://github.com/espressif/esptool.git
synced 2025-10-18 00:32:43 +08:00
fix: Fixed glitches on RTS line when no_reset option on Windows
This commit is contained in:
@@ -300,7 +300,17 @@ class ESPLoader(object):
|
||||
|
||||
if isinstance(port, str):
|
||||
try:
|
||||
self._port = serial.serial_for_url(port, exclusive=True)
|
||||
self._port = serial.serial_for_url(
|
||||
port, exclusive=True, do_not_open=True
|
||||
)
|
||||
if sys.platform == "win32":
|
||||
# When opening a port on Windows,
|
||||
# the RTS/DTR (active low) lines
|
||||
# need to be set to False (pulled high)
|
||||
# to avoid unwanted chip reset
|
||||
self._port.rts = False
|
||||
self._port.dtr = False
|
||||
self._port.open()
|
||||
except serial.serialutil.SerialException as e:
|
||||
port_issues = [
|
||||
[ # does not exist error
|
||||
|
@@ -869,9 +869,6 @@ class TestExternalFlash(EsptoolTestCase):
|
||||
self.verify_readback(0, 1024, "images/one_kb.bin", spi_connection=self.conn)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.name == "nt", reason="Temporarily disabled on windows"
|
||||
) # TODO: ESPTOOL-673
|
||||
class TestStubReuse(EsptoolTestCase):
|
||||
def test_stub_reuse_with_synchronization(self):
|
||||
"""Keep the flasher stub running and reuse it the next time."""
|
||||
|
Reference in New Issue
Block a user