gmake problem with rtwshared.lib using NXP MBD Toolbox for S32k

cancel
Showing results for 
Search instead for 
Did you mean: 

gmake problem with rtwshared.lib using NXP MBD Toolbox for S32k

530 Views
Contributor II

Dear community,

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.

Thank you!

6 Replies

236 Views
NXP Employee
NXP Employee

Hello nicolas.salazar@lightyear.one‌,

Could you share this model? Or a variant of it that is still not compiling? That would make it easier to see where the problem lies.

Thanks in advance!

Razvan.

0 Kudos

236 Views
Contributor II

Hi constantinrazvan.chivu‌,

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?

Thank you!

Best regards,

Nicolas S.

236 Views
NXP Employee
NXP Employee

Hi Nicolas, 

Do you have StateFlow license ?

hint: type ver in Matlab prompt.

Best regards,

Daniel

0 Kudos

236 Views
Contributor II

Hi Daniel,

I do, it's version 9.2. 

 

Best regards,

Nicolas.

0 Kudos

236 Views
NXP Employee
NXP Employee

Hello nicolas.salazar@lightyear.one‌,

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,

Razvan.

236 Views
Contributor II

Some things I have already tried and did not work:

  • Delete both the build folder (_mbd_rtw) and the slprj folder and run a clean build
  • Set Shared code placement to Auto (Code Generation -> Interface) 
0 Kudos