I have custom code integrated into an s-function builder block that builds and links correctly for both normal simulation and for a S32K144 target application with the MBD Toolset. However, when building the block using a model reference for PIL simulation I encounter a makefile rule error in the build process.
I can successfully build and link an application for PIL simulation that does not contain any s-function blocks, and I can successfully build and link (as the attached model c_function_example_sfun_build.slx demonstrates) an application directly targeted to the S32K144 that contains the same s-function builder block.
I've recreated the error with one of Mathworks' example c code s-function builder blocks (attached below), and I've worked with Mathworks' technical support. Their conclusion is that it seems to be a bug in the MBD Toolbox and not in the underlying Mathworks tools.
c_function_example_sfun_build.slx is directly targeted at the S32K144 and builds and links properly, c_function_example_sfun_build_PIL.slx will reproduce the error, in this example:
"gmake: *** No rule to make target `euler2dc_wrapper.o', needed by `c_function_example_PIL_rtwlib.lib'. Stop."
Using the PIL simulation capability would be incredibly valuable to develop and debug the s-function wrapped custom code I am trying to integrate into my project and this is a blocker.
Prompt support is both needed and appreciated.
Thanks,
Eric Rost