mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-25 04:17:34 +00:00
feat: Update esptool to v5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user