MATLAB Answers

Why do I receive an error when building code for a processor-in-the-loop (PIL) cosimulation with Embedded Target for Motorola MPC555 2.0 (R14)?

5 views (last 30 days)
My model includes a noninlined S-function, for which a TLC file for the S-function is absent. When building code for a processor-in-the-loop (PIL) cosimulation using Embedded Target for Motorola MPC555 2.0 (R14), the following error is returned:
-- Building Subsystem_pil_sf.obj --
C:/matlab7/bin/win32/mex.bat -c -g -DPIL_S_FUNCTION -DS_FUNCTION_NAME#Subsystem_pil_sf -DPIL_S_FUNCTION -I. -I.. -IC:/matlab7/rtw/c/ert -IC:/matlab7/extern/include -IC:/matlab7/simulink/include -IC:/matlab7/rtw/c/src -IC:/matlab7/rtw/c/src/ext_mode/common -IC:/matlab7/toolbox/rtw/targets/common/profile/execution -IC:/matlab7/too
lbox/rtw/targets/mpc555dk/pil -IC:/matlab7/toolbox/rtw/targets/mpc555dk/pil/api/CommAPI/include -Ic:/pcmpc555/leo/matlab_rtw/pil_ss_mpc/simple -Ic:/pcmpc555/leo/matlab_rtw/pil_ss_mpc/simple/subsystem_mpc555pil -Ic:/matlab7/rtw/c/libsrcSubsystem_pil_sf.c
Error Subsystem_pil_sf.c: .\Subsystem.h: 112 invalid struct field declarations
Error Subsystem_pil_sf.c: .\Subsystem.h: 112 syntax error; found `RTWSfcnInfo' expecting `}'
Error Subsystem_pil_sf.c: .\Subsystem.h: 112 skipping `RTWSfcnInfo' `sfcnInfo'
Error Subsystem_pil_sf.c: .\Subsystem.h: 112 undefined size for field `incomplete struct defined at .\Subsystem.h 111'
Error Subsystem_pil_sf.c: .\Subsystem.h: 189 unrecognized declaration
Warning Subsystem_pil_sf.c: .\Subsystem.h: 189 empty declaration
5 errors, 1 warnings
C:\MATLAB7\\BIN\WIN32\MEX.PL: Error: Compile of 'Subsystem_pil_sf.c'
failed.
C:\matlab7\toolbox\rtw\targets\mpc555dk\bin\win32\make.exe: ***
[Subsystem_pil_sf.obj] Error 255
Error using ==> slbuild
Error using ==> RTW.makertw.make_rtw
Error using ==> rtw_c
Error(s) encountered while building model "Subsystem"

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
We have verified that there is a bug in Embedded Target for Motorola MPC555 2.0 (R14) in the way that a PIL cosimulation handles a non-inlined S-function.
To work around this issue, use inlined S-functions in your model. Information that explains how to inline an S-function is provided in the Real-Time Workshop 6.0 (R14) documentation, accessed by typing the following at the MATLAB prompt:
web([docroot '/toolbox/rtw/tlc_ref/cp_inlin.html'])

More Answers (1)

Categories

Community Treasure Hunt

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

Start Hunting!