diff --git a/pytest-embedded-arduino/pytest_embedded_arduino/serial.py b/pytest-embedded-arduino/pytest_embedded_arduino/serial.py index 22dee44b..0402f9de 100644 --- a/pytest-embedded-arduino/pytest_embedded_arduino/serial.py +++ b/pytest-embedded-arduino/pytest_embedded_arduino/serial.py @@ -55,7 +55,7 @@ def flash(self) -> None: try: esptool.main( - ['--chip', self.app.target, 'write_flash', *flash_files, *flash_settings], + ['--chip', self.app.target, 'write-flash', *flash_files, *flash_settings], esp=self.esp, ) except Exception: diff --git a/pytest-embedded-idf/pytest_embedded_idf/serial.py b/pytest-embedded-idf/pytest_embedded_idf/serial.py index c646c9a1..22ba3a63 100644 --- a/pytest-embedded-idf/pytest_embedded_idf/serial.py +++ b/pytest-embedded-idf/pytest_embedded_idf/serial.py @@ -166,12 +166,12 @@ def flash(self, app: IdfApp | None = None) -> None: if '--baud' not in _args: _args.extend(['--baud', os.getenv('ESPBAUD', '921600')]) - _args.append('write_flash') + _args.append('write-flash') if self.erase_nvs: esptool.main( [ - 'erase_region', + 'erase-region', str(app.partition_table['nvs']['offset']), str(app.partition_table['nvs']['size']), ], @@ -234,10 +234,10 @@ def dump_flash( raise ValueError('You must specify "partition" or ("address" and "size") to dump flash') if output: - esptool.main(['read_flash', str(_addr), str(_size), str(output)], esp=self.esp) + esptool.main(['read-flash', str(_addr), str(_size), str(output)], esp=self.esp) else: with tempfile.NamedTemporaryFile() as fp: - esptool.main(['read_flash', str(_addr), str(_size), fp.name], esp=self.esp) + esptool.main(['read-flash', str(_addr), str(_size), fp.name], esp=self.esp) content = fp.read() return content @@ -256,7 +256,7 @@ def erase_partition(self, partition_name: str) -> None: address = self.app.partition_table[partition_name]['offset'] size = self.app.partition_table[partition_name]['size'] logging.info(f'Erasing the partition "{partition_name}" of size {size} at {address}') - esptool.main(['erase_region', str(address), str(size), *self._force_flag()], esp=self.esp) + esptool.main(['erase-region', str(address), str(size), *self._force_flag()], esp=self.esp) else: raise ValueError(f'partition name "{partition_name}" not found in app partition table') @@ -279,7 +279,7 @@ def read_flash_elf_sha256(self) -> bytes: with tempfile.NamedTemporaryFile() as fp: esptool.main( - ['read_flash', str(bin_offset + self.DEFAULT_SHA256_OFFSET), str(32), fp.name], + ['read-flash', str(bin_offset + self.DEFAULT_SHA256_OFFSET), str(32), fp.name], esp=self.esp, ) content = fp.read() diff --git a/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py b/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py index e2a6b30f..5a6d50b0 100644 --- a/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py +++ b/pytest-embedded-nuttx/pytest_embedded_nuttx/serial.py @@ -93,11 +93,11 @@ def flash(self) -> None: flash_files.extend((str(self.binary_offsets[self.target]), self.app.app_file.as_posix())) flash_settings = [ - '--flash_mode', + '--flash-mode', self.flash_mode, - '--flash_size', + '--flash-size', self.flash_size, - '--flash_freq', + '--flash-freq', self.flash_freq, ] @@ -109,7 +109,7 @@ def flash(self) -> None: self.port, '--baud', str(self.esptool_baud), - 'write_flash', + 'write-flash', *flash_files, *flash_settings, ], diff --git a/pytest-embedded-qemu/pytest_embedded_qemu/app.py b/pytest-embedded-qemu/pytest_embedded_qemu/app.py index b9831769..33cafe78 100644 --- a/pytest-embedded-qemu/pytest_embedded_qemu/app.py +++ b/pytest-embedded-qemu/pytest_embedded_qemu/app.py @@ -88,7 +88,7 @@ def make_bin(self) -> None: 'esptool.py', '--chip', self.app.target, - 'merge_bin', + 'merge-bin', '-o', self.image_path, '--fill-flash-size', diff --git a/pytest-embedded-serial-esp/pytest_embedded_serial_esp/serial.py b/pytest-embedded-serial-esp/pytest_embedded_serial_esp/serial.py index 01ad6cfc..66a9520b 100644 --- a/pytest-embedded-serial-esp/pytest_embedded_serial_esp/serial.py +++ b/pytest-embedded-serial-esp/pytest_embedded_serial_esp/serial.py @@ -125,7 +125,7 @@ def _post_init(self): self._meta.set_port_target_cache(self.port, self.target) if self.erase_all: - esptool.main(['erase_flash'], esp=self.esp) + esptool.main(['erase-flash'], esp=self.esp) super()._post_init() @@ -163,7 +163,7 @@ def hard_reset(self): def erase_flash(self, force: bool = False) -> None: """Erase the complete flash""" logging.info('Erasing the flash') - options = ['erase_flash'] + options = ['erase-flash'] if force or self.esp_flash_force: options.append('--force')