Create and Build Platform Component - 2024.1 English

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

Document ID
UG1393
Release Date
2024-05-30
Version
2024.1 English

The Vitis unified IDE supports python APIs to create and build the platform component. The platform component (.xpfm) is created from extensible XSA and system software files of the operating system (for example, PetaLinux). The platform component with no system software files for any operating system it is to run the baremetal applications.

Table 1. Python APIs: Platform Component
Python API Description Python API Example
create_platform_component Creates a new platform

For Baremetal: platform_comp=client.create_platform_component(name='platform', hw_design=<hw_xsa_path>)

For Linux: client.create_platform_component(name = platform_name, hw_design = <hw_xsa_path>, cpu = "psu_cortexa53", os = "linux", domain_name = "linux_a53")

add_domain Adds the domain to the platform microblaze = platform.add_domain(name = "microblaze", cpu = "microblaze_0", os = "standalone")
build Initiates a build of platform component platorm_comp.build()
The Python script to create a platform component for baremetal application is described below:
# Add package: Vitis Python CLI
import vitis

# Create a Vitis client object -
client = vitis.create_client()

# Set Vitis Workspace
client.set_workspace(path=<workspace_location>)

# Create Platform Component:
platform_comp=client.create_platform_component(name='platform', hw_design=<hw_extensible_xsa_path>)

# Build the platform component
platform_comp.build()

After building the platform component, the output products are generated at:workspace > platform > export > platform > platform.xpfm