Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19f8e10

Browse files
committed
fix(ci): naming exception
WL3 does not have the same naming convention than other series.product_line definition are not the same convention nor case.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent72aedb0 commit19f8e10

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed

‎CI/update/stm32variant.py‎

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,12 +1647,36 @@ def print_variant(generic_list, alt_syswkup_list):
16471647
defsearch_product_line(valueline:str,extra:str)->str:
16481648
product_line=""
16491649
product_line_list=product_line_dict[mcu_family]
1650-
ifnotvalueline.startswith("STM32MP1"):
1650+
ifvalueline.startswith("STM32MP1"):
1651+
# previous
1652+
# Unfortunately, MP1 does not follows the same naming rules
1653+
forplineinproduct_line_dict[mcu_family]:
1654+
vline=valueline
1655+
product_line=pline
1656+
# Remove the 'x' character from pline and
1657+
# the one at same index in the vline
1658+
while1:
1659+
idx=pline.find("x")
1660+
ifidx>0:
1661+
pline=pline.replace("x","",1)
1662+
if"STM32MP15xx"!=vline:
1663+
vline=vline[:idx]+vline[idx+1 :]
1664+
else:
1665+
break
1666+
ifpline>=vlineandpline[:10]==vline[:10]:
1667+
break
1668+
else:
1669+
# In case of CMSIS device does not exist
1670+
product_line="STM32MP15xx"
1671+
elifvalueline.startswith("STM32WL3"):
16511672
foridx_pline,plineinenumerate(product_line_list):
16521673
vline=valueline
1674+
# Add an 'x' at the end to match the length
1675+
# as startup file contains only one 'x' at the end
1676+
# STM32WL3xx -> STM32WL30K8
1677+
# STM32WL3Rx -> STM32WL3RK8
16531678
product_line=pline
1654-
ifvline.startswith("STM32WB0")orvline.startswith("STM32WL3"):
1655-
pline=pline+"xx"
1679+
pline=pline+"x"
16561680
# Remove the 'x' character from pline and
16571681
# the one at same index in the vline
16581682
while1:
@@ -1662,7 +1686,8 @@ def search_product_line(valueline: str, extra: str) -> str:
16621686
vline=vline[:idx]+vline[idx+1 :]
16631687
else:
16641688
break
1665-
ifpline>=vline:
1689+
# Exact match or generic name
1690+
ifpline==vlineorproduct_line=="STM32WL3xx":
16661691
if (
16671692
extra
16681693
andlen(product_line_list)>idx_pline+1
@@ -1674,27 +1699,34 @@ def search_product_line(valueline: str, extra: str) -> str:
16741699
else:
16751700
# In case of CMSIS device does not exist
16761701
product_line=""
1702+
product_line=product_line.upper()
16771703
else:
1678-
# previous
1679-
# Unfortunately, MP1 does not follows the same naming rules
1680-
forplineinproduct_line_dict[mcu_family]:
1704+
foridx_pline,plineinenumerate(product_line_list):
16811705
vline=valueline
16821706
product_line=pline
1707+
ifvline.startswith("STM32WB0"):
1708+
pline=pline+"xx"
16831709
# Remove the 'x' character from pline and
16841710
# the one at same index in the vline
16851711
while1:
16861712
idx=pline.find("x")
16871713
ifidx>0:
16881714
pline=pline.replace("x","",1)
1689-
if"STM32MP15xx"!=vline:
1690-
vline=vline[:idx]+vline[idx+1 :]
1715+
vline=vline[:idx]+vline[idx+1 :]
16911716
else:
16921717
break
1693-
ifpline>=vlineandpline[:10]==vline[:10]:
1718+
ifpline>=vline:
1719+
if (
1720+
extra
1721+
andlen(product_line_list)>idx_pline+1
1722+
andproduct_line_list[idx_pline+1]== (product_line+extra)
1723+
):
1724+
# Look for the next product line if contains the extra
1725+
product_line=product_line_list[idx_pline+1]
16941726
break
16951727
else:
16961728
# In case of CMSIS device does not exist
1697-
product_line="STM32MP15xx"
1729+
product_line=""
16981730
returnproduct_line
16991731

17001732

‎CI/update/stm32wrapper.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,16 @@ def printCMSISStartup(log):
123123
forfn_listingroup_startup_list:
124124
iflen(fn_list)==1:
125125
valueline=re.split("_|\\.",fn_list[0])
126-
vline=valueline[1].upper().replace("X","x")
126+
vline=valueline[1].upper()
127+
ifnotvalueline[1].startswith("stm32wl3"):
128+
vline=vline.replace("X","x")
127129
cmsis_list.append({"vline":vline,"fn":fn_list[0],"cm":""})
128130
else:
129131
forfninfn_list:
130132
valueline=re.split("_|\\.",fn)
131-
vline=valueline[1].upper().replace("X","x")
133+
vline=valueline[1].upper()
134+
ifnotvalueline[1].startswith("stm32wl3"):
135+
vline=vline.replace("X","x")
132136
cm=valueline[2].upper()
133137
cmsis_list.append({"vline":vline,"fn":fn,"cm":cm})
134138
withopen(CMSIS_Startupfile,"w",newline="\n")asout_file:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp