Setting Up the Software Application

  1. Modify the software application code to enable interrupts. If there is an interrupt controller present in the system with multiple interrupt sources, you must enable interrupts in the processor and the interrupt controller to allow interrupts from the profile timer to reach the processor. Example code is shown below:
    /* enable interrupt controller */
            /* service all interrupts */
            /* enable the profile timer interrupt */
            /* enable interrupts in the processor */
  2. If the profiling timer is the only entity that connects to the input of interrupt controller or directly to the processor, the tool sets up the interrupt for you automatically, and no change is required in the application code.
  3. Right-click the software application and select C/C++ Settings (or Properties > C/C++ Build > Settings).
  4. Select gcc compiler > Profiling and enable profiling by selecting Enable Profiling (-pg).
  5. Click OK.