Skip to main content

IAR Embedded Workbench for RX 5.20

Getting started using the profiler on function level

In this section:
To display function profiling information in the Function Profiler window:
  1. Build your application using these options:

    Category

    Setting

    C/C++ Compiler

    Output>Generate debug information

    Linker

    Output>Include debug information in output

    Table 25. Project options for enabling the profiler 


  2. To set up the profiler for function profiling:

    • If you use an E20 emulator and want to use another profiling source than PC sampling, you must choose E1/E20 Emulator>Hardware Setup and choose Trace as the Emulator mode.

    • If you use the C-SPY simulator, an E1, E2, E2 Lite, or EZ-CUBE2 emulator or a J-Link debug probe, no specific settings are required.

  3. When you have built your application and started C-SPY, choose Driver>Function Profiler to open the Function Profiler window, and click activateButton.pngthe 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.

  4. Start executing your application to collect the profiling information.

  5. Profiling information is displayed in the Function Profiler window. To sort, click on the relevant column header.

  6. When you start a new sampling, you can click MEASURButton.pngthe Clear button—alternatively, use the context menu—to clear the data.