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
0 件のコメント
回答 (1 件)
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
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!