From af4bf3ce8f86b71d34a58f189c53ca5c6d70acb6 Mon Sep 17 00:00:00 2001 From: "radim.karnis" Date: Tue, 3 May 2022 14:02:57 +0200 Subject: [PATCH] esp32c2: Remove esp8684 alias --- esptool/__init__.py | 3 +-- esptool/util.py | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/esptool/__init__.py b/esptool/__init__.py index 3dbf1c539..afab80a7f 100644 --- a/esptool/__init__.py +++ b/esptool/__init__.py @@ -70,7 +70,6 @@ FatalError, NotImplementedInROMError, flash_size_bytes, - format_chip_name, ) @@ -99,7 +98,7 @@ def main(argv=None, esp=None): "--chip", "-c", help="Target chip type", - type=format_chip_name, # support ESP32-S2, etc. + type=lambda c: c.lower().replace("-", ""), # support ESP32-S2, etc. choices=["auto"] + CHIP_LIST, default=os.environ.get("ESPTOOL_CHIP", "auto"), ) diff --git a/esptool/util.py b/esptool/util.py index 56111ecf0..e95dbbdb9 100644 --- a/esptool/util.py +++ b/esptool/util.py @@ -22,18 +22,6 @@ def mask_to_shift(mask): return shift -def format_chip_name(c): - """Normalize chip name from user input""" - c = c.lower().replace("-", "") - if c == "esp8684": # TODO: Delete alias, ESPTOOL-389 - print( - "WARNING: Chip name ESP8684 is deprecated in favor of ESP32-C2 " - "and will be removed in a future release. Using ESP32-C2 instead." - ) - return "esp32c2" - return c - - def div_roundup(a, b): """Return a/b rounded up to nearest integer, equivalent result to int(math.ceil(float(int(a)) / float(int(b))), only