I am getting an error when I try to build a model which includes custom code. The custom code I used is from https://community.nxp.com/thread/450048
Please find attached the error. I think it has to do with Simulink 2017b. But I am unable to solve the error.
Hello raghurajappa,
Sorry for our delayed answer.
It looks like when compiles, the mwSize variable type has not been defined, probably a file must also be included.
For this approach of custom code insertion, we also have an example here How to put S32K MCU into sleep (low power mode)? , but just take the .slx model as example, and do not copy those s32k files into your toolbox because it handles another toolbox.
Another easier way of injecting custom code into the model is to use the Custom Code blocks from the Simulink Coder (see the image attached), from the Simulink library. The System Initialize block will inject the code in the generated initialize function and the System Outputs blocks will put your code in the step function.
Hope this helps,
Marius
Hi Im trying to do a SIL implementation with the s32k144 board, Im trying to add a custom code from the hello_world example from s32 Desing Studio. My model in simulink looks likes this...
But I dont know in wich block add the code, the code that I am trying to add is the next one...
---end of code
When I click to generate code i got 10 errors, most of them are from undefined variables of the clock.