C code generation of models reference for CarMaker target system issue

7 Ansichten (letzte 30 Tage)
Ahmed GUENNOUN
Ahmed GUENNOUN am 27 Feb. 2020
Beantwortet: Anshuman am 12 Dez. 2024
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,

Antworten (1)

Anshuman
Anshuman am 12 Dez. 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!

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by