Bare-Metal Debug from the Vitis Unified IDE - 2023.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2023-12-13
Version
2023.2 English

With the bare-metal system project built as described in Creating a Bare-metal System, you must use the following steps to debug both the AI Engine graph, together with the bare-metal PS application on the Hardware build target.

This process is a bit more complex than debugging a Linux-based System project where the PS application is built as a part of the system project. Here the PS application is built as a separate application component, and must be manually included in the launch configuration for debug. This is detailed in the following steps.

  1. Right-click on the top-level system project and select the Debug As > Debug Configurations command.

    This opens the Debug Configurations dialog box to let you set up the tool.

    Important: For the Hardware build, you will need to create two Debug configurations: one for the top-level system project, and a second for the bare-metal PS application.
  2. In the Debug Configurations dialog box select the New Launch Configuration () command to open the Debug Configurations dialog box as shown.

    Notice the following fields on the Debug Configurations dialog box:

    • Project: Reflects the name of the top-level system project which includes the AI Engine graph application, the PL kernels, and the HW-Link projects.
    • Hardware Server: Specifies a local connection to the board. You can configure this differently for a remotely connected board.
    • Linux TCF Agent: Is disabled for bare-metal systems.
    • Stop At Main and Stop At Program Entry: Enable these options to prevent the application from running before you have a chance to start debug.
  3. Select Apply to save and apply your changes, and select Close to close the dialog box.
  4. Click Debug from the Flow Navigator under the HARDWARE heading.
    Tip: The tool will prompt you to create two launch configurations if you haven't already done so. One for the top-level system project, and a second for the PS application.

    This opens the Debug view as shown in Debug View, and connects to the PS application and AI Engine graph running on their respective cores. The application automatically breaks at the main() function for all the ELF files.

From this point you can do all the debug activities: step in, step over, viewing variables, apply break points in the emulation environment. Refer to Using the Debug Environment for more information.