I'm using NXP Model Based Design Toolbox for S32K to generate code from a model that contains Stateflow charts, Simulink functions, Matlab functions, and CAN blocks from the Vehicle Network Toolbox.
When building the model, the code is generated but the executable file is not created because gmake cannot find a rule to make target '\_sharedutils\rtwshared.lib', which is needed by my model's .elf file.
My guess is that there may be some limitation in NXP's mbd_s32k14.tmf or mbd_s32k14.tlc files for building the code generated from certain Simulink blocks. If this is the case, can you explain in detail what are NXP's Toolbox limitations?
I greatly appreciate any lead on solving this error.
Thanks for replying. I built the model again with a modified logic that does not use Stateflow Messages and the error is no longer present. Apparently, Stateflow Messages force the creation of the rtwshared.lib file that the s32k makefile cannot handle.
Is this something you are familiar with?
For future reference, is it possible to have a list of known incompatible blocks/libraries that may cause errors when building models using NXP's MBD toolbox?
You can go past that error if you change the code generation options from the Chart / other blocks (right click on block -> Block parameters Subsystem -> Code generation tab -> change from Auto to inline or non/reusable function, depending on how the code is generated). This error is probably due to the fact that the code generated for your stateflow is using unresolved references; in this case the Auto option is actually inlining the code into a file that does not know about some definitions of variables used for your stataflow. If this is the case, try changing the code generation function packaging option to nonreusable or reusable function and this should fix it.
Hope this helps,
Some things I have already tried and did not work: