Hardware Debug for Embedded Processors - 2020.2 English

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

Document ID
UG1393
Release Date
2021-03-22
Version
2020.2 English
For hardware builds the setup involves the following steps:
  1. Copy the contents of the <project>/Hardware/sd_card/sd_card folder to a physical SD card. This creates a bootable medium for your target platform.
  2. Insert the SD card into the card reader of your embedded processor platform.
  3. Change the boot-mode settings of the platform to SD boot mode, and power up the board.
  4. After the device 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, for example:
    cd /run/media/mmcblkop1
    source init.sh
    cat /etc/xocl.txt

    The cat command will display the platform name xilinx_vck190_base_202010_1 to let you 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. You will use the IP address to set up a TCF agent connection in Vitis IDE to connect to the assigned IP address of the embedded processor platform.
  7. Create a target connection to the remote accelerator card. Use 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. In the Assistant view, right-click on the Hardware build and select Set Active to make it the active build.
  12. From the Assistant view menu, select the Debug () command, and select the Debug Configurations command. This opens the Debug Configurations dialog box to let you configure debug for the Hardware build on your specific platform.

    Set the following fields on the Main tab of the dialog box:

    Name
    Specifies a name for your Hardware debug configuration.
    Linux TCF Agent
    Selects the new agent you built with the specified IP address for the accelerator card.
    Configuration
    Ensure you have selected the Hardware configuration.
    Enable Profiling
    If you want to capture trace data from events.
    Select the Application tab in the Debug Configuration dialog box to see the following fields:

    Set the following fields on the Application tab:

    Local File Path
    Specifies where the files created on the target platform will be written back into your local disk.
    Remote File Path
    Specifies the remote mount location from the accelerator card as determined in an earlier step.
    Working directory
    Specifies the location to write files created on the target platform.
  13. Select Apply to save your changes, and Debug to start the process.

    This opens the Debug perspective in the Vitis IDE, and connects to the PS application on your hardware platform. The application automatically breaks at the main() function to let you set up and configure the debug environment.