Debugging a Linux Application from the Vitis IDE - 2023.2 English

Zynq-7000 SoC Embedded Design Tutorial (UG1165)

Document ID
UG1165
Release Date
2024-05-02
Version
2023.2 English

Debugging Linux applications requires the Linux agent to be set up properly. Refer to Preparing the Linux Agent for Remote Connection for detailed steps.

  1. Debug the Linux application:

    • Highlight the linux_hello application, and under FLOW, select Debug icon and click Open Settings. It creates a new Launch Configuration.

    • Make sure that the Target Connection is set to the target connection created in the previous section.

    • Set the Work Directory to a valid location on your linux filesystem. A typical example is /home/petalinux, which is the destination for copying the ELF file.

    Vitis Linux Run Configurations
  • Click Run icon.

    The debug configuration has identical options to the run configuration. The difference between debugging and running is that debugging stops at the main() function.

  1. Try the debugging features:

    Hello World is a simple application. It does not contain much to debug, but you can try the following to explore the Vitis debugger:

    • Review the Debug Features on the Left Hand side of the IDE: Variables, Breakpoints, Expressions, and the rest.

    • If these are not visible, you can add these via View → Select Feature

    • Review the call stack on the left.

    • The next line to execute has a green background.

    • Debug through the code using the debug toolbar, such as Continue, Step Into, Step Out.

    Debug window

    Debug window

  2. Disconnect the connection:

    • Click the Stop button on the Debug toolbar.