irt.tlc compiling error
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Benjamin Thompson
el 7 de Mzo. de 2022
Can you post the model and the TLC file, and anything else required to compile it with Simulink Coder?
Respuestas (1)
Kausthub
el 23 de En. de 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 comentario
jitong
el 17 de Abr. de 2024
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
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!