esptest.tools.download_bin module

esptest.tools.download_bin.check_flash_encrypted(efuse_summary)[source]

Check whether flash encryption is enabled from efuse summary.

Parameters:

efuse_summary (str)

Return type:

bool

esptest.tools.download_bin.check_secure_boot_enabled(efuse_summary)[source]

Check whether secure boot is enabled from efuse summary.

Parameters:

efuse_summary (str)

Return type:

bool

class esptest.tools.download_bin.DownBinTool(bin_path, port, baud=-1, parttool='', esptool='', erase_nvs=True, force_no_stub=False, check_no_stub=False)[source]

Bases: object

Parameters:
DEFAULT_BAUD_LIST = [921600, 460800]
download()[source]
Return type:

None

download_partition(partition_bins)[source]

Download partitions from bin file to device, use slower baud rate without retry.

Parameters:

partition_bins (t.Dict[str, str]) – A dictionary of partition name and partition bin file path.

Return type:

None

async esptest.tools.download_bin.async_download_bin_scheduler(bin_path, ports, erase_nvs=True, max_workers=0, force_no_stub=False, check_no_stub=False, baud=0, esptool='')[source]
Parameters:
Return type:

None

esptest.tools.download_bin.download_bin_to_ports(bin_path, ports, erase_nvs=True, max_workers=0, force_no_stub=False, check_no_stub=False, baud=0, esptool='')[source]

Download bin to ports using esptool.

Parameters:
  • bin_path (str) – Path to the bin file.

  • ports (List[str]) – List of serial ports.

  • erase_nvs (bool) – Whether to erase nvs before flashing.

  • max_workers (int) – Maximum number of workers to use.

  • force_no_stub (bool) – Whether to force no stub.

  • check_no_stub (bool) – Whether to check no stub.

  • baud (int | List[int]) – Baud rate to use. If given a list, will try each baud rate in order.

  • esptool (str) – Path to the esptool executable.

Return type:

None

class esptest.tools.download_bin.BinConfig(bin_path, port, erase_nvs=True, force_no_stub=False, check_no_stub=False, baud=0, esptool='')[source]

Bases: object

Configuration for downloading a bin to a port.

Parameters:
  • bin_path (str) – Path to the bin file.

  • port (str) – Serial port to download to.

  • erase_nvs (bool) – Whether to erase nvs before flashing.

  • force_no_stub (bool) – Whether to force no stub.

  • check_no_stub (bool) – Whether to check no stub.

  • baud (int | List[int]) – Baud rate to use. If given a list, will try each baud rate in order.

  • esptool (str) – Path to the esptool executable.

bin_path: str
port: str
erase_nvs: bool = True
force_no_stub: bool = False
check_no_stub: bool = False
baud: int | List[int] = 0
esptool: str = ''
async esptest.tools.download_bin.async_downbin_scheduler(bin_configs, max_workers=0)[source]
Parameters:
Return type:

None

esptest.tools.download_bin.download_bins(bin_configs, max_workers=0)[source]

Download bins to ports using esptool.

Parameters:
  • bin_configs (List[BinConfig]) – List of configuration for downloading a bin to a port.

  • max_workers (int) – Maximum number of workers to use.

Return type:

None