Skip to content

Commit a903e27

Browse files
committed
CI(stm32variant): fix syswkup list
This partially revert this commit: ci(stm32variant): dynamically manage syswkup list 575baf5 Warning raised if the fixed value are too small. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 02c49bd commit a903e27

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CI/update/stm32variant.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1231,15 +1231,21 @@ def print_peripheral():
12311231
# PinNamesVar.h generation
12321232
def manage_syswkup():
12331233
if len(syswkup_list) != 0:
1234-
# Find the max range of SYS_WKUP
1234+
# Find the max range of SYS_WKUP to ensure it doesn't exceed
1235+
# the current maximum range of SYS_WKUP used by STM32LowPower
12351236
max_range = syswkup_list[-1][2].replace("SYS_WKUP", "")
12361237
max_range = int(max_range) if max_range else 1
12371238
# F446 start from 0
12381239
base_index = 1
12391240
if syswkup_list[0][2].replace("SYS_WKUP", "") == "0":
12401241
base_index = 0
12411242
max_range += 1
1242-
syswkup_pins_list = [[] for _ in range(max_range)]
1243+
if max_range > 8:
1244+
print(
1245+
f"Error: SYS_WKUP range exceeds the current maximum range of 8 --> {max_range}."
1246+
)
1247+
exit(1)
1248+
syswkup_pins_list = [[] for _ in range(8)]
12431249
for p in syswkup_list:
12441250
num = p[2].replace("SYS_WKUP", "")
12451251
num = int(num) if num else 1

0 commit comments

Comments
 (0)