Skip to content

Commit 93d2c96

Browse files
authored
Merge pull request #2932 from fpistm/variant_update
chore: update variants against latest update
2 parents 1c04d04 + 3e1c4ea commit 93d2c96

File tree

802 files changed

+19879
-1002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

802 files changed

+19879
-1002
lines changed

CI/build/conf/cores_config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
"GENERIC_C031C4UX",
4949
"GENERIC_C031C6TX",
5050
"GENERIC_C031F4PX",
51+
"GENERIC_C051C6TX",
52+
"GENERIC_C051C6UX",
53+
"GENERIC_C051C8TX",
5154
"GENERIC_C071G8UX",
5255
"GENERIC_C071R8TX",
5356
"GENERIC_C092CBTX",
@@ -569,14 +572,24 @@
569572
"GENERIC_G4A1RETX",
570573
"GENERIC_H503CBTX",
571574
"GENERIC_H562RGTX",
575+
"GENERIC_H562RGVX",
572576
"GENERIC_H563IIKXQ",
573577
"GENERIC_H563RGTX",
578+
"GENERIC_H563RGVX",
574579
"GENERIC_H563RITX",
580+
"GENERIC_H563RIVX",
575581
"GENERIC_H563ZGTX",
576582
"GENERIC_H563ZITX",
583+
"GENERIC_H723VEHX",
584+
"GENERIC_H723VETX",
585+
"GENERIC_H723VGHX",
586+
"GENERIC_H723VGTX",
577587
"GENERIC_H723ZETX",
578588
"GENERIC_H723ZGTX",
589+
"GENERIC_H730VBHX",
590+
"GENERIC_H730VBTX",
579591
"GENERIC_H730ZBTX",
592+
"GENERIC_H733VGHX",
580593
"GENERIC_H742IGKX",
581594
"GENERIC_H742IGTX",
582595
"GENERIC_H742IIKX",
@@ -603,6 +616,8 @@
603616
"GENERIC_H743ZITX",
604617
"GENERIC_H745XGHX",
605618
"GENERIC_H745XIHX",
619+
"GENERIC_H745ZGTX",
620+
"GENERIC_H745ZITX",
606621
"GENERIC_H747AGIX",
607622
"GENERIC_H747AIIX",
608623
"GENERIC_H747IGTX",

CI/build/conf/cores_config_ci.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
"GENERIC_C031C4UX",
4949
"GENERIC_C031C6TX",
5050
"GENERIC_C031F4PX",
51+
"GENERIC_C051C6TX",
52+
"GENERIC_C051C6UX",
53+
"GENERIC_C051C8TX",
5154
"GENERIC_C071G8UX",
5255
"GENERIC_C071R8TX",
5356
"GENERIC_C092CBTX",
@@ -569,14 +572,24 @@
569572
"GENERIC_G4A1RETX",
570573
"GENERIC_H503CBTX",
571574
"GENERIC_H562RGTX",
575+
"GENERIC_H562RGVX",
572576
"GENERIC_H563IIKXQ",
573577
"GENERIC_H563RGTX",
578+
"GENERIC_H563RGVX",
574579
"GENERIC_H563RITX",
580+
"GENERIC_H563RIVX",
575581
"GENERIC_H563ZGTX",
576582
"GENERIC_H563ZITX",
583+
"GENERIC_H723VEHX",
584+
"GENERIC_H723VETX",
585+
"GENERIC_H723VGHX",
586+
"GENERIC_H723VGTX",
577587
"GENERIC_H723ZETX",
578588
"GENERIC_H723ZGTX",
589+
"GENERIC_H730VBHX",
590+
"GENERIC_H730VBTX",
579591
"GENERIC_H730ZBTX",
592+
"GENERIC_H733VGHX",
580593
"GENERIC_H742IGKX",
581594
"GENERIC_H742IGTX",
582595
"GENERIC_H742IIKX",
@@ -603,6 +616,8 @@
603616
"GENERIC_H743ZITX",
604617
"GENERIC_H745XGHX",
605618
"GENERIC_H745XIHX",
619+
"GENERIC_H745ZGTX",
620+
"GENERIC_H745ZITX",
606621
"GENERIC_H747AGIX",
607622
"GENERIC_H747AIIX",
608623
"GENERIC_H747IGTX",

CI/update/stm32variant.py

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,35 @@
9292
"CAN": ["F0", "F1", "F2", "F3", "F4", "F7", "L4"],
9393
"ETH": ["F4", "F7", "H7"],
9494
}
95+
96+
# Flash size encoding in not always present in the mcu file but it is generally
97+
# encoded as a single character (number or letter) which can be mapped to the
98+
# actual flash size in bytes.
99+
flash_size_dict = {
100+
"0": 1024, # 1Kb
101+
"1": 2048, # 2Kb
102+
"2": 4096, # 4Kb
103+
"3": 8192, # 8Kb
104+
"4": 16384, # 16Kb
105+
"5": 24576, # 24Kb
106+
"6": 32768, # 32Kb
107+
"7": 49152, # 48Kb
108+
"8": 65536, # 64Kb
109+
"9": 73728, # 72Kb
110+
"A": 98304, # 96Kb
111+
"B": 131072, # 128Kb
112+
"Z": 196608, # 192Kb
113+
"C": 262144, # 256Kb
114+
"D": 393216, # 384Kb
115+
"E": 524288, # 512Kb
116+
"F": 786432, # 768Kb
117+
"G": 1048576, # 1Mb
118+
"H": 1572864, # 1.5Mb
119+
"I": 2097152, # 2Mb
120+
"K": 3145728, # 3Mb
121+
"J": 4194304, # 4Mb
122+
}
123+
95124
# Cube information
96125
product_line_dict = {}
97126
svd_dict = {} # 'name':'svd file'
@@ -193,8 +222,12 @@ def parse_mcu_file():
193222
ignored_stm32_list.append(mcu_family)
194223
xml_mcu.unlink()
195224
return False
196-
197225
mcu_refname = mcu_node.attributes["RefName"].value
226+
# Skip STM32H5E/F series
227+
if mcu_refname.startswith("STM32H5E") or mcu_refname.startswith("STM32H5F"):
228+
print(f"Warning: {mcu_refname} series is not supported yet. Skipping.")
229+
xml_mcu.unlink()
230+
return False
198231
core_node = mcu_node.getElementsByTagName("Core")
199232
for f in core_node:
200233
# Strip last non digit characters and extract the number
@@ -206,9 +239,24 @@ def parse_mcu_file():
206239
ram_node = mcu_node.getElementsByTagName("Ram")
207240
for f in ram_node:
208241
mcu_ram.append(int(f.firstChild.nodeValue) * 1024)
209-
flash_node = mcu_node.getElementsByTagName("Flash")
210-
for f in flash_node:
211-
mcu_flash.append(int(f.firstChild.nodeValue) * 1024)
242+
# Test if Flash size is present in the mcu file, if not get it from flash_size array
243+
if not mcu_node.getElementsByTagName("Flash"):
244+
# flash id is the character after the series name and the two next characters
245+
# (e.g. STM32F103xB -> flash id is 'B')
246+
flash_id = mcu_refname[len(mcu_family) + 3]
247+
# flash_id = mcu_refname.split("x")[-1]
248+
if flash_id in flash_size_dict:
249+
mcu_flash.append(flash_size_dict[flash_id])
250+
else:
251+
print(
252+
f"Warning: Flash size '{flash_id}' not found in dict for MCU {mcu_refname}."
253+
)
254+
print("Flash size set to 0.")
255+
mcu_flash.append(0)
256+
else:
257+
flash_node = mcu_node.getElementsByTagName("Flash")
258+
for f in flash_node:
259+
mcu_flash.append(int(f.firstChild.nodeValue) * 1024)
212260

213261
itemlist = xml_mcu.getElementsByTagName("IP")
214262
for s in itemlist:
@@ -221,7 +269,10 @@ def parse_mcu_file():
221269
if inst:
222270
if "OTG" in inst.group(1):
223271
if "FS" in inst.group(1):
224-
usb_inst["otg_fs"] = inst.group(1)
272+
if inst.group(1).endswith("FS1"):
273+
usb_inst["otg_fs"] = inst.group(1)[:-1]
274+
else:
275+
usb_inst["otg_fs"] = inst.group(1)
225276
else:
226277
if inst.group(1).endswith("HS1"):
227278
usb_inst["otg_hs"] = inst.group(1)[:-1]
@@ -2793,8 +2844,8 @@ def manage_repo():
27932844
# Clean temporary dir
27942845
deleteFolder(tmp_dir)
27952846

2796-
pl_regex = re.compile(r"([AQ])$")
2797-
package_regex = re.compile(r"[\w][\w]([ANPQSXZ])?$")
2847+
pl_regex = re.compile(r"([AGNPQSXZ])$")
2848+
package_regex = re.compile(r"[\w][\w]([AGNPQSXZ])?$")
27982849
flash_group_regex = re.compile(r"(.*)\((.*)\)(.*)")
27992850

28002851
for mcu_file in mcu_list:

0 commit comments

Comments
 (0)