irt.tlc compiling error
조회 수: 13 (최근 30일)
이전 댓글 표시
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
2022년 3월 7일
Can you post the model and the TLC file, and anything else required to compile it with Simulink Coder?
답변 (1개)
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
2024년 4월 17일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!