diff --git a/pytest-embedded-idf/pytest_embedded_idf/serial.py b/pytest-embedded-idf/pytest_embedded_idf/serial.py index 2c763ea5..628b6256 100644 --- a/pytest-embedded-idf/pytest_embedded_idf/serial.py +++ b/pytest-embedded-idf/pytest_embedded_idf/serial.py @@ -1,6 +1,7 @@ import contextlib import hashlib import logging +import os import tempfile from typing import Optional, TextIO, Union @@ -161,6 +162,8 @@ def flash(self, app: Optional[IdfApp] = None) -> None: else: _args.append(str(v)) + if '--baud' not in _args: + _args.extend(['--baud', os.getenv('ESPBAUD', '1000000')]) _args.append('write_flash') if self.erase_nvs: