Visible to Intel only — GUID: iga1464371400068
Ixiasoft
Visible to Intel only — GUID: iga1464371400068
Ixiasoft
4.4.4.8.4. Performance Counter Example with Nios® II SBT for Eclipse
This section describes how to create and run the profiler_performance_counter software example with the Nios® II SBT for Eclipse.
- Start the Nios® II SBT for Eclipse.
- Under File menu, point to New, and click Nios® II Application and BSP from template.
- Set Platform Designer Information File name by browsing to the <project_directory> directory and selecting the .sopcinfo.
- Give your project a name, for example profiler_performance_counter.
- Under Templates, select Blank Project.
- Click Finish to create your new project.
- Locate the <profiler_software_examples> /eclipse_source_files/profiler_performance_counter folder, and copy all the files in this directory. In Nios® II SBT for Eclipse, right click on profiler_gnu in Project Explorer view and select Paste.
- Right click your project in the Project Explorer view, point to Nios® II and click BSP Editor.
- In the Nios® II BSP Editor, turn on hal.enable_gprof to enable the GNU profiler in your project.
- Set the hal.sys_clk_timer to the peripheral_subsystem_sys_clk_timer component.
- Set hal.timestamp_timer to the peripheral_subsystem_high_res_timer component.
- Generate your BSP project and exit.
- Right click your project in the Project Explorer view, point to Build Project.
- To run the profiler_performance_counter software, right click your application project, point to Run As and click Nios® II Hardware.
The figure below shows the Nios® II Console output after running profiler_performance_counter. The data are similar to the command-line example in unresolvable-reference.html#iga1464371381525__fig_zt3_bc3_fw. For more information, refer to “Analyzing the Performance Counter Report”.
