The Vitis software platfrom supports collection and analysis of trace events generated by FreeRTOS based applications. Zynq UltraScale+ MPSoC processors support the Software Trace Macrocell (STM) block which is a software application driven trace source to generate a software instrumentation trace (SWIT). To collect FreeRTOS events and analyze them, do the following:
- Click . The New Application Project wizard appears.
- Type a project name into the Project Name field.
- Select the location for the project. You can use the default location as displayed in the Location field by leaving the Use default location check box selected. Otherwise, click the check box and type or browse to the directory location.
- In platform selection view, select Create a new platform from hardware (XSA) and choose zcu102 design. Click Next to proceed.
- Choose CPU and OS as freertos10_xilinx. Note: The FreeRTOS version might vary in upcoming releases.
- Click Next to advance to
the Templates page.
The Vitis software platform provides useful sample applications listed in the Templates page that you can use to create your project. The Description box displays a brief description of the selected sample application. When you use a sample application for your project, the Vitis software platform creates the required source and header files and linker script.
- Select the desired template. If you want to create a blank project, select Empty Application. You can add C files to the project after the project is created.
- Click the Navigate to BSP settings option in application project settings page. Select and change the value of enable_stm_event_trace to TRUE.
- Right-click on the application and select .
- In the Debug Configurations page, double-click Single Application Debug to create a launch configuration for the selected project.
- Click Debug. Debugging begins with the processors in the running state.
- Debug the project using the system debugger on the required target.
- Wait for project to be downloaded on to board and stop at main().
- Click Show View page appears. . The
- Select Trace Session Manager from the Show View page. The launch configuration related to the application being debugged can be seen in the Trace Session Manager view.
- Click the start button in the Trace Session Manager view toolbar to start the FreeRTOS trace collection.
- Switch to the Debug view and resume the project.
- Allow the project to run.
- Switch back to the Trace Session Manager view and stop the trace collection. All the trace data collected will be exported to suitable trace file and will be opened in Events editor and the FreeRTOS Analysis view.