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

8 次查看(过去 30 天)
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?

回答(1 个)

Mark McBroom
Mark McBroom 2023-11-18
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 个评论
Dana Schwanke
Dana Schwanke 2023-11-21
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by