I want to use Simulink mdl to automatically create C files. I'm currently trying to use the m-script and dos command line, but I'm having problems with the "you want to save" dialog that hangs in m-script. From experiments I know that mdl changes when the "set_param" line is executed (ie there is no problem with "saving" when deleting the set_param call), but I need to do some mdl configuration before generating the code.
m- script:
rtwdemo_counter
set_param(gcs,'SystemTargetFile','ert.tlc')
rtwbuild(gcs)
exit
dos
matlab -r samplebuild -nosplash -nodesktop
Matlab 7.7.0.471 on Windows XP
My ultimate goal is to automatically generate code on a continuous integration server (CruiseControl), and I believe there should be a more reliable way to achieve this with the matlab toolchain.