Skip to content

Commit 5fdf232

Browse files
committed
ci(stm32cube): add OpenAmp middleware update
Update OpenAmp Middleware when updating MP1 Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent f5c6e7a commit 5fdf232

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CI/update/stm32cube.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,25 @@ def updateMDFile(md_file, serie, version):
611611
print(regexmd_up.sub(rf"\g<1>{version}", line), end="")
612612

613613

614+
615+
def updateOpenAmp():
616+
print("Updating OpenAmp Middleware")
617+
repo_path = repo_local_path / repo_core_name
618+
if upargs.local:
619+
cube_path = local_cube_path
620+
else:
621+
cube_name = f"{repo_generic_name}MP1"
622+
cube_path = repo_local_path / cube_name
623+
OpenAmp_cube_path = cube_path / "Middlewares" / "Third_Party" / "OpenAMP"
624+
OpenAmp_core_path = repo_path / "system" / "Middlewares" / "OpenAMP"
625+
626+
# First delete old HAL version
627+
deleteFolder(OpenAmp_core_path)
628+
629+
# Copy new one
630+
copyFolder(OpenAmp_cube_path, OpenAmp_core_path)
631+
632+
614633
def updateCore():
615634
for serie in stm32_list:
616635
if upargs.local:
@@ -713,6 +732,22 @@ def updateCore():
713732
# Apply all related patch if any
714733
applyPatch(serie, HAL_updated, CMSIS_updated, core_path)
715734

735+
if (serie == "MP1"):
736+
print(f"Updating {serie} OpenAmp Middleware to Cube {cube_version} ...")
737+
updateOpenAmp()
738+
openAmp_commit_msg = f"Update OpenAmp Middleware to MP1 Cube version {cube_version}"
739+
commitFiles(core_path, openAmp_commit_msg)
740+
print("WARNING: OpenAmp middleware has been updated, please check whether Arduino implementation:")
741+
print(" * cores/arduino/stm32/OpenAMP/mbox_ipcc.h")
742+
print(" * cores/arduino/stm32/OpenAMP/mbox_ipcc.c")
743+
print(" * cores/arduino/stm32/OpenAMP/rsc_table.h")
744+
print(" * cores/arduino/stm32/OpenAMP/rsc_table.c")
745+
print(" * cores/arduino/stm32/OpenAMP/openamp.h")
746+
print(" * cores/arduino/stm32/OpenAMP/openamp.c")
747+
print(" * cores/arduino/stm32/OpenAMP/openamp_conf.h")
748+
print(" should be updated from Cube project:")
749+
print(" --> Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo")
750+
716751

717752
# Parser
718753
upparser = argparse.ArgumentParser(

0 commit comments

Comments
 (0)