Post Code Gen Script: What is "codertarget.postCodeGenHookCommand(h)"?
18 views (last 30 days)
Show older comments
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)".
- What is that script?
- What is it calling?
- Can I modify it?
- Is it supposed to call a script that I have linked somewhere else in the project?
- How does it interact with the STF_make_rtw_hook.m file or the AfterCodeGenFcn property of the matlabshared.targetsdk.Deployer class for a custom target, both of which run after every model in the system target gets built?
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?
0 Comments
Answers (1)
Mark McBroom
on 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.
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!