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

6 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Kaustubha Govind
Kaustubha Govind il 14 Feb 2011
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 Commento
Mark
Mark il 15 Feb 2011
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.

Accedi per commentare.

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by