Hardware Debug from the Vitis IDE - 2020.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2020-11-24
Version
2020.2 English
With the top-level system project built, you must use the following steps to debug the application in the Hardware build target.
  1. Burn <project>/Hardware/package/sd_card.img to a physical SD card. This creates a boot-able medium for your target platform.
  2. Insert the SD card into the card reader of the VCK190 evaluation kit.
  3. Change the boot-mode settings of the card to SD boot mode, and power up the board.
  4. After the VCK190 is booted, enter the mount command at the command prompt to get a list of mount points. As shown in the following figure, the mount command displays mounting information for the system.
    Tip: Be sure to capture the proper path for the cd command in the next step, and subsequent commands, based on the results of the mount command.


  5. Execute the following commands:
    cd /mnt/mmcblk0p1
    source init.sh
    cat /etc/xocl.txt

    The cat command will display the platform name xilinx_vck190_base_202020_1. You can confirm it is the same as your specified platform and that your setup is correct.

  6. Run ifconfig to get the IP address of the target card. The IP address is used to set up a TCF agent connection in Vitis IDE. The target needs to connect to the network assigned IP address.
  7. Create a target connection to the remote accelerator card. Select the Window > Show view > Xilinx > Target connections command to open the Target Connections view.
  8. In the Target Connections view, right-click on the Linux TCF Agent and select the New Target command to open the New Target Connection dialog box.
  9. Specify the Target Name, enable the Set as default target check box, and specify the Host IP address of the accelerator card that you obtained in an earlier step.

  10. Click OK to close the dialog box and continue.
  11. 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. For the Hardware builds, you will need to create two launch configurations: one for the top-level system project, and a second for the PS application.

  12. In the Debug Configurations dialog box select the New Launch Configuration () command to open the Debug Configurations dialog box as shown.

    Be sure to set the following fields on the dialog box as shown in the preceding figure.

    • Remote Working Directory: Specify the remote mount location from the accelerator card as determined in an earlier step.
    • Linux TCF Agent: Select the new agent you built with the specified IP address for the accelerator card.
    • Disable build before launch: This is necessary because without this step, the tool will try to build your system before running the application.
  13. Select Apply to apply your changes and select Debug to start the process.

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

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