The platform Python API supports creation, building and modification of a platform.
| Python API | Description | Python API Example |
|---|---|---|
| create_platform_component | Creates a new platform | platform = client.create_platform_component(name = “platform”, hw_design = “zcu102”, cpu = “psu_cortexa53_0”, os = “standalone”, domain_name = “standalone_a53”, architecture = “32-bit”, compiler = “gcc”) |
| add_domain | Adds the domain to the platform | platform.add_domain(cpu = “psu_cortexa53_0”, os = “standalone”,name = “a53_standalone”, display_name = “a53_standalone”, generate_dtb = True, dt_overlay = True, architecture = “64-bit”, compiler = “gcc”) |
| build | Generates the platform | platform.build() |
The following is an example Python script to create and build a
platform:
import vitis
client = vitis.create_client()
client.set_workspace(path="vitis_2025.2_ws")
platform = client.create_platform_component(name = "platform",hw_design = "zcu102",os = "standalone",cpu = "psu_cortexa53_0",domain_name = "standalone_psu_cortexa53_0",generate_dtb = False,architecture = "64-bit",compiler = "gcc")
platform = client.get_component(name="platform")
status = platform.build()
status = platform.build()