Skip to content

Commit 82d7bb0

Browse files
committed
ci(variant): update for new series WL3x
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent f1eef81 commit 82d7bb0

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

CI/update/stm32variant.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ def dac_pinmap():
707707

708708
def i2c_pinmap(lst):
709709
i2c_pins_list = []
710-
winst = []
711-
wpin = []
710+
winst = [0]
711+
wpin = [0]
712712
mode = "STM_MODE_AF_OD"
713713
if lst == i2csda_list:
714714
aname = "I2C_SDA"
@@ -1651,7 +1651,7 @@ def search_product_line(valueline: str, extra: str) -> str:
16511651
for idx_pline, pline in enumerate(product_line_list):
16521652
vline = valueline
16531653
product_line = pline
1654-
if vline.startswith("STM32WB0"):
1654+
if vline.startswith("STM32WB0") or vline.startswith("STM32WL3"):
16551655
pline = pline + "xx"
16561656
# Remove the 'x' character from pline and
16571657
# the one at same index in the vline
@@ -2204,15 +2204,19 @@ def group_by_flash(group_base_list, glist, index_mcu_base):
22042204
ext_list = []
22052205
for ppe in key_package_list:
22062206
sub = mcu_PE_regex.search(ppe)
2207-
package_list.append(sub.group(1))
2208-
# Assert
2209-
if sub.group(2) != "x":
2210-
print(
2211-
f"Package of {base_name}, ppe {ppe} info contains {sub.group(2)} instead of 'x'"
2212-
)
2207+
if not sub:
2208+
print(f"Package of {base_name}, ppe {ppe} info not recognized")
22132209
exit(1)
2214-
if sub.group(3):
2215-
ext_list.append(sub.group(3))
2210+
else:
2211+
package_list.append(sub.group(1))
2212+
# Assert
2213+
if sub.group(2) != "x":
2214+
print(
2215+
f"Package of {base_name}, ppe {ppe} info contains {sub.group(2)} instead of 'x'"
2216+
)
2217+
exit(1)
2218+
if sub.group(3):
2219+
ext_list.append(sub.group(3))
22162220
# Count each subpart
22172221
pcounter = Counter(package_list)
22182222
ecounter = Counter(ext_list)
@@ -2245,9 +2249,10 @@ def merge_dir(out_temp_path, group_mcu_dir, mcu_family, periph_xml, variant_exp)
22452249
# Merge if needed
22462250
if len(group_mcu_dir) != 1:
22472251
# Handle mcu name length dynamically
2248-
# Add 3 for extra information line, #pin and flash
2249-
index_mcu_base = len(mcu_family.name.removeprefix("STM32").removesuffix(nx)) + 3
2250-
2252+
# Add num for extra information line, #pin and flash
2253+
index_mcu_base = len(mcu_family.name.removeprefix("STM32").removesuffix(nx)) + (
2254+
3 if len(nx) == 2 else 2
2255+
)
22512256
# Extract only dir name
22522257
for dir_name in group_mcu_dir:
22532258
dirname_list.append(dir_name.stem)

0 commit comments

Comments
 (0)