Function without body in generated code like 'modile_name'TID0(void)
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi!
I try to generate concurrent execution multitask model for xPCTarget with several sample times. Main model include 4 reference models. One of them (Aircraft model) compiled with some errors like this: (I’m using xpctargetert.tlc target)
### Compiling FCL_Aileron.c
cl -D_MT -MT /wd4996 /fp:precise /W3 /c /nologo /O2 /Oy- -DMODEL=AC_Model -DRT -DNUMST=3 -DTID01EQ=1 -DNCSTATES=65 -DMT=1 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV=__cdecl -DUSE_RTMODEL -DERT_CORE FCL_Aileron.c
FCL_Aileron.c
FCL_Aileron.c(107) : warning C4013: 'FCL_Aileron_RollAngleHoldTID0' undefined; assuming extern returning int
FCL_Aileron.c(180) : warning C4013: 'FCL_Aileron_RollAngleHold_UpdateTID0' undefined; assuming extern returning int
### Compiling AC_Model.c
cl -D_MT -MT /wd4996 /fp:precise /W3 /c /nologo /O2 /Oy- -DMODEL=AC_Model -DRT -DNUMST=3 -DTID01EQ=1 -DNCSTATES=65 -DMT=1 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV=__cdecl -DUSE_RTMODEL -DERT_CORE AC_Model.c
AC_Model.c(4124) : warning C4013: 'FCL_AileronTID0' undefined; assuming extern returning int
In fact code generator would have be place in source code function without TID0 postfix in names. I.e 'FCL_Aileron_RollAngleHold' instead 'FCL_Aileron_RollAngleHoldTID0' and 'FCL_Aileron' instead 'FCL_AileronTID0'. Source code for 'Aileron_RollAngleHold' and 'FCL_Aileron' are generated and looks right. Question: Where does postfix “TID0” and what it mean?
0 commentaires
Réponses (2)
Kaustubha Govind
le 14 Mar 2012
This seems like it could be a bug, so I highly recommend that you report this to MathWorks Tech Support.
My suspicion is that your model is using multi-tasking execution, which means that there are several tasks generated, each with a specific TID. TID0 is usually the one that runs at the base rate of the model. You could try forcing your Tasking mode for periodic sample times setting under the 'Configuration Parameters > Solver' pane to 'SingleTasking' (or 'MultiTasking' if 'SingleTasking' doesn't work) and see if that fixes the issue.
0 commentaires
Alex
le 15 Mar 2012
1 commentaire
Kaustubha Govind
le 15 Mar 2012
Alexey: Thanks for posting back your solution! Meanwhile, please do report this to Tech Support if you have time to narrow down the reproduction steps to send them a sample model.
Voir également
Catégories
En savoir plus sur Multicore Processor Targets dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!