using "modele reference" with RTW
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello
sorry for my not really fluent english
here is my problem :
I create a simple model with simulink "model.mdl"
"inline parameters" is true and "ModelReferenceCompliant" is on
I create a simple model "test.mdl" using "model.mdl" with block "modele reference"
boths model RTW target file are"igc.tlc" (owner target)
when I build "test.mdl" I have this error : lcc preprocessor error: model_main.c:14 Could not find include file "rtmodel.h"
when I look in "model_igc_rtw" directory (where is my generated "model_main.c") i find "rtmodel.h"
lcc is called by : "C:\PROGRA~1\MATLAB\R2009a\sys\lcc\bin\lcc -c -Fomodel_main.obj -DUSE_RTMODEL -DMODEL=model -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -DHAVESTDIO -I. -I..\..\.. -IC:\PROGRA~1\MATLAB\R2009a/simulink/include -IC:\PROGRA~1\MATLAB\R2009a/extern/include -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/src -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/libsrc -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/src/ext_mode/common -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/src/ext_mode/tcpip -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/src/ext_mode/serial -IC:\PROGRA~1\MATLAB\R2009a/rtw/c/src/ext_mode/custom -IC:\Simulateurs\sources\NantillaEsouloubre\Simulateur\test\slprj\igc\model -IC:\Simulateurs\sources\NantillaEsouloubre\Simulateur\test -IC:\PROGRA~1\MATLAB\R2009a/toolbox/dspblks/src/sim -IC:\PROGRA~1\MATLAB\R2009a/toolbox/dspblks/src/rt -IC:\PROGRA~1\MATLAB\R2009a/toolbox/commblks/commmex -IC:\PROGRA~1\MATLAB\R2009a\sys\lcc/include -I..\..\..\slprj\igc\_sharedutils -noregistrylookup model_main.c " which seems ok to me
if somebody has an idea about my problem
thanks Fabien
1 Commento
Kaustubha Govind
il 9 Feb 2011
Could you try using grt.tlc instead and see if you receive the same error? igc.tlc seems like a third-party target.
Risposte (2)
Fabien
il 10 Feb 2011
3 Commenti
Kaustubha Govind
il 10 Feb 2011
Also, delete the copied rtmodel.h from the simulink/include directory before you try grt.tlc
MarkB
il 10 Feb 2011
The compiler errors that you are getting indicate that the "rtmodel.h" file that you are using is incorrect/out-of-date. Using line 77 as an example, the compiler sees first sees "extern RT_MODEL". Because the "rtmodel.h" header file is incorrect, it does not contain the typedef for "RT_MODEL". From there, through some quirks and defaults in the specification of the C language, the compiler assumes that this actually means "extern int RT_MODEL(...)", which is the default behaviors of "this function returns an int" and "any parameters are valid". Once the compiler has made those assumptions, the "*" doesn't make sense to it.
Vedere anche
Categorie
Scopri di più su Manual Performance Optimization in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!