mirror of
https://github.com/espressif/esptool.git
synced 2025-10-19 02:43:00 +08:00
feat(targets): Update chip features lists with more info
This commit is contained in:
@@ -236,7 +236,7 @@ class ESP32ROM(ESPLoader):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
features = ["WiFi"]
|
features = ["Wi-Fi"]
|
||||||
word3 = self.read_efuse(3)
|
word3 = self.read_efuse(3)
|
||||||
|
|
||||||
# names of variables in this section are lowercase
|
# names of variables in this section are lowercase
|
||||||
@@ -249,9 +249,9 @@ class ESP32ROM(ESPLoader):
|
|||||||
|
|
||||||
chip_ver_dis_app_cpu = word3 & (1 << 0)
|
chip_ver_dis_app_cpu = word3 & (1 << 0)
|
||||||
if chip_ver_dis_app_cpu:
|
if chip_ver_dis_app_cpu:
|
||||||
features += ["Single Core"]
|
features += ["Single Core + LP Core"]
|
||||||
else:
|
else:
|
||||||
features += ["Dual Core"]
|
features += ["Dual Core + LP Core"]
|
||||||
|
|
||||||
chip_cpu_freq_rated = word3 & (1 << 13)
|
chip_cpu_freq_rated = word3 & (1 << 13)
|
||||||
if chip_cpu_freq_rated:
|
if chip_cpu_freq_rated:
|
||||||
|
@@ -83,6 +83,9 @@ class ESP32C2ROM(ESP32C3ROM):
|
|||||||
minor_rev = self.get_minor_chip_version()
|
minor_rev = self.get_minor_chip_version()
|
||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
|
def get_chip_features(self):
|
||||||
|
return ["Wi-Fi", "BT 5 (LE)", "Single Core", "120MHz"]
|
||||||
|
|
||||||
def get_minor_chip_version(self):
|
def get_minor_chip_version(self):
|
||||||
num_word = 1
|
num_word = 1
|
||||||
return (self.read_reg(self.EFUSE_BLOCK2_ADDR + (4 * num_word)) >> 16) & 0xF
|
return (self.read_reg(self.EFUSE_BLOCK2_ADDR + (4 * num_word)) >> 16) & 0xF
|
||||||
|
@@ -152,7 +152,7 @@ class ESP32C3ROM(ESP32ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
features = ["WiFi", "BLE"]
|
features = ["Wi-Fi", "BT 5 (LE)", "Single Core", "160MHz"]
|
||||||
|
|
||||||
flash = {
|
flash = {
|
||||||
0: None,
|
0: None,
|
||||||
|
@@ -114,6 +114,15 @@ class ESP32C5ROM(ESP32C6ROM):
|
|||||||
minor_rev = self.get_minor_chip_version()
|
minor_rev = self.get_minor_chip_version()
|
||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
|
def get_chip_features(self):
|
||||||
|
return [
|
||||||
|
"Wi-Fi 6 (dual-band)",
|
||||||
|
"BT 5 (LE)",
|
||||||
|
"IEEE802.15.4",
|
||||||
|
"Single Core + LP Core",
|
||||||
|
"240MHz",
|
||||||
|
]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# The crystal detection algorithm of ESP32/ESP8266
|
# The crystal detection algorithm of ESP32/ESP8266
|
||||||
# works for ESP32-C5 as well.
|
# works for ESP32-C5 as well.
|
||||||
|
@@ -123,7 +123,13 @@ class ESP32C6ROM(ESP32C3ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["WiFi 6", "BT 5", "IEEE802.15.4"]
|
return [
|
||||||
|
"Wi-Fi 6",
|
||||||
|
"BT 5 (LE)",
|
||||||
|
"IEEE802.15.4",
|
||||||
|
"Single Core + LP Core",
|
||||||
|
"160MHz",
|
||||||
|
]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# ESP32C6 XTAL is fixed to 40MHz
|
# ESP32C6 XTAL is fixed to 40MHz
|
||||||
|
@@ -106,7 +106,7 @@ class ESP32C61ROM(ESP32C6ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["WiFi 6", "BT 5"]
|
return ["Wi-Fi 6", "BT 5 (LE)", "Single Core", "160MHz"]
|
||||||
|
|
||||||
def read_mac(self, mac_type="BASE_MAC"):
|
def read_mac(self, mac_type="BASE_MAC"):
|
||||||
"""Read MAC from EFUSE region"""
|
"""Read MAC from EFUSE region"""
|
||||||
|
@@ -71,7 +71,7 @@ class ESP32H2ROM(ESP32C6ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["BLE", "IEEE802.15.4"]
|
return ["BT 5 (LE)", "IEEE802.15.4", "Single Core", "96MHz"]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# ESP32H2 XTAL is fixed to 32MHz
|
# ESP32H2 XTAL is fixed to 32MHz
|
||||||
|
@@ -71,7 +71,7 @@ class ESP32H21ROM(ESP32H2ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["BLE", "IEEE802.15.4"]
|
return ["BT 5 (LE)", "IEEE802.15.4", "Single Core", "96MHz"]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# ESP32H21 XTAL is fixed to 32MHz
|
# ESP32H21 XTAL is fixed to 32MHz
|
||||||
|
@@ -127,7 +127,7 @@ class ESP32H4ROM(ESP32C3ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["BLE", "IEEE802.15.4"]
|
return ["BT 5 (LE)", "IEEE802.15.4", "Dual Core", "96MHz"]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# ESP32H4 XTAL is fixed to 32MHz
|
# ESP32H4 XTAL is fixed to 32MHz
|
||||||
|
@@ -148,7 +148,7 @@ class ESP32P4ROM(ESP32ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
return ["High-Performance MCU"]
|
return ["Dual Core + LP Core", "400MHz"]
|
||||||
|
|
||||||
def get_crystal_freq(self):
|
def get_crystal_freq(self):
|
||||||
# ESP32P4 XTAL is fixed to 40MHz
|
# ESP32P4 XTAL is fixed to 40MHz
|
||||||
|
@@ -180,10 +180,7 @@ class ESP32S2ROM(ESP32ROM):
|
|||||||
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
return f"{chip_name} (revision v{major_rev}.{minor_rev})"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
features = ["WiFi"]
|
features = ["Wi-Fi", "Single Core", "240MHz"]
|
||||||
|
|
||||||
if self.secure_download_mode:
|
|
||||||
features += ["Secure Download Mode Enabled"]
|
|
||||||
|
|
||||||
flash_version = {
|
flash_version = {
|
||||||
0: "No Embedded Flash",
|
0: "No Embedded Flash",
|
||||||
@@ -201,9 +198,9 @@ class ESP32S2ROM(ESP32ROM):
|
|||||||
|
|
||||||
block2_version = {
|
block2_version = {
|
||||||
0: "No calibration in BLK2 of efuse",
|
0: "No calibration in BLK2 of efuse",
|
||||||
1: "ADC and temperature sensor calibration in BLK2 of efuse V1",
|
1: "ADC and temperature sensor calibration in BLK2 of eFuse V1",
|
||||||
2: "ADC and temperature sensor calibration in BLK2 of efuse V2",
|
2: "ADC and temperature sensor calibration in BLK2 of eFuse V2",
|
||||||
}.get(self.get_block2_version(), "Unknown Calibration in BLK2")
|
}.get(self.get_block2_version(), "Unknown calibration in BLK2")
|
||||||
features += [block2_version]
|
features += [block2_version]
|
||||||
|
|
||||||
return features
|
return features
|
||||||
|
@@ -222,7 +222,7 @@ class ESP32S3ROM(ESP32ROM):
|
|||||||
return {1: "AP_3v3", 2: "AP_1v8"}.get(vendor_id, "")
|
return {1: "AP_3v3", 2: "AP_1v8"}.get(vendor_id, "")
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
features = ["WiFi", "BLE"]
|
features = ["Wi-Fi", "BT 5 (LE)", "Dual Core + LP Core", "240MHz"]
|
||||||
|
|
||||||
flash = {
|
flash = {
|
||||||
0: None,
|
0: None,
|
||||||
|
@@ -106,7 +106,7 @@ class ESP8266ROM(ESPLoader):
|
|||||||
return "ESP8266EX"
|
return "ESP8266EX"
|
||||||
|
|
||||||
def get_chip_features(self):
|
def get_chip_features(self):
|
||||||
features = ["WiFi"]
|
features = ["Wi-Fi", "160MHz"]
|
||||||
if "ESP8285" in self.get_chip_description():
|
if "ESP8285" in self.get_chip_description():
|
||||||
features += ["Embedded Flash"]
|
features += ["Embedded Flash"]
|
||||||
return features
|
return features
|
||||||
|
Reference in New Issue
Block a user