Target Platform

In the Vitis unified software platform, the application running environment is referred to as the target platform. A target platform is a combination of hardware components (XSA) and software components (domains, boot components like FSBL or PLM, and so on).

A platform project is a customizable target platform in a workspace. You can add, modify, or remove domains. You can also enable, disable, and modify boot components. A domain is referred as a BSP or an OS, which targets one processor or a cluster of isomorphism processors (for example, a 4x Cortex®-A53cluster with SMP Linux). A platform can contain unlimited domains.

This section explains how to create a hardware design, and how to use that hardware design to create an application platform.

Creating a Hardware Design (XSA File)

Xilinx hardware designs are created with the Vivado® Design Suite, and can be exported in the Xilinx Support Archive (XSA) proprietary file format that can be then used by the Vitis software platform. For information on how to create an embedded design in Vivado and generate the XSA file, see the following embedded design tutorials:

  • Zynq-7000 SoC: Embedded Design Tutorial (UG1165)
  • Zynq UltraScale+ MPSoC: Embedded Design Tutorial (UG1209)
  • Xilinx Embedded Design Tutorials: Versal Adaptive Compute Acceleration Platform (UG1305)
The generic steps are as follows:
  1. Create a Vivado project.
  2. Create a block design.
  3. Generate the image or bitstream.
  4. Export the hardware using File > Export > Export Hardware, and then select the Fixed Platform option.

Creating a Platform Project from XSA

To create a new platform project in the Vitis integrated design environment (IDE), follow these steps:

  1. Launch the New Platform Project wizard using any one of the following methods:
    1. Go to File > New > Platform Project.
    2. Click File > New > Other to open the New Project wizard. Then select Xilinx > Platform Project.
  2. Provide a project name in the Project name field and click Next.
  3. In the Platform Project wizard, choose Create from hardware specification (XSA) and either select one of the provided XSAs for the evaluation boards, or browse to select the XSA exported from Vivado® Design Suite.
  4. Select the operating system and processor to create the initial domain for the platform project.
  5. For platforms based on Zynq-7000 SoC and Zynq UltraScale+ MPSoC devices, select the option to generate the boot components as part of the platform design.

  6. Click Finish to generate the platform project.

  7. Build the project to generate the platform. The Console view shows the status of the platform generation.
  8. Confirm the platform has been added to the platform repository. Click Xilinx > Platforms.

Customizing a Pre-Built Platform

A pre-built platform is not editable when it is not in the workspace. To customize a pre-built platform, use the following flow.
  1. Launch the New Platform Project wizard using any one of the following methods:
    1. Go to File > New > Platform Project.
    2. Click File > New > Other to open the New Project wizard. Then select Xilinx > Platform Project, and click Next.

    The New Platform Project wizard appears.

  2. Provide a project name in the Project name field.
  3. Click Next.
  4. In the Platform Project page, select Create from existing platform. Select the desired platform and click Finish to create the new platform project in the workspace.
  5. You can now modify the new platform in the workspace as any other platform.

Configuring a Domain

There are different kinds of domains, the standalone domain being the most frequently used. Each domain has an associated BSP which can be configured extensively. Additionally, the domain overview page includes extra settings for the domain.

Domain Overview Page

Standalone and FreeRTOS Domain

The standalone and FreeRTOS domain overview pages are identical and provide a small number of configuration options relating to the QEMU emulation platform that are auto populated with pre-defined installation files.

Figure 1: Standalone Domain Overview Page

Linux Domain

The Linux domain overview page is similar to the standalone page, but includes more configuration options.

Figure 2: Linux Domain Overview Page
BIF File
Boot Image Format file.
Generate Bif
Generates the BIF file suitable for the platform project.
Boot Components Directory
Directory containing any files referenced in the BIF file.
Linux Image Directory
Directory containing the Linux image. This is copied to the platform export directory for further reference, but will not be used by the Vitis tool directly.
Linux Rootfs
RootFS file in EXT4 format. This is copied to the platform export directory and used for creating the EXT4 SD card directory.
Sysroot Directory
The sysroot directory that contains the libraries and header files of the target system for application development. This is copied to the platform export directory.

Board Support Package Settings Page

The Board Support Package Settings page includes several configuration pages, and is only applicable for non-Linux domains.

Using the Overview section, you can select which of the supported libraries are to be enabled in the domain/BSP.

Note: You cannot change the OS choice in this page because the OS type is determined during software platform creation.
Figure 3: Overview

The OS settings section enables you to configure the parameters of the OS.

Figure 4: OS Parameter Configuration

The library settings page enables you to configure the parameters of each library enabled in the Overview page.

Figure 5: Library Configuration

The drivers section lists all the device drivers assigned for each peripheral in your system. You can select each peripheral and change its default device driver assignment and its version. If you want to remove a driver for a peripheral, assign the driver to none.

Figure 6: Drivers

The build settings section lists the toolchain selected to build the BSP as well as some extra configuration settings.

Figure 7: Build Settings Page

Switching FSBL Targeting Processor

You can select the target processor for FSBL when creating the platform. After creating the platform, you can re-target it to another processor on a Zynq UltraScale+ MPSoC device. To re-target the platform to Cortex-R5F, follow the steps below.
  1. Double click platform.spr.
  2. Select psu_cortexa53_0 > zynqmp_fsbl.
  3. Click Re-target to psu_cortexr5_0.
  4. Click on the hammer button to build the platform.

Modifying Source Code for FSBL and PMU Firmware

When boot component generation is selected in the platform generation phase, FSBL and PMU firmware applications are created within the platform project. To modify the source code of these applications, follow the steps below.
  1. To modify the source code for FSBL or PMU firmware, go to Explorer view and expand the corresponding platform.
  2. Expand the boot domain folder and modify the source files inside.
  3. Save your changes and click the button to build the boot components with the new changes.
    Note: To reset domain/BSP sources anytime, click the Reset BSP Sources option on the Board Support Package overview page.
    Note: An alternative way to update the FSBL and PMUFW source code is to follow the instructions in Modifying the Domain Sources (Driver and Library Code).

Modifying the Domain Sources (Driver and Library Code)

To add/modify the domain sources (driver and library code) using the Vitis™ software platform, you must create your own repository with all the required files including the .mld/.mdd files and the source files. The installed driver and library code are located in the <Vitis_Install_Dir>/data/embeddedsw directory. A driver or library code component includes source files in the src directory and metadata in data directory. In the .mld/.mdd file, bump up the driver/library version number and add this repository to the Vitis software platform.

The Vitis software platform automatically infers all the components contained within the repository and makes them available for use in its environment. To make any modifications, you must make the required changes in the repository. Building the application gives you the modified changes.

Creating a Repository

A software repository is a directory where you can install third-party software components as well as custom copies of drivers, libraries, and operating systems. When you add a software repository, the Vitis™ software platform automatically infers all the components contained within the repository and makes them available for use in its environment.

Your Vitis software platform workspace can point to multiple software repositories. The scope of the software repository can be global (available across all workspaces) or local (available only to the current workspace). Components found in any local software repositories added to a Vitis software platform workspace take precedence over identical components, if any, found in the global software repositories, which in turn take higher precedence over identical components found in the Vitis software platform installation.

A repository in the Vitis software platform requires a specific organization of the components. Software components in your repository must belong to one of the following directories:

  • drivers: Used to hold device drivers.
  • sw_services: Used to hold libraries.
  • bsp: Used to hold software platforms and board support packages.
  • sw_apps: Used to hold software standalone applications.
  • sw_apps_linux: Used to hold Linux applications.

Within each directory, sub-directories containing individual software components must be present. The following diagram shows the repository structure.

Figure 8: Repository Structure


Adding the Repository

  1. Select Xilinx > Repositories.
  2. To add the repository you created in Creating a Repository, follow one of these two steps:
    • To ensure that your repository driver/library repository is limited to the current workspace, click New to add it under Local Repositories.
    • To ensure that your repository driver/library repository is available across all workspaces, click New to add it under Global Repositories.
  3. Select Apply and Close to add the custom drivers/libraries from the repositories.

Resetting BSP Sources for a Domain

This feature allows you to reset the source files of a domain's BSP. To reset:

  1. Click the platform.spr file in the Explorer view and select the appropriate domain.
  2. Click Reset BSP Sources.
  3. Click Yes. This resets the sources for the domain/BSP selected.
    Note: Only the source files are reverted back to their original state. The settings however, are retained.

Updating the Hardware Specification

The Vitis™ software platform allows you to update a platform project with a new hardware by updating the software components under the hood. If your Vivado® project and its exported XSA have been updated, this workflow needs to be executed manually so that the Vitis software platform can get the updated hardware specification. You can edit the settings after the software platform adjusts the software components as per the new hardware.

To change the hardware specification file of the platform project, follow these steps:

  1. Right-click the platform project in the Explorer view, and select Update Hardware Specification.
  2. Specify the source hardware specification file in the Update hardware specification for test page.
  3. Click OK to see the hardware specification status.