Setting Up the Software Application - 2022.2 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2023-01-02
Version
2022.2 English
  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 */
            XIntc_mMasterEnable(SYSINTC_BASEADDR);
            /* service all interrupts */
            XIntc_SetIntrSvcOption(SYSINTC_BASEADDR, XIN_SVC_ALL_ISRS_OPTION);
            /* enable the profile timer interrupt */
            XIntc_mEnableIntr(SYSINTC_BASEADDR, PROFILE_TIMER_INTR_MASK);
            /* enable interrupts in the processor */
            microblaze_enable_interrupts();
  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.