@@ -611,6 +611,24 @@ def updateMDFile(md_file, serie, version):
611
611
print (regexmd_up .sub (rf"\g<1>{ version } " , line ), end = "" )
612
612
613
613
614
+ def updateOpenAmp ():
615
+ print ("Updating OpenAmp Middleware" )
616
+ repo_path = repo_local_path / repo_core_name
617
+ if upargs .local :
618
+ cube_path = local_cube_path
619
+ else :
620
+ cube_name = f"{ repo_generic_name } MP1"
621
+ cube_path = repo_local_path / cube_name
622
+ OpenAmp_cube_path = cube_path / "Middlewares" / "Third_Party" / "OpenAMP"
623
+ OpenAmp_core_path = repo_path / "system" / "Middlewares" / "OpenAMP"
624
+
625
+ # First delete old HAL version
626
+ deleteFolder (OpenAmp_core_path )
627
+
628
+ # Copy new one
629
+ copyFolder (OpenAmp_cube_path , OpenAmp_core_path )
630
+
631
+
614
632
def updateCore ():
615
633
for serie in stm32_list :
616
634
if upargs .local :
@@ -713,6 +731,28 @@ def updateCore():
713
731
# Apply all related patch if any
714
732
applyPatch (serie , HAL_updated , CMSIS_updated , core_path )
715
733
734
+ if serie == "MP1" :
735
+ print (f"Updating { serie } OpenAmp Middleware to Cube { cube_version } ..." )
736
+ updateOpenAmp ()
737
+ openAmp_commit_msg = (
738
+ f"Update OpenAmp Middleware to MP1 Cube version { cube_version } "
739
+ )
740
+ commitFiles (core_path , openAmp_commit_msg )
741
+ print (
742
+ "WARNING: OpenAmp MW has been updated, please check whether Arduino implementation:"
743
+ )
744
+ print (" * cores/arduino/stm32/OpenAMP/mbox_ipcc.h" )
745
+ print (" * cores/arduino/stm32/OpenAMP/mbox_ipcc.c" )
746
+ print (" * cores/arduino/stm32/OpenAMP/rsc_table.h" )
747
+ print (" * cores/arduino/stm32/OpenAMP/rsc_table.c" )
748
+ print (" * cores/arduino/stm32/OpenAMP/openamp.h" )
749
+ print (" * cores/arduino/stm32/OpenAMP/openamp.c" )
750
+ print (" * cores/arduino/stm32/OpenAMP/openamp_conf.h" )
751
+ print (" should be updated from Cube project:" )
752
+ print (
753
+ " --> Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo"
754
+ )
755
+
716
756
717
757
# Parser
718
758
upparser = argparse .ArgumentParser (
0 commit comments