Clear Filters
Clear Filters

irt.tlc compiling error

13 views (last 30 days)
Giuseppe
Giuseppe on 7 Mar 2022
Commented: jitong on 17 Apr 2024
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 Comments
Benjamin Thompson
Benjamin Thompson on 7 Mar 2022
Can you post the model and the TLC file, and anything else required to compile it with Simulink Coder?
Giuseppe
Giuseppe on 7 Mar 2022
I changed the extension of .tlc in .txt

Sign in to comment.

Answers (1)

Kausthub
Kausthub on 23 Jan 2024
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 Comment
jitong
jitong on 17 Apr 2024
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

Sign in to comment.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!