Skip to content

Commit

Permalink
fix(esp32_d0wdr2_v3): Print correct chip name
Browse files Browse the repository at this point in the history
  • Loading branch information
radimkarnis committed Aug 23, 2024
1 parent c266fdd commit dfd61e2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions esptool/targets/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,18 @@ def get_chip_description(self):
major_rev = self.get_major_chip_version()
minor_rev = self.get_minor_chip_version()
rev3 = major_rev == 3
single_core = self.read_efuse(3) & (1 << 0) # CHIP_VER DIS_APP_CPU
sc = self.read_efuse(3) & (1 << 0) # single core, CHIP_VER DIS_APP_CPU

chip_name = {
0: "ESP32-S0WDQ6" if single_core else "ESP32-D0WDQ6",
1: "ESP32-S0WD" if single_core else "ESP32-D0WD",
0: "ESP32-S0WDQ6" if sc else "ESP32-D0WDQ6-V3" if rev3 else "ESP32-D0WDQ6",
1: "ESP32-S0WD" if sc else "ESP32-D0WD-V3" if rev3 else "ESP32-D0WD",
2: "ESP32-D2WD",
4: "ESP32-U4WDH",
5: "ESP32-PICO-V3" if rev3 else "ESP32-PICO-D4",
6: "ESP32-PICO-V3-02",
7: "ESP32-D0WDR2-V3",
}.get(pkg_version, "unknown ESP32")

# ESP32-D0WD-V3, ESP32-D0WDQ6-V3
if chip_name.startswith("ESP32-D0WD") and rev3:
chip_name += "-V3"

return f"{chip_name} (revision v{major_rev}.{minor_rev})"

def get_chip_features(self):
Expand Down

0 comments on commit dfd61e2

Please sign in to comment.