Filter löschen
Filter löschen

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

12 Ansichten (letzte 30 Tage)
Dana Schwanke
Dana Schwanke am 13 Nov. 2023
Kommentiert: Dana Schwanke am 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?

Antworten (1)

Mark McBroom
Mark McBroom am 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 Kommentar
Dana Schwanke
Dana Schwanke am 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by