error: unknown type name 'mxArray'

13 visualizzazioni (ultimi 30 giorni)
Aubrey
Aubrey il 20 Ago 2024
Modificato: Aubrey il 30 Ago 2024
I added non-inlined s-functions to a simulink model, built the code, and am now trying to generate a2l file.
I am running into these errors. In what file do I define the type names and how do I define them?
Thanks,
simstruc.h:: error: unknown type name 'mxArray'
simstruc.h:: error: unknown type name 'mxArray'
simstruc.h:: error: unknown type name '_ResolveVarFcn'
error: unknown type name '_ssFcnCallExecArgInfo'
simstruc.h:: error: unknown type name '_ssFcnCallExecArgInfo'
error: unknown type name '_ssFcnCallExecArgs'
imstruc.h: error: unknown type name 'SSSimulinkFunctionPtr'
  2 Commenti
Malay Agarwal
Malay Agarwal il 22 Ago 2024
Modificato: Malay Agarwal il 22 Ago 2024
Could you please share the Simulink model so that I can reproduce the issue? Please also share the steps you took to build the code and to generate the A2L file.
Aubrey
Aubrey il 29 Ago 2024
I am unable to share the model due to confidentiality. The A2L file is generated using a custom software. I built the code using Simulink control b.

Accedi per commentare.

Risposte (1)

Udit06
Udit06 il 26 Ago 2024
Modificato: Udit06 il 26 Ago 2024
Hi Aubrey,
You can refer to the following MATLAB answer which handles a similar issue:
The above answer suggests the following two approaches to resolve the issue:
  • Define the compile and link switches in your IDE based on the output of the Verbose build. You can refer to the following MathWorks documentation for more details related to the Verbose build:
  • The other suggestion was to inline the s function by wrapping it. You can refer to the following MathWorks documentation to understand more about wrapper S-functions.
You can get the R2017b release specific documentations using the following command on your MATLAB command window:
>> doc('Wrap User Code with TLC')
>> doc('Verbose build')
I hope this helps.
  2 Commenti
Aubrey
Aubrey il 29 Ago 2024
Modificato: Aubrey il 29 Ago 2024
Is there any sort of further training available or examples for generating a TLC file? The documentation has not helped to write the .tlc file. I would like to inline noninlined s-functions if possible.
Aubrey
Aubrey il 30 Ago 2024
Modificato: Aubrey il 30 Ago 2024
Ok I found access to the tutorials in a different location.
I am primarily looking for information on how to generate the .TLC file as described here. https://www.mathworks.com/help/rtw/tlc/wrapping-user-code-with-tlc.html
I have a sfunction (X) with files X.c, X.h, X.mex. These were created using Simulink subsystem, right click, C, Generate S function.
In the example, there are two c files referenced, my_alg.c and wrapsfcn.c, no header. Is my S function X equivalent to wrapsfcn.c and wrapsfcn.mex, or do I need to copy my X.c to change_wrapsfcn.tlc as shown in the example?
Basically, is change_wrapsfcn.tlc a generic template where I need to add my C code from X.c to create the X.tlc? If not, where do I start for my .tlc file with X.c, X.h, and X.mex?

Accedi per commentare.

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by