Borrar filtros
Borrar filtros

Function without body in generated code like 'modile_name'TID0(void)

1 visualización (últimos 30 días)
Alex
Alex el 14 de Mzo. de 2012
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?

Respuestas (2)

Kaustubha Govind
Kaustubha Govind el 14 de Mzo. de 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.

Alex
Alex el 15 de Mzo. de 2012
It seems to me I can't use SingleTasking mode in my model, because reference models communicate to each other on different freq and for concurrent configuration simulink requires MultiTasking only.
After some experimentation I was able to fix the error. For all simulink subsistems that generated problem code I change property "subsystem parameters->code generation->Function packaging" from "Function" to "Auto". This led to code generator put all changed subsystems code to one file. The problem goes ouf but seems to me it is a "crooked" way.
  1 comentario
Kaustubha Govind
Kaustubha Govind el 15 de Mzo. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Multicore Processor Targets en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by