Skip to content

Commit ca1eaba

Browse files
committed
ci: add STM32 Cube v2 support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent b4bae0d commit ca1eaba

8 files changed

Lines changed: 1041 additions & 28 deletions

File tree

‎CI/update/stm32_series.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
"WB": "xx",
2525
"WL3": "x",
2626
"WL": "xx"
27-
}
27+
},
28+
"seriesv2": {}
2829
}

‎CI/update/stm32cube.py‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
getRepoBranchName,
2525
commitFiles,
2626
loadSTM32Series,
27+
addSeriesToConfig,
2728
)
2829

2930
if sys.platform.startswith("win32"):
@@ -138,7 +139,7 @@ def checkConfig():
138139
else:
139140
defaultConfig(config_file_path, {"REPO_LOCAL_PATH": str(repo_local_path)})
140141
createFolder(repo_local_path)
141-
stm32_dict = loadSTM32Series(script_path)
142+
stm32_dict = loadSTM32Series(script_path, True, False)
142143

143144

144145
def updateStm32Def(series):
@@ -903,17 +904,6 @@ def updateOpenAmp():
903904
copyFolder(OpenAmp_cube_path, OpenAmp_core_path)
904905

905906

906-
def addSeriesToConfig(series, nx):
907-
stm32_series_file = stm32_series_json_path / "stm32_series.json"
908-
with open(stm32_series_file, "r") as fp:
909-
stm32_series_data = json.load(fp)
910-
if series not in stm32_series_data:
911-
stm32_series_data["series"][series] = nx
912-
with open(stm32_series_file, "w") as fp:
913-
json.dump(stm32_series_data, fp, indent=2)
914-
print(f"Added series {series} with nx={nx} to stm32_series.json")
915-
916-
917907
def updateCore():
918908
global nx
919909
for series in stm32_list:
@@ -1046,7 +1036,7 @@ def updateCore():
10461036
print("No stm32_def file were updated!")
10471037
sys.exit(1)
10481038
# Add the new series to the json config file
1049-
addSeriesToConfig(series, nx)
1039+
addSeriesToConfig(stm32_series_json_path, series, nx, "series")
10501040
if not commitFiles(core_path, series_commit_msg):
10511041
print("No stm32_series.json file were updated!")
10521042

0 commit comments

Comments
 (0)