Post Code Gen Script: What is "codertarg​et.postCod​eGenHookCo​mmand(h)"?

8 vues (au cours des 30 derniers jours)
Dana Schwanke
Dana Schwanke le 13 Nov 2023
Commenté : Dana Schwanke le 21 Nov 2023
This should be a simple enough question. In our Code Generation settings, the Advanced Parameter "Post code generation command" has a default value of "codertarget.postCodeGenHookCommand(h)".
And, most importantly,
  • Is there a script I can have run that gets the BuildInfo of a built model even if Simulink determines it is up to date so that I can execute a custom script at the end of a build even if every single item is completely up to date?

Réponses (1)

Mark McBroom
Mark McBroom le 18 Nov 2023
The post code generation command is a MATLAB function with one argument "h", which is BuildInfo. By default for Simulink Coder and Embedded Coder, this option is empty. It looks like you are using a custom target that is performing some actions at the end of code generation. You should be able to edit this file and set break points in the file to better understand it.
  1 commentaire
Dana Schwanke
Dana Schwanke le 21 Nov 2023
We originally had a custom target whose deployer had the AfterCodeGenFcn value set, but we have since removed this. Is that what "codertarget.postCodeGenHookCommand(h)" calls? I cannot find any online documentation for the built-in MATLAB object/package "codertarget", and all that typing "help codertarget" into MATLAB does is let me know that "codertarget" is a package and "postCodeGenHookCommand" is a function. It doesn't tell me what the expected parameter type is or what external code it is calling. Further, what is "h"? I'm not even sure what context the "h" is visible from, let alone its object type.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by