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

8 visualizaciones (últimos 30 días)
Dana Schwanke
Dana Schwanke el 13 de Nov. de 2023
Comentada: Dana Schwanke el 21 de Nov. de 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?

Respuestas (1)

Mark McBroom
Mark McBroom el 18 de Nov. de 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 comentario
Dana Schwanke
Dana Schwanke el 21 de Nov. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by