One FMU for Multiple Platforms

조회 수: 14 (최근 30일)
Daniel
Daniel 2024년 11월 26일
댓글: Nils Lande 2024년 12월 12일
Dear Simulink Users,
I am currently generating two separate FMUs for two platforms: Linux and Windows. Using the veristand.tlc file and adjusting the toolchain, I can successfully build an FMU for Linux on a Windows machine, which is very convenient.
However, I’ve encountered a challenge: according to the FMI standard, it should be possible to create a single FMU that supports multiple platforms. When you unzip an FMU, the binaries folder typically contains subfolders such as win64 or linux64. This implies that it should be feasible to include binaries for both platforms in a single FMU, with the respective binaries stored in their corresponding folders.
The issue arises because the modelDescription.xml file in the FMU contains a GUID (Globally Unique Identifier) that looks something like this:
<fmiModelDescription
fmiVersion="2.0"
modelName="ssbs_standalone"
guid="{a54688c2-13c7-0f35-200d-5248b0080a42}"
description=""
generationTool="Simulink (R2020a)"
version="1.157"
variableNamingConvention="structured"
generationDateAndTime="2024-11-21T07:56:06Z"
numberOfEventIndicators="0">
This GUID is also embedded into the compiled binaries (.dll/.so files), which prevents me from simply copying the linux64 folder into the binaries folder of the Windows FMU (or vice versa). The mismatch in GUIDs between the modelDescription.xml and the binaries makes this approach invalid.
Does anyone have a solution or workaround to generate a single FMU that includes binaries for both platforms? Any advice on how to align the GUID across platforms or configure Simulink to produce such a multi-platform FMU would be greatly appreciated.
Thank you in advance for your help!
  댓글 수: 2
Bavo
Bavo 2024년 11월 29일
편집: Bavo 2024년 11월 29일
Hi
This issue will be experienced by everyone trying to generate a FMU for 2 platforms?? I have FMU Builder For Simulink version 24.2.0 and I fail to create an FMU for linux target.
Best regards
Nils Lande
Nils Lande 2024년 12월 12일
The FMI 3.0 Implementers' Guide recomends this (and I would claim it is recommended for FMI 2.0 also).
I make FMUs for the Windows platforms and I would very much like to be able to include both 32-bit and 64-bit DLLs in the same FMU.
3.4. Support for Multiple Platforms
FMU exporting implementations should strive to support common platforms out of the box. They should provide support for generating FMUs that contain multiple binary implementations, and where feasible, a source code implementation in one go.

댓글을 달려면 로그인하십시오.

채택된 답변

Oliver Jaehrig
Oliver Jaehrig 2024년 11월 26일
Can you use this documented workflow for cross-compilation?
You would need to upgrade your release to use it.
  댓글 수: 3
Oliver Jaehrig
Oliver Jaehrig 2024년 11월 26일
이동: Angelo Yeo 2024년 11월 27일
Yes, I know this issue. It is likely a known bug which exists in the current version of the FMU Builder Support Package.
I created a fix to get unblocked until this gets fixed in a future Release of the Support package. Please create a Technical Support case so my team can send it to you.
Daniel
Daniel 2024년 11월 28일
편집: Daniel 2024년 11월 28일
Hi Oliver,
thank you for your quick reply. My colleague opend the ticket and we are already in contact by mail with you.
Your fix looks very promissing and we have internally fix our parameters and s-function for an hybrid model for linux and windows.
I will let you know as soon as we fixed that but from matlab side you can close the thread because the WSL fix you provided works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Create Standalone FMU에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by