필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Alex
Alex 2012년 3월 14일
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?

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2012년 3월 14일
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 2012년 3월 15일
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
Kaustubha Govind
Kaustubha Govind 2012년 3월 15일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by