efuse_table_gen: Fixes wrong joining fields with omitted names

The issue is related to the non-sequential way of description when
such fields going together sequential.

Related to esp32h2 chip for eFuses: MAC_FACTORY and MAC_EXT.
The issue is in wrong indexes of MAC_EXT.
MAC_EXT got indexes like it is joined to MAC_FACTORY.

const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = {
    &MAC_FACTORY[0],
    &MAC_FACTORY[1],
    &MAC_FACTORY[2],
    &MAC_FACTORY[3],
    &MAC_FACTORY[4],
    &MAC_FACTORY[5],
    NULL
};

const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = {
    &MAC_EXT[6],
    &MAC_EXT[7],
    NULL
};

This commit fixed it to:

const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = {
    &MAC_EXT[0],
    &MAC_EXT[1],
    NULL
};
This commit is contained in:
KonstantinKondrashov
2021-10-28 20:15:24 +08:00
parent 55fd8cb685
commit f45d25d380
2 changed files with 70 additions and 1 deletions

View File

@@ -98,9 +98,11 @@ class FuseTable(list):
# fill group
names = [p.field_name for p in res]
duplicates = set(n for n in names if names.count(n) > 1)
if len(duplicates) != 0:
for dname in duplicates:
i_count = 0
for p in res:
if p.field_name != dname:
continue
if len(duplicates.intersection([p.field_name])) != 0:
p.group = str(i_count)
i_count += 1