Update: 更新esptool ( version: 4.7.0 )

This commit is contained in:
王立帮
2024-09-01 12:36:51 +08:00
parent caf26e2fbc
commit 557a035010
37 changed files with 4733 additions and 185 deletions

View File

@@ -17,8 +17,6 @@ class ESP32ROM(ESPLoader):
IMAGE_CHIP_ID = 0
IS_STUB = False
FPGA_SLOW_BOOT = True
CHIP_DETECT_MAGIC_VALUE = [0x00F01D83]
IROM_MAP_START = 0x400D0000
@@ -105,6 +103,8 @@ class ESP32ROM(ESPLoader):
FLASH_ENCRYPTED_WRITE_ALIGN = 32
UF2_FAMILY_ID = 0x1C5F21B0
""" Try to read the BLOCK1 (encryption key) and check if it is valid """
def is_flash_encryption_key_valid(self):
@@ -281,7 +281,7 @@ class ESP32ROM(ESPLoader):
return self.read_reg(self.EFUSE_RD_REG_BASE + (4 * n))
def chip_id(self):
raise NotSupportedError(self, "chip_id")
raise NotSupportedError(self, "Function chip_id")
def read_mac(self, mac_type="BASE_MAC"):
"""Read MAC from EFUSE region"""
@@ -361,6 +361,7 @@ class ESP32ROM(ESPLoader):
return rom_calculated_freq
def change_baud(self, baud):
assert self.CHIP_NAME == "ESP32", "This workaround should only apply to ESP32"
# It's a workaround to avoid esp32 CK_8M frequency drift.
rom_calculated_freq = self.get_rom_cal_crystal_freq()
valid_freq = 40000000 if rom_calculated_freq > 33000000 else 26000000
@@ -373,6 +374,11 @@ class ESP32ROM(ESPLoader):
time.sleep(0.05) # get rid of garbage sent during baud rate change
self.flush_input()
def check_spi_connection(self, spi_connection):
# Pins 30, 31 do not exist
if not set(spi_connection).issubset(set(range(0, 30)) | set((32, 33))):
raise FatalError("SPI Pin numbers must be in the range 0-29, 32, or 33.")
class ESP32StubLoader(ESP32ROM):
"""Access class for ESP32 stub loader, runs on top of ROM."""