@@ -2014,7 +2014,9 @@ def aggregate_dir():
2014
2014
out_family_path = root_dir / "variants" / mcu_family .name
2015
2015
# Get all mcu_dir
2016
2016
mcu_dirs = sorted (mcu_family .glob ("*/" ))
2017
-
2017
+ # Get original directory list of current serie STM32YYxx
2018
+ mcu_out_dirs_ori = sorted (out_family_path .glob ("*/" ))
2019
+ mcu_out_dirs_up = []
2018
2020
# Group mcu directories when only expressions and xml file name are different
2019
2021
while mcu_dirs :
2020
2022
# Pop first item
@@ -2076,8 +2078,38 @@ def aggregate_dir():
2076
2078
fname .unlink ()
2077
2079
else :
2078
2080
fname .replace (out_path / fname .name )
2081
+ # Append updated directory to the list of current serie STM32YYxx
2082
+ mcu_out_dirs_up .append (out_path )
2079
2083
del group_mcu_dir [:]
2080
2084
del mcu_dir1_files_list [:]
2085
+ mcu_out_dirs_up .sort ()
2086
+ new_dirs = set (mcu_out_dirs_up ) - set (mcu_out_dirs_ori )
2087
+ if new_dirs :
2088
+ nb_new = len (new_dirs )
2089
+ dir_str = "directories" if nb_new > 1 else "directory"
2090
+ print (f"\n New { dir_str } for { mcu_family .name } :\n " )
2091
+ for d in new_dirs :
2092
+ print (f" - { d .name } " )
2093
+ print ("\n --> Please, check if it is a new directory or a renamed one." )
2094
+ old_dirs = set (mcu_out_dirs_ori ) - set (mcu_out_dirs_up )
2095
+ if old_dirs :
2096
+ nb_old = len (old_dirs )
2097
+ dir_str = "Directories" if nb_old > 1 else "Directory"
2098
+ print (f"\n { dir_str } not updated for { mcu_family .name } :\n " )
2099
+ for d in old_dirs :
2100
+ print (f" - { d .name } " )
2101
+ print (
2102
+ """
2103
+ --> Please, check if it is due to directory name update (renamed), if true then:
2104
+ - Move custom boards definition files, if any.
2105
+ - Move linker script(s), if any.
2106
+ - Copy 'SystemClock_Config(void)' function to the new generic clock config file.
2107
+ --> Then remove it, update old path in boards.txt
2108
+ (for custom board(s) as well as generic ones).
2109
+ """
2110
+ )
2111
+ del mcu_out_dirs_ori [:]
2112
+ del mcu_out_dirs_up [:]
2081
2113
2082
2114
2083
2115
def default_cubemxdir ():
0 commit comments