Getting started using the profiler on function level
Build your application using these options:
Category
Setting
C/C++ Compiler
Output>Generate debug information
Linker
Output>Include debug information in output
Table 24. Project options for enabling the profilerTo set up the profiler for function profiling:
If you use ETM trace the J-Link C-SPY driver, make sure that the Cycle accurate tracing option is selected in the ETM Trace Settings dialog box.
If you use the SWD/SWO interface or another debug probe than a J-Link, no specific settings are required.
When you have built your application and started C-SPY, choose Driver>Function Profiler to open the Function Profiler window, and click
the Enable button to turn on the profiler. Alternatively, choose Enable from the context menu that is available when you right-click in the Function Profiler window.Start executing your application to collect the profiling information.
Profiling information is displayed in the Function Profiler window. To sort, click on the relevant column header.
When you start a new sampling, you can click
the Clear button—alternatively, use the context menu—to clear the data.