Before running a software-in-the-loop (SIL) or processor-in-the-loop (PIL) execution, enable execution time profiling:
To open the MATLAB® Coder™ app, on the MATLAB Toolstrip Apps tab, under Code Generation, click the app icon.
To open your project, click and then click
existing project. Select the project.
On the Generate Code page, click Verify Code.
Select the Enable entry point execution profiling for SIL/PIL check box.
If you also want to generate execution time profiles for functions that are called within entry-point functions, select the Enable function execution profiling check box.
Function profiling does not support the OpenMP library. Before you
generate code, on the Generate Code page, click
the arrow next to Generate. Then, click
More Settings. Under
Advanced, set Enable OpenMP
library if possible to
On a Mac operating system, SIL and PIL execution does not support execution-time profiling for functions that are called within entry-point functions.
Or, from the Command Window, specify properties of your
coder.EmbeddedCodeConfig object. For
% Enable entry point execution profiling config.CodeExecutionProfiling = true; % Enable function execution profiling config.CodeProfilingInstrumentation = true; % Disable OpenMP config.EnableOpenMP = false;