@@ -178,6 +178,19 @@ def parse_mcu_file():
178
178
179
179
if mcu_family .endswith ("+" ):
180
180
mcu_family = mcu_family [:- 1 ]
181
+
182
+ # Generate only for specified pattern series or supported one
183
+ # Check if mcu_family is supported by the core
184
+ if (
185
+ mcu_family not in stm32_list
186
+ or args .serie
187
+ and serie_pattern .search (mcu_family ) is None
188
+ ):
189
+ if mcu_family not in ignored_stm32_list and mcu_family not in stm32_list :
190
+ ignored_stm32_list .append (mcu_family )
191
+ xml_mcu .unlink ()
192
+ return False
193
+
181
194
mcu_refname = mcu_node .attributes ["RefName" ].value
182
195
core_node = mcu_node .getElementsByTagName ("Core" )
183
196
for f in core_node :
@@ -213,6 +226,7 @@ def parse_mcu_file():
213
226
else :
214
227
if gpiofile == "" and s .attributes ["Name" ].value == "GPIO" :
215
228
gpiofile = s .attributes ["Version" ].value
229
+ return True
216
230
217
231
218
232
def get_gpio_af_num (pintofind , iptofind ):
@@ -2742,18 +2756,7 @@ def manage_repo():
2742
2756
for mcu_file in mcu_list :
2743
2757
# Open input file
2744
2758
xml_mcu = parse (str (mcu_file ))
2745
- parse_mcu_file ()
2746
-
2747
- # Generate only for specified pattern series or supported one
2748
- # Check if mcu_family is supported by the core
2749
- if (
2750
- mcu_family not in stm32_list
2751
- or args .serie
2752
- and serie_pattern .search (mcu_family ) is None
2753
- ):
2754
- if mcu_family not in ignored_stm32_list and mcu_family not in stm32_list :
2755
- ignored_stm32_list .append (mcu_family )
2756
- xml_mcu .unlink ()
2759
+ if parse_mcu_file () is False :
2757
2760
continue
2758
2761
2759
2762
# Add mcu family to the list of directory to aggregate
0 commit comments