Code covered by the BSD License  

Highlights from
Real-Time Workshop Targeting Tips and Scripts

from Real-Time Workshop Targeting Tips and Scripts by Tom Erkkinen
Has best practices and scripts to configure embedded code generation for any production target.

config_ert_project(modelName)
function config_ert_project(modelName)
% config_ert_project- Configuration project file that loads and configures
% a model for ERT code generation. This script assumes that ERT is used.
%
%   Copyright 1984-2002 The MathWorks, Inc. 
%   $Revision: 1.5 $  $Date: 2002/06/07 21:45:07 $

  disp(' ');
  disp(['Opening ', modelName,' model.']);
  
  try
    open_system(modelName);
  catch
    error(['Unable to access model: ', modelName]);
  end
   
  disp(' ');
  disp(['Configuring ', modelName,' for codegen.']);
  disp(' ');
  stf = deblank(get_param(modelName, 'RTWSystemTargetFile'));
  if strmatch('ert', stf)
        ConfigurationDefault(modelName);
        disp('...');
        disp(' ');
        disp(['Configured ', modelName,' using default ERT project codegen settings.']);
        disp(' ');
    else
      ConfigurationDefault(modelName);
      disp('...');
      disp(' ');
      disp(['Configured ', modelName,' using default ERT project codegen settings.']);
      disp(' ');
      disp('You are not using the standard ert.tlc target, so unsupported');
      disp('ERT configuration parameter warnings may have been generated.');
      disp(' ');
  end

Contact us at files@mathworks.com