Include of custom code in generated

2 visualizzazioni (ultimi 30 giorni)
sanad al-areqi
sanad al-areqi il 6 Ago 2020
Commentato: Fangjun Jiang il 7 Ago 2020
It is about including a custom code in the generated code using the Custom Code pane in the Model Configuration Parameters. As far as I know, the custom code will be inserted at the TOP of the header and source files generated for a model. In my case, the custom code must however be inserted at the BOTTOM since the custom code itself uses data types that are defined somewhere in the generated files.
Therefore, is there any way to force the inculsion to be done at the bottom rather than top of the generated?

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 6 Ago 2020
Modificato: Fangjun Jiang il 6 Ago 2020
  2 Commenti
sanad al-areqi
sanad al-areqi il 7 Ago 2020
Thank you Fangjun for your prompt reply :-)
In fact, I have already tested these blocks in my model and the folowing error message occurs during the code generation process using the "grt.tlc" system target file:
"this type of block is not allowed for the C++ encapsulation interface feature"
That was the reason why I went back to the Custom Code pane in the Model Configuration Parameters with the hope to resolve this issue.

Accedi per commentare.

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by