필터 지우기
필터 지우기

irt.tlc compiling error

조회 수: 13 (최근 30일)
Giuseppe
Giuseppe 2022년 3월 7일
댓글: jitong 2024년 4월 17일
I'm tryng to compile a simulink module with irt.tlc but I get this error: "Error: File: C:\Program Files\MATLAB\R2020a\rtw\c\tlc\mw\asap2main.tlc Line: 78 Column: 34 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix". The model is just about two inputs, a sum and one output. Any idea?
  댓글 수: 2
Benjamin Thompson
Benjamin Thompson 2022년 3월 7일
Can you post the model and the TLC file, and anything else required to compile it with Simulink Coder?
Giuseppe
Giuseppe 2022년 3월 7일
I changed the extension of .tlc in .txt

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

답변 (1개)

Kausthub
Kausthub 2024년 1월 23일
Hi Giuseppe,
I understand that you are facing errors while compiling a Simulink model with “irt.tlc” as the System Target File. The error that you have mentioned occurs when you are trying to index something which is not symbol, vector or matrix.
The function “ASAP2UserFcnASAP2Version” returns a vector of size two with information regarding the version number and upgrade number. But in your case the function is not returning a vector because the function is not recognised, and it is returning 0 instead.
%assign asap2Version = ASAP2UserFcnASAP2Version() // returns 0 & not a vector
And while trying to index “asap2Version”, it is leading to the above-mentioned compiler error.
%assign VersionNo = asap2Version[0] // Line: 78 Column: 34
%assign UpgradeNo = asap2Version[1]
The function “ASAP2UserFcnASAP2Version” is defined at “matlab/toolbox/rtw/targets/asap2/asap2/user/asap2userlib.tlc” and I believe that this file has not been included during compilation using the ”irt.tlc” System Target File.
As a solution you should include the “asap2uerlib.tlc” file in your TLC file or you could probably contact the author for “irt.tlc” (it looks like a third-party target and not from MathWorks).
Hope it helps!
  댓글 수: 1
jitong
jitong 2024년 4월 17일
hello Kausthub! i think i have the similar problem ! can u pls help me look in it? thank you!!!
Error: File: D:\Matlab\toolbox\rtw\targets\xpc\target\build\xpcblocks\tlc_c\scblock.tlc Line: 133 Column: 47 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix

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

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by