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)
- Create a Vivado project.
- Create a block design.
- Generate the image or bitstream.
- Export the hardware using Fixed Platform option. , and then select the
Creating a Platform Project from XSA
To create a new platform project in the Vitis integrated design environment (IDE), follow these steps:
- Launch the New Platform Project wizard using any one of the
following methods:
- Go to .
- Click to open the New Project wizard. Then select .
- Provide a project name in the Project name field and click Next.
- 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.
- Select the operating system and processor to create the initial domain for the platform project.
- 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.
- Click Finish to generate the platform project.
- Build the project to generate the platform. The Console view shows the status of the platform generation.
- Confirm the platform has been added to the platform repository. Click .
Customizing a Pre-Built Platform
- Launch the New Platform Project wizard using any one of the following
methods:
- Go to .
- Click Next. to open the New Project wizard. Then select , and click
The New Platform Project wizard appears.
- Provide a project name in the Project name field.
- Click Next.
- 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.
- 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.
Linux Domain
The Linux domain overview page is similar to the standalone page, but includes more configuration options.
- 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.
The OS settings section enables you to configure the parameters of the OS.
The library settings page enables you to configure the parameters of each library enabled in the Overview page.
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.
The build settings section lists the toolchain selected to build the BSP as well as some extra configuration settings.
Switching FSBL Targeting Processor
- Double click platform.spr.
- Select .
- Click Re-target to psu_cortexr5_0.
- Click on the hammer button to build the platform.
Modifying Source Code for FSBL and PMU Firmware
- To modify the source code for FSBL or PMU firmware, go to Explorer view and expand the corresponding platform.
- Expand the boot domain folder and modify the source files inside.
- 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
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.
Adding the Repository
- Select .
- 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.
- 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:
- Click the platform.spr file in the Explorer view and select the appropriate domain.
- Click Reset BSP Sources.
- 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
To change the hardware specification file of the platform project, follow these steps:
- Right-click the platform project in the Explorer view, and select Update Hardware Specification.
- Specify the source hardware specification file in the Update hardware specification for test page.
- Click OK to see the hardware specification status.