Skip to content

Commit 575baf5

Browse files
committed
ci(stm32variant): dynamically manage syswkup list
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 7b30c6a commit 575baf5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: CI/update/stm32variant.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1205,12 +1205,16 @@ def print_peripheral():
12051205

12061206
# PinNamesVar.h generation
12071207
def manage_syswkup():
1208-
syswkup_pins_list = [[] for _ in range(8)]
12091208
if len(syswkup_list) != 0:
1210-
# H7xx and F446 start from 0
1209+
# Find the max range of SYS_WKUP
1210+
max_range = syswkup_list[-1][2].replace("SYS_WKUP", "")
1211+
max_range = int(max_range) if max_range else 1
1212+
# F446 start from 0
12111213
base_index = 1
12121214
if syswkup_list[0][2].replace("SYS_WKUP", "") == "0":
12131215
base_index = 0
1216+
max_range += 1
1217+
syswkup_pins_list = [[] for _ in range(max_range)]
12141218
for p in syswkup_list:
12151219
num = p[2].replace("SYS_WKUP", "")
12161220
num = int(num) if num else 1
@@ -1220,6 +1224,8 @@ def manage_syswkup():
12201224
else:
12211225
cmt = f" /* {p[2]} */"
12221226
syswkup_pins_list[num].append([p[0], cmt])
1227+
else:
1228+
syswkup_pins_list = []
12231229
return syswkup_pins_list
12241230

12251231

0 commit comments

Comments
 (0)