feat: Update esptool to v5

This commit is contained in:
Peter Dragun
2025-08-11 16:11:49 +02:00
parent 053fb47e78
commit e3198fff3c
129 changed files with 1237 additions and 1318 deletions

View File

@@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging
from collections import namedtuple
from typing import Any
import esptool
@@ -40,8 +39,4 @@ class LoadableAppSerial(EspSerial):
with open(self.app.bin_file, 'rb') as f_bin_file:
self.esp.change_baud(460800)
try:
# esptool v5.0+
esptool.load_ram(self.esp, input=f_bin_file)
except TypeError:
esptool.load_ram(self.esp, namedtuple('args', 'filename')(f_bin_file))
esptool.load_ram(self.esp, f_bin_file)