error: unknown type name 'mxArray'

조회 수: 6 (최근 30일)
Aubrey
Aubrey 2024년 8월 20일
편집: Aubrey 2024년 8월 30일
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
Malay Agarwal
Malay Agarwal 2024년 8월 22일
편집: Malay Agarwal 2024년 8월 22일
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 2024년 8월 29일
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.

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

답변 (1개)

Udit06
Udit06 2024년 8월 26일
편집: Udit06 2024년 8월 26일
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
Aubrey
Aubrey 2024년 8월 29일
편집: Aubrey 2024년 8월 29일
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 2024년 8월 30일
편집: Aubrey 2024년 8월 30일
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?

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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by