Unable to create an FMU from model referencing protected model
I am unable to create an FMU when using a .slxp file containing obfuscated code for generation. This is a convenient format for sharing models when we need to hide details / protect IP. When the .slxp is created by one user and used by another user - we see the following error.
Configuration component 'Code Generation/Target' of model 'Test_Client' and configuration
component 'Code Generation/Target' of model 'Test_Original' are not compatible.
The error message returned by the comparison function is:
When comparing the fields of two configuration components of the type
'STFCustomTargetCC', each of the fields being compared must have the same data type.
The data type of the field 'FMIVersion' in the first component is
'RTWOptions_EnumType_W__Sandbox_FMU_Test_FMIKit-Simulink-28_grtfmi_grtfmi_1FMIVersion'
and the data type of the field 'FMIVersion' in the second component is
'RTWOptions_EnumType_C__Users_DEVEL_Downloads_FMIKit-Simulink-master_FMIKit-Simulink-master_grtfmi_grtfmi_1FMIVersion'
It appears that the "FMIVersion" variable is being generate from the path where the FMIkit library is stored. Is this is a .slxp and FMIkit specific issue (or) something fundamental as the Simulink code generation process. I tried looking at the configuration setting and the grtfmi.tlc file - but in all cases FMIVersion was explicitly set to 2. Not sure why this issue is seen.
Edit: Tested with FMIkit 2.8 and 3.0-alpha.2 and was able to reproduce the issue.
Does the export work with grt.tlc if you reference the protected model?
@t-sommer - Apologies for the delay in my response. I have created test models for reproducing build issues with .slxp and grtfmi.tlc. To your previous question - yes - the build seems to work with grt.tlc. The resulting executable outputs results. However, when I use the steps to build using grtfmi.tlc - the build fails. However, the error is different from when the models are created on a machine other than the build machine (see my original post).
I am having trouble upload zip files with .slx (perhaps being filtered by our firewall?) - so I have included simple steps using which you can recreate the models at your end. It takes less than 5 minutes to create these models. Note that steps in page 1 are for grt.tlc and those in page 2 are for grtfmi.tlc. Also, attached is the final build error log when I build model with grtfmi.tlc that contains a .slxp reference model.
Let me if you are unable to create the reproduction models - I will try find other means to send the files over to you.