How do I have RTW EC run a batch file directly after code generation?

4 次查看(过去 30 天)
Please help me understand how I can have RTW run a .m and/or windows batch file directly after the code is generated. I want to automate moving the generated code files and performing post-processing. I am using the ert.tlc

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2011-2-14
You can achieve this sort of thing for your own custom target using the 'after_tlc' hook of the STF_make_rtw hook file. For ert.tlc, this file is located at $matlabroot/toolbox/rtw/targets/ecoder/ert_make_rtw_hook.m, but it is not advisable to modify this, since it applies to every model that uses ert.tlc, and you lose your changes when you upgrade MATLAB. The best thing to do is to create a dummy custom target that inherits from ert.tlc with the hook file customized.
  1 个评论
Mark
Mark 2011-2-15
If you are planning on moving the generated code *before* compiling it, you will probably also need to modify your template makefile (".tmf") file as well. That may include paths that are no longer correct once you move the files.

请先登录,再进行评论。

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by