How to Repackage the files in FMU for cross-platform use?
Mostra commenti meno recenti
HI,
I exported a Simulink model to Standalone FMU with source code by following the link https://www.mathworks.com/help/releases/R2022b/slcompiler/gs/export-model-to-standalone-fmu-with-source-code.html
My aim was to reuse the standalone co-simulation FMU with source code on another platform (Linux).
Initially the FMU was created on windows platform and followed the procedure in the above link on Linux platform.
Three steps were provided:
- Unzip the standalone co-simulation FMU with source code and compile the source code to generate the platform specific binary files.
- Move the generated binary file in the binaries folder.
- Repackage the files in FMU for cross-platform use
First two steps were succsfully executed.
I need some help in how to Repackage the files in FMU.
I attempted the following approach: I copied the .so file into the 'binaries > linux64' directory. Then, I compressed all the files including binaries, documentation, sources, model.png, and modelDescription.xml. Finally, I changed the extension of the compressed file to .fmu. However, when I attempted to read this FMU in STAR CCM+, I encountered an error message indicating that the .xml file was not found.

It seems that I may have made a mistake during the repackaging process. I would appreciate it if you could provide detailed instructions on how to properly repackage the files.
Thanks!
2 Commenti
Marina Espejo
il 28 Mar 2024
Hi! Do you know if those steps are necessary when working on windows? I am trying to do a cosimulation between Simulink and STAR-CCM+ as well and i am not being able to find the origin of this mistake:
"INFO: Processing event 'Step FMU'
Connection reset by peer
Connection reset
Server connection failed. This is usually due to a fatal error in the server or a network issue.
Design Simcenter STAR-CCM+ simulation completed
Server process exited with code : -1073741571"
Thanks and good luck!
Jintu
il 29 Mar 2024
Risposta accettata
Più risposte (1)
Christian Bertsch
il 12 Apr 2024
0 voti
Adding a platform binary to a source code FMU is easist done with fmpy on the target system (https://github.com/CATIA-Systems/FMPy) either from the command line or within the GUI. When WSL is installed, you can also add Linux binaries on you Windows machine. With this there is no need to repack manually.
Categorie
Scopri di più su Export Simulink Model as Standalone FMU in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!