C code generation of models reference for CarMaker target system issue

14 views (last 30 days)
Hello Everyone,
My environnement configuration is as following : Win10 Matlab/Simulink 2016a Simulink Coder IPG Carmaker 6.0.3
I would like to generate C code from my top Simulink model which has reference models blocks. The generated C code is dedicated to be implemented in CarMaker environment as plugin model.
After a first attempt of my top model build, I had an issue about reference model support with my STF. Then, I solved the model referencing compliance issue in my System target file by implemented a call back function.
Now, I'm struggling cause I have a new error :
"ERROR : Model reference does not support the 'RealTimeMalloc' code format" I tried to change the code format in my System Target File but anyone is working.
Could you, please, advice how to solve this issue ?
Thank you in advance for your support,

Answers (1)

Anshuman
Anshuman on 12 Dec 2024
Hello,
The error you're encountering is related to the code generation settings for model reference blocks in Simulink. The "RealTimeMalloc" code format is not supported for model references, which is likely causing the issue.
You can do this by adjusting the model configuration parameters:
  • Open the Configuration Parameters dialog in Simulink.
  • Navigate to the "Code Generation" section.
  • Check the settings under "Interface" and ensure that the code format is set to a supported format, such as "Reusable" Function or "Nonreusable" Function.
After changing the code format, you may need to update the model reference blocks:
  • Right-click on each model reference block in your top model.
  • Select "Model Reference" > "Update Model Reference".
Hope it helps!

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!