Stateflow    

Setting Up the Target Compiler

Building Simulink targets requires a C compiler that is supported by MATLAB. The Microsoft Windows version of Stateflow comes with a C compiler (lcc.exe) and a make utility (lccmake). Both tools are installed in the directory matlabroot\sys\lcc. If you do not configure MATLAB to use any other compiler, Stateflow uses lcc to build targets.

For other compilers and for all non-Windows platforms, do the following:

  1. Install the C compiler you want Stateflow to use to build targets on your system.
  1. You can use any compiler supported by MATLAB for building MATLAB extension (MEX) files. See "Building MEX-Files" in the MATLAB External Interfaces documentation for information on C compilers supported by MATLAB.

  1. At the MATLAB prompt, type mex -setup to initiate prompts for entering the appropriate information about your compiler.
  1. Stateflow uses the compiler that you specify to build MEX-files for building a Stateflow simulation target.

On Windows platforms, if you want to use a compiler that you supply to build some targets and lcc to build other targets, first set up MATLAB to use the compiler you supply. Then select the Use lcc compiler option on the Coder dialog box (see Simulation Target (sfun) Coder Options) for each target that you want to build with lcc.


  How Stateflow Builds Targets Configuring a Target