フィルターのクリア

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 Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by