Code Generation for Model Reference containing noninlined S-Function
Mostrar comentarios más antiguos
I have a Simulink model that contains a hand written level 2 C S-Function (for which I have an associated mex file).
This model is included as a model reference in a top level model.
I can generate code at the sub model level containing the S-Function.
When I attempt to generate code at the top model level, I receive an error as below where it attempts to load an empty string as a file, but I cannot see where this empty string is coming from or if I can set it somewhere.
Is it possible to generate code at the top level without inlining the s-function?
Note that the simulation executes from the top level correctly, I just cannot build.
Error using loadTMF
File I/O error on file ''
Operation that caused an error: open
The error that occurred was:
Cannot open file. Existence? Permissions? Memory? . . .
Error in rtwprivate (line 16)
[varargout{1:nargout}] = feval(function_name, varargin{1:end});
Error in coder.internal.processSFunctions
Error in coder.internal.processSFunctions
Error in coder.internal.processSFunctions
Error in coder.internal.ModelBuilder/locNewCodePostCodeGen (line 1616)
coder.internal.processSFunctions( h.ModelName, ...
Error in coder.internal.ModelBuilder/buildProcedure (line 694)
[lCodeGenerationId, rpt_generated_flag] = obj.locNewCodePostCodeGen...
Error in coder.internal.ModelBuilder/make_rtw (line 176)
buildResult = buildProcedure(obj, h, modelName, cs, isSimBuild, lReportInfo);
Error in coder.internal.ModelCodegenMgr/make_rtw (line 8)
buildResult = obj.make_rtw(varargin);
Error in make_rtw (line 18)
buildResult = h.make_rtw(varargin{:});
Error in build_target
Error in build_target
Error in build_model_reference_target
Error in update_model_reference_targets
Error in update_model_reference_targets
Error in update_model_reference_targets
Error in update_model_reference_targets
Error in update_model_reference_targets
Error in build_standalone_rtw_target
Error in slbuild_private
Error in slbuild_private
Error in sl (line 15)
[varargout{1:nargout}]=feval(varargin{:});
Error in slbuild (line 61)
sl('slbuild_private', mdl, varargin{:});
Error in build (line 26)
slbuild('Tata_LPO_1512TC', 'StandaloneRTWTarget','ForceTopModelBuild',true);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!