Vitis Projects

openhw

Open a hardware design.

Syntax

openhw <hw-proj | xsa file>

Open a hardware design exported from Vivado. XSA file exported from Vivado, or the hardware project created using 'createhw' command can be passed as argument.

Options

None

Returns

If successful, this command returns nothing. Otherwise it returns an error.

Example(s)

openhw ZC702_hw_platform

Open the hardware project ZC702_hw_platform.

openhw /tmp/wrk/hw1/system.xsa

Open the hardware project corresponding to the system.xsa.

closehw

Close a hardware design.

Syntax

closehw <hw project | xsa file>

Close a hardware design that was opened using 'openhw' command. XSA file exported from Vivado, or the hardware project created using 'createhw' command can be passed as argument.

Options

None

Returns

If successful, this command returns nothing. Otherwise it returns an error.

Example(s)

closehw ZC702_hw_platform

Close the hardware project ZC702_hw_platform.

closehw /tmp/wrk/hw1/system.xsa

Close the hardware project corresponding to the system.xsa.

getaddrmap

Get the address ranges of IP connected to processor.

Syntax

getaddrmap <hw spec file> <processor-instance>

Return the address ranges of all the IP connected to the processor in a tabular format, along with details like size and access flags of all IP.

Options

None

Returns

If successful, this command returns the output of IPs and ranges. Otherwise it returns an error.

Example(s)

getaddrmap system.xsa ps7_cortexa9_0

Return the address map of peripherals connected to ps7_cortexa9_0. system.xsa is the hw specification file exported from Vivado.

getperipherals

Get a list of all peripherals in the HW design

Syntax

getperipherals <xsa> <processor-instance>

Return the list of all the peripherals in the hardware design, along with version and type. If [processor-instance] is specified, return only a list of slave peripherals connected to that processor.

Options

None

Returns

If successful, this command returns the list of peripherals. Otherwise it returns an error.

Example(s)

getperipherals system.xsa

Return a list of peripherals in the hardware design.

getperipherals system.xsa ps7_cortexa9_0

Return a list of peripherals connected to processor ps7_cortexa9_0 in the hardware design.

getprocessors

Get a list of all processors in the HW design

Syntax

getprocessors <xsa>

Return the list of all the processors in the hardware design

Options

None

Returns

If successful, this command returns the list of processors. Otherwise it returns an error.

Example(s)

getprocessors system.xsa

Return a list of processors in the hardware design.

repo

Get, set, or modify software repositories

Syntax

repo [OPTIONS]

Get/set the software repositories path currently used. This command is used to scan the repositories, to get the list of OS/libs/drivers/apps from repository.

Options

Option Description
-set <path-list> Set the repository path and load all the software cores available. Multiple repository paths can be specified as Tcl list.
-get Get the repository path(s).
-scan Scan the repositories. Used this option to scan the repositories, when some changes are done.
-os Return a list of all the OS from the repositories.
-libs Return a list of all the libs from the repositories.
-drivers Return a list of all the drivers from the repositories.
-apps Return a list of all the applications from the repositories.
-add-platforms <platforms directory> Add the specified directory to the platform repository.
-remove-platforms-dir <platforms directory> Remove the specified directory from the platform repository.

Returns

Depends on the OPTIONS specified.

-scan, -set: Returns nothing.

-get: Returns the current repository path.

-os, -libs, -drivers, -apps: Returns the list of OS/libs/drivers/apps respectively.

Example(s)

repo -set <repo-path>

Set the repository path to the path specified by <repo-path>.

repo -os

Return a list of OS from the repo.

repo -libs

Return a list of libraries from the repo.

platform

Create, configure, list, and report platforms

Syntax

platform <sub-command> [options]
Create a platform project, or perform various other operations on the platform project, based on <sub-command> specified. Following sub-commands are supported.
  • active - Set or return the active platform.
  • clean - Clean platform.
  • config - Configure the properties of a platform.
  • create - Create/define a platform.
  • generate - Build the platform. list - List all the platforms in workspace.
  • report - Report the details of a platform.
  • read - Read the platform settings from a file.
  • remove - Delete the platform.
  • write - Save the platform settings to a file. Type "help" followed by "platform sub-command", or "platform sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command. Refer to the sub-command help for details.

Example(s)

Refer to the sub-command help for details.

platform active

Set/Get active platform

Syntax

platform active [platform-name]

Set or get the active platform. If platform-name is specified, it is made as active platform, otherwise the name of active platform is returned. If no active platform exists, this command returns an empty string.

Options

None

Returns

Empty string, if a platform is set as active or no active platform exists. Platform name, when active platform is read.

Example(s)

platform active

Return the name of the active platform.

platform active zc702_platform

Set zc702_platform as active platform.

platform clean

Clean Platform

Syntax

platform clean 

Clean the active platform in the workspace. This will clean all the components in platform like fsbl, pmufw etc.

Options

None

Returns

Nothing. Build log will be printed on the console.

Example(s)

platform active zcu102

platform clean

Set zcu102 as active platform and clean it.

platform config

Configure the active platform

Syntax

platform config [options]

Configure the properties of active platform.

Options

Option Description
-desc <description> Add a Brief description about the platform.
-updatehw <hw-spec> Update the platform to use a new hardware specification file specified by <hw-spec>.
-samples <samples-dir> Make the application template specified in <samples-dir>, part of the platform. This option can only be used for acceleratable application. "repo -apps <platform-name>" can be used to list the application templates available for the given platform-name.
-prebuilt-data <directory-name> For expandable platforms, pre-generated hardware data specified in directory-name will be used for building user applications that do not contain accelerators. This will reduce the build time.
-make-local Make the referenced SW components local to the platform.
-fsbl-target <processor-type> Processor-type for which the existing fsbl has to be re-generated. This option is valid only for ZU+.
-create-boot-bsp Generate boot components for the platform.
-remove-boot-bsp Remove all the boot components generated during platform creation.
-fsbl-elf <fsbl.elf> Prebuilt fsbl.elf to be used as boot component when "remove-boot-bsp" option is specified.
-pmufw-elf <pmufw.elf> Prebuilt pmufw.elf to be used as boot component when "remove-boot-bsp" option is specified.
-extra-compiler-flags <param> <value> Set extra compiler flag for the parameter with provided value. Only fsbl and pmufw are the supported parameters. If value is not paseed existing value will return.
-extra-linker-flags <param> <value> Set extra linker flag for the parameter with provided value. Only fsbl and pmufw are the supported parameters. If value is not paseed existing value will return.
-reset-user-defined-flags <param> Resets the extra compiler and linker flags. Only fsbl and pmufw are the supported parameters.
-report <param> Return the list of extra compiler and linker flags set to the given parameter. Only fsbl and pmufw are the supported parameters.

Returns

Empty string, if the platform is configured successfully. Error string, if no platform is active or if the platform cannot be configured.

Example(s)

platform active zc702

platform config -desc "ZC702 with memory test application"

-samples /home/user/newDir Make zc702 as active platform, configure the description of the platform and make samples in /home/user/newDir part of the platform.

platform config -updatehw /home/user/newdesign.xsa

Updates the platform project with the new xsa.

platform config -fsbl-target psu_cortexr5_0

Changes the fsbl target to psu_cortexr5_0.

platform config -extra-compiler-flags fsbl

Get the extra compiler flags. These are the flags added extra to the flags derived from libaries, processor and os.

platform config -extra-compiler-flags fsbl "-DFSBL_DEBUG_INFO [platform config -extra-compiler-flags fsbl]"

Prepend -DFSBL_DEBUG_INFO to the compiler options, while building the fsbl application.

platform config -report fsbl

Return table of extra compiler and extra linker flags that are set for fsbl. Platform config -create-boot-bsp Create the boot components for the platform. Platform config -create-boot-bsp -arch 32-bit Create the boot components for the platform, creating fsbl in 32-bit. This is valid only for zynqmp based platforms. Platform config -remove-boot-bsp Remove all the boot components generated during platform creation.

platform create

Create a new platform

Syntax

platform create [options]

Create a new platform by importing hardware definition file. Platform can also be created from pre-defined hw platforms. Supported pre-defined platforms are zc702, zcu102, zc706 and zed.

Options

Option Description
-name <software-platform name> Name of the software platform to be generated.
-desc <description> Brief description about the software platform.
-hw <handoff-file> Hardware description file to be used to create the platform.
-out <output-directory> The directory where the software platform needs to be created. If the workspace is set, this option should not be used. Use of this option will prevent the usage of platform in Vitis IDE.
-prebuilt Mark the platform to be built from already built sw artifacts. This option should be used only if you have existig software platform artifacts.
-proc <processor> The processor to be used; the tool will create default domain.
-arch <processor architecture> 32-bit or 64-bit, this is valid only for a53 processor.
-samples <samples-directory> Make the samples in <samples-directory>, part of the platform.
-os <os> The os to be used; the tool will create default domain. This works in combination with -proc option.
-xpfm <platform-path> Existing platform from which the projects have to be imported and made part of the current platform.
-no-boot-bsp Mark the platform to build without generating boot components.
-arch <arch-type> Processor architecture, <arch-type> can be 32 or 64 bits. This option is used to build the project with 32/64 bit toolchain.

Returns

Empty string, if the platform is created successfully. Error string, if the platform cannot be created.

Example(s)

platform create -name "zcu102_test" -hw zcu102

Defines a software platform for a pre-defined hardware desciption file.

platform create -name "zcu102_test" -hw zcu102 -proc psu_cortexa53_0 -os standalone

Defines a software platform for a pre-defined hardware desciption file. Create a default domain with standalone os running on psu_cortexa53_0.

platform create -name "zcu102_32bit" -hw zcu102 -proc psu_cortexa53_0 -arch 32-bit

-os standalone Defines a software platform for a pre-defined hardware desciption file. Create a default domain with standalone os running on psu_cortexa53_0 in 32-bit mode.

platform create -name "zcu102_test" -hw zcu102 -proc psu_cortexa53 -os linux

-arch 32-bit Defines a software platform for a pre-defined hardware desciption file. Create a default domain with linux os running on psu_cortexa53 in 32-bit.

platform create -xpfm /path/zc702.xpfm

This will create a platform project for the platform pointed by the xpfm file.

platform create -name "ZC702Test" -hw /path/zc702.xsa

Defines a software platform for a hardware desciption file.

platform generate

Build a platform

Syntax

platform generate 

Build the active platform and add it to the repository. The platform must be created through platform create command, and must be selected as active platform before building.

Options

Option Description
-domains <domain-list> List of domains which need to be built and added to the repository. Without this option, all the domains that are part of the plafform are built.

Returns

Empty string, if the platform is generated successfully. Error string, if the platform cannot be built.

Example(s)

platform generate

Build the active platform and add it to repository.

platform generate -domains a53_standalone,r5_standalone

Build only a53_standalone,r5_standalone domains and add it to the repository.

platform list

List the platforms

Syntax

List the platforms in the workspace and repository.

Options

None

Returns

List of platforms, or "No active platform present" string if no platforms exist.

Example(s)

platform list

Return a list of all the platforms in the workspace and repository.

platform report

Report the details of active platform

Syntax

platform report 

Return details like domains, processors, etc. created in the active platform are returned.

Options

None

Returns

Table with details of active platform, or error string if no platforms exist.

Example(s)

platform report

Return a table with details of the active platform.

platform read

Read from the platform file

Syntax

platform read [platform-file]

Read platform settings from the platform file and makes it available for edit. Platform file gets created during the creation of platform itself and it contains all details of platform like hw specification file, processor information etc

Options

None

Returns

Empty string, if the platform is read successfully. Error string, if the platform file cannot be read.

Example(s)

platform read <platform.spr>

Reads the platform from the platform.spr file.

platform remove

Delete a platform

Syntax

platform remove <platform-name>

Delete the given platform. If platform-name is not specified, active platform is deleted.

Options

None

Returns

Empty string, if the platform is deleted successfully. Error string, if the platform cannot be deleted.

Example(s)

platform remove zc702

Removes zc702 platform from the disk.

platform write

Write platform settings to a file

Syntax

platform write 

Writes the platform settings to platform.spr file. It can be read back using "platform read" command.

Options

None

Returns

Empty string, if the platform settings are written successfully. Error string, if the platform settings cannot be written.

Example(s)

platform write

Writes platform to platform.spr file.

domain

Create, configure, list and report domains

Syntax

domain <sub-command> [options]
Create a domain, or perform various other operations on the domain, based on <sub-command> specified. Following sub-commands are supported.
  • active - Set/Get the active domain.
  • config - Configure the properties of a domain.
  • create - Create a domain in the active platform.
  • list - List all the domains in active platform.
  • report - Report the details of a domain.
  • remove - Delete a domain. Type "help" followed by "app sub-command", or "app sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command. Refer to the sub-command help for details.

Example(s)

Refer to the sub-command help for details.

domain active

Set/Get the active domain

Syntax

domain active [domain-name]

Set or get the active domain. If domain-name is specified, it is made as active domain, otherwise the name of active domain is returned. If no active domain exists, this command returns an empty string.

Options

None

Returns

Empty string, if a domain is set as active or no active domain exists. Domain name, when active domain is read.

Example(s)

domain active

Return the name of the active domain .

domain active test_domain

Set test_domain as active domain.

domain config

Configure the active domain

Syntax

domain config [options]

Configure the properties of active domain.

Options

Option Description
-display-name <display name> Display name of the domain.
-desc <description> Brief description about the domain.
-sd-dir <location> For domain with Linux as OS, use pre-built Linux images from this directory, while creating the PetaLinux project. This option is valid only for Linux domains.
-generate-bif Generate a standard bif for the domain. domain report shows the location of the generated bif. This option is valid only for Linux domains.
-sw-repo <repositories-list> List of repositories to be used to pick software components like drivers and libraries while generating this domain. Repository list should be a tcl list of software repository paths.
-mss <mss-file> Use mss from specified by <mss-file>, instead of generating mss file for the domain.
-readme <file-name> Add README file for the domain, with boot instructions, etc.
-inc-path <include-path> Additional include path which should be added while building the application created for this domain.
-lib-path <library-path> Additional library search path which should be added to the linker settings of the application created for this domain.
-sysroot <sysroot-dir> The Linux sysroot directory that should be added to the platform. This sysroot will be consumed during application build.
-boot <boot-dir> Directory to generate components after Linux image build.
-bif <file-name> Bif file used to create boot image for Linux boot.
-qemu-args <file-name> File with all PS QEMU args listed. This is used to start PS QEMU.
-pmuqemu-args <file-name> File with all PMC QEMU args listed. This is used to start PMU QEMU.
-pmcqemu-args <file-name> File with all pmcqemu args listed. This is used to start pmcqemu.
-qemu-data <data-dir> Directory which has all the files listed in file-name provided as part of qemu-args and pmuqemu-args options.

Returns

Empty string, if the domain is configured successfully. Error string, if no domain is active or if the domain cannot be configured.

Example(s)

domain config -display-name zc702_MemoryTest

-desc "Memory test application for Zynq" Configure display name and description for the active domain.

domain config -image "/home/user/linux_image/"

Create PetaLinux project from pre-built Linux image. domain -inc-path /path/include/ -lib-path /path/lib/ Adds include and library search paths to the domain's application build settings.

domain create

Create a new domain

Syntax

domain create [options]

Create a new domain in active platform.

Options

Option Description
-name <domain-name> Name of the domain.
-display-name <display_name> The name to be displayed in the report for the domain.
-desc <description> Brief description about the domain.
-proc <processor> Processor core to be used for creating the domain. For SMP Linux, this can be a Tcl list of processor cores.
-arch <processor architecture> 32-bit or 64-bit, this is valid only for a53 processor.
-os <os> OS type. Default type is standalone.
-support-app <app-name> Create a domain with BSP settings needed for application specified by <app-name>. This option is valid only for standalone domains. "repo -apps" command can be used to list the available application.
-auto-generate-linux Generate the Linux artifacts automatically.
-sd-dir <location> For domain with Linux as OS, use pre-built Linux images from this directory, while creating the PetaLinux project. This option is valid only for Linux domains.
-sysroot <sysroot-dir> The linux sysroot directory that should be added to the platform. This sysroot will be consumed during application build.

Returns

Empty string, if the domain is created successfully. Error string, if the domain cannot be created.

Example(s)

domain create -name "ZUdomain" -os standalone -proc psu_cortexa53_0

-support-app {Hello World} Create a standalone domain and configure settings needed for "Hello World" template application.

domain create -name "SMPLinux" -os linux

-proc {ps7_cortexa9_0 ps7_cortexa9_1} Create a Linux domain named SMPLinux for processor cores ps7_cortexa9_0 ps7_cortexa9_1 in the active platform.

domain create -name a53_0_Standalone -os standalone

-proc psu_cortexa53_0 -arch 32-bit Create a standalone domain for a53_0 processor for 32-bit mode.

domain list

List domains

Syntax

domain list 

List domains in the active platform.

Options

None

Returns

List of domains in the active platform, or empty string if no domains exist.

Example(s)

platform active platform1

domain list

Display all the domain created in platform1.

domain remove

Delete a domain

Syntax

domain remove [domain-name]

Delete a domain from active platform. If domain-name is not specified, active domain is deleted.

Options

None

Returns

Empty string, if the domain is deleted successfully. Error string, if the domain deletion fails.

Example(s)

domain remove test_domain

Removes test_domin from the active platform.

domain report

Report the details of a domain

Syntax

domain report [domain-name]

Return details like platform, processor core, OS, etc. of a domain. If domain-name is not specified, details of the active domain are reported.

Options

None

Returns

Table with details of a domain, if domain-name or active domain exists. Error string, if active domain does not exist and domain-name is not specified.

Example(s)

domain report

Return a table with details of the active domain.

bsp

Configure bsp settings of baremetal domain

Syntax

bsp <sub-command> [options]
Configure the bsp settings which includes library, driver and OS version of a active domain, based on <sub-command> specified. The following sub-commands are supported.
  • config - Modify the configurable parameters of bsp settings.
  • getdrivers - List IP instance and its driver.
  • getlibs - List the libraries from bsp settings.
  • getos - List os details from bsp settings.
  • listparams - List the configurable parameters of os/proc/library.
  • regenerate - Regenerate BSP sources.
  • reload - Revert the bsp settings to the earlier saved state.
  • write - Save the bsp edits.
  • removelib - Remove library from bsp settings.
  • setdriver - Sets the driver for the given IP instance.
  • setlib - Sets the given library. setosversion - Sets version for the given os. Type "help" followed by "bsp sub-command", or "bsp sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command. Refer to the sub-command help for details.

Example(s)

Refer to the sub-command help for details.

bsp config

configure parameters of bsp settings

Syntax

bsp config <param> <value>

Set/Get/Append value to the configurable parameters. If <param> is specified and <value> is not specified, return the value of the parameter. If <param> and <value> are specified, set the value of parameter. Use "bsp list-params <-os/-proc/-driver>" to know configurable parameters of OS/processor/driver.

Options

Option Description
-append <param> <value> Append the given value to the parameter.

Returns

Nothing, if the parameter is set/appended successfully. Current value of the paramter if <value> is not specified. Error string, if the parameter cannot be set/appended.

Example(s)

bsp config -append extra_compiler_flags "-pg"

Append -pg to extra_compiler_flags.

bsp config stdin

Return the current value of stdin.

bsp config stdin ps7_uart_1

Set stdin to ps7_uart_1 .

bsp getdrivers

list drivers

Syntax

bsp getdrivers 

Return the list of drivers assigned to IP in bsp.

Options

Option Description
-dict Return the result as <IP-name driver:version> pairs.

Returns

Table with IP, its corresponding driver and driver version. Empty string, if there are no IPs.

Example(s)

bsp getdrivers

Return the list of IPs and its driver.

bsp getlibs

list libraries added in the bsp settings

Syntax

bsp getlibs 

Display list of libraries added in the bsp settings.

Options

Option Description
-dict Return the result as <lib-name version> pairs.

Returns

List of library/(ies). Empty string, if there are no library added.

Example(s)

bsp getlibs

Return the list of libraries added in bsp settings of active domain.

bsp getos

Display os details from bsp settings

Syntax

bsp getos 

Displays the current OS and its version.

Options

Option Description
-dict Return the result as <os-name version> pair.

Returns

OS name and its version.

Example(s)

bsp getos

Return OS name and version from the bsp settings of the active domain.

bsp listparams

List the configurable parameters of the bsp

Syntax

bsp listparams <option>

List the configurable parameters of the <option>.

Options

Option Description
-lib <lib-name> Return the configurable parameters of Library in BSP.
-os Return the configurable parameters of OS in BSP.
-proc Return the configurable parameters of processor in BSP.

Returns

parameter names, empty string, if no parameter exist.

Example(s)

bsp listparams -os

List all the configurable parameters of OS in the bsp settings.

bsp regenerate

Regenerate BSP sources.

Syntax

bsp regenerate 

Regenerate the sources with the modifications made to BSP.

Options

None

Returns

Nothing, if the bsp is generated successfully. Error string, if the bsp cannot be generated.

Example(s)

bsp regenerate

Regenerate the BSP sources with the changes done in the BSP settings.

bsp removelib

Remove library from bsp settings

Syntax

bsp removelib -name <lib-name>

Remove the library from bsp settings of the active domain.

Options

Option Description
-name <lib-name> Library to be removed from bsp settings.

Returns

Nothing, if the library is removed successfully. Error string, if the library cannot be removed.

Example(s)

bsp removelib -name xilffs

Remove xilffs library from bsp settings.

bsp setdriver

Set the driver to IP

Syntax

bsp setdriver [options]

Set specified driver to the IP core in bsp settings of active domain.

Options

Option Description
-driver <driver-name> Driver to be assigned to an IP.
-ip <ip-name> IP instance for which the driver has to be added.
-ver <version> Driver version.

Returns

Nothing, if the driver is set successfully. Error string, if the driver cannot be set.

Example(s)

bsp setdriver -ip ps7_uart_1 -driver generic -ver 2.0

Set the generic driver for the ps7_uart_1 IP instance for the bsp.

bsp setlib

Adds the library to the bsp settings

Syntax

bsp setlib [options]

Add the library to the bsp settings of active domain.

Options

Option Description
-name <lib-name> Library to be added to the bsp settings.
-ver <version> Library version.

Returns

Nothing, if the library is set successfully. Error string, if the library cannot be set.

Example(s)

bsp setlib -name xilffs

Add the xilffs library to the bsp settings.

bsp setosversion

Set the OS version

Syntax

bsp setosversion [options]

Set OS version in the bsp settings of active domain. Latest version is added by default.

Options

Option Description
-ver <version> OS version.

Returns

Nothing, if the OS version is set successfully. Error string, if the OS version cannot be set.

Example(s)

bsp setosversion -ver 6.6

Set the OS version 6.6 in bsp settings of the active domain.

library

Library project management

Syntax

library <sub-command> [options]
Create a library project, or perform various other operations on the library project, based on <sub-command> specified. Following sub-commands are supported.
  • build - Build the library project.
  • clean - Clean the library project.
  • config - Configure C/C++ build settings of the library project.
  • create - Create a library project.
  • list - List all the library projects in workspace.
  • remove - Delete the library project.
  • report - Report the details of the library project. Type "help" followed by "library sub-command", or "library sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command.

Example(s)

See sub-command help for examples.

library build

Build library project

Syntax

library build -name <project-name>

Build the library project specified by <project-name> in the workspace. "-name" switch is optional, so <project-name> can be specified directly, without using -name.

Options

Option Description
-name <project-name> Name of the library project to be built.

Returns

Nothing, if the library project is built successfully. Error string, if the library project build fails.

Example(s)

library build -name lib1

Build lib1 library project.

library clean

Clean library project

Syntax

library clean -name <project-name>

Clean the library project specified by <project-name> in the workspace. "-name" switch is optional, so <project-name> can be specified directly, without using -name.

Options

Option Description
-name <project-name> Name of the library project to be clean built.

Returns

Nothing, if the library project is cleaned successfully. Error string, if the library project build clean fails.

Example(s)

library clean -name lib1

Clean lib1 library project.

library create

Create a library project

Syntax

library create -name <project-name> -type <library-type> -platform <platform>

-domain <domain> -sysproj <system-project> Create a library project using an existing platform, and domain. If <platform>, <domain>, and <sys-config> are not specified, then active platform and domain are used for Creating library project. For creating library project and adding them to existing system project, refer to next use case.

library create -name <project-name> -type <library-type> -sysproj <system-project>

-domain <domain> Create a library project for domain specified by <domain> and add it to system project specified by <system-project>. If <system-project> exists, platform corresponding to this system project are used for creating the library project. If <domain> is not specified, then active domain is used.

Options

Option Description
-name <project-name> Project name that should be created.
-type <library-type> <library-type> can be 'static' or 'shared'
-platform <platform-name> Name of the platform. Use "repo -platforms" to list available pre-defined platforms.
-domain <domain-name> Name of the domain. Use "platform report <platform-name>" to list the available domains in a platform.
-sysproj <system-project> Name of the system project. Use "sysproj list" to know the available system projects in the workspace.

Returns

Nothing, if the library project is created successfully. Error string, if the library project creation fails.

Example(s)

library create -name lib1 -type static -platform zcu102 -domain a53_standalone

Create a static library project with name 'lib1', for the platform zcu102, which has a domain named a53_standalone domain.

library create -name lib2 -type shared -sysproj test_system -domain test_domain

Create shared library project with name 'lib2' and add it to system project test_system.

library list

List library projects

Syntax

List all library projects in the workspace.

Options

None

Returns

List of library projects in the workspace. If no library projects exist, an empty string is returned.

Example(s)

library list

Lists all the library projects in the workspace.

library remove

Delete library project

Syntax

library remove [options] <project-name>

Delete a library project from the workspace.

Options

None

Returns

Nothing, if the library project is deleted successfully. Error string, if the library project deletion fails.

Example(s)

library remove lib1

Removes lib1 from workspace.

library report

Report details of the library project

Syntax

library report <project-name>

Return details like platform, domain etc. of the library project.

Options

None

Returns

Details of the library project, or error string, if library project does not exist.

Example(s)

app report lib1 Return all the details of library lib1.

checkvalidrmxsa

Check if rm xsa is suitable for static xsa

Syntax

checkvalidrmxsa -hw <static hw spec file> -rm-hw <rm hw spec file>

To check if the rm xsa is suitable to work with the static hw xsa.

Options

None

Returns

If successful, returns true if rm hw xsa is a fit for the static hw xsa. returns false if not. Otherwise it returns an error.

Example(s)

checkvalidrmxsa -hw static.xsa -rm-hw rm.xsa

Returns true if rm.xsa can be used along with the static xsa.

isstaticxsa

Check if hardware design is a static xsa

Syntax

isstaticxsa <hw spec file>

To check if the hw design is a static xsa or not.

Options

None

Returns

If successful, returns true if hw design is static, returns false if hw design is static. Otherwise it returns an error.

Example(s)

isstaticxsa static.xsa

Returns true if XSA is static.

ishwexpandable

Check if hardware design is expandable

Syntax

ishwexpandable <hw spec file>

To check if the hw design is expandable or fixed.

Options

None

Returns

If successful, returns true if hw design is expandable/extensible, returns false if hw design is fixed. Otherwise it returns an error.

Example(s)

ishwexpandable system.xsa

Returns true if XSA is expandable/extensible

setws

Set vitis workspace

Syntax

setws [OPTIONS] [path]

Set vitis workspace to <path>, for creating projects. If <path> does not exist, then the directory is created. If <path> is not specified, then current directory is used.

Options

Option Description
-switch <path> Close existing workspace and switch to new workspace.

Returns

Nothing if the workspace is set successfully. Error string, if the path specified is a file.

Example(s)

setws /tmp/wrk/wksp1

Set the current workspace to /tmp/wrk/wksp1.

setws -switch /tmp/wrk/wksp2

Close the current workspace and switch to new workspace /tmp/wrk/wksp2.

getws

Get vitis workspace

Syntax

getws 

Return the current vitis workspace.

Returns

Current workspace.

app

Application project management

Syntax

app <sub-command> [options]
Create an application project, or perform various other operations on the application project, based on <sub-command> specified. Following sub-commands are supported.
  • build - Build the application project.
  • clean - Clean the application project.
  • config - Configure C/C++ build settings of the application project.
  • create - Create an application project.
  • list - List all the application projects in workspace.
  • remove - Delete the application project.
  • report - Report the details of the application project.
  • switch - Switch application project to refer another platform. Type "help" followed by "app sub-command", or "app sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command. Refer to the sub-command help for details.

Example(s)

Refer to the sub-command help for examples.

app build

Build application

Syntax

app build -name <app-name>

Build the application specified by <app-name> in the workspace. "-name" switch is optional, so <app-name> can be specified directly, without using -name.

Options

Option Description
-name <app-name> Name of the application to be built.
-all Option to Build all the application projects.

Returns

Nothing. Build log will be printed on the console.

Example(s)

app build -name helloworld

Build helloworld application.

app build -all

Build all the application projects in the workspace.

app clean

Clean application

Syntax

app clean -name <app-name>

Clean the application specified by <app-name> in the workspace. "-name" switch is optional, so <app-name> can be specified directly, without using -name.

Options

Option Description
-name <app-name> Name of the application to be clean built.

Returns

Nothing. Build log will be printed on the console.

Example(s)

app clean -name helloworld

Clean helloworld application.

app config

Configure C/C++ build settings of the application

Syntax

Configure C/C++ build settings for the specified application. Following settings can be configured for applications:
  • assembler-flags : Miscellaneous flags for assembler
  • build-config : Get/set build configuration
  • compiler-misc : Compiler miscellaneous flags
  • compiler-optimization : Optimization level
  • define-compiler-symbols : Define symbols. Ex. MYSYMBOL
  • include-path : Include path for header files
  • libraries : Libraries to be added while linking
  • library-search-path : Search path for the libraries added
  • linker-misc : Linker miscellaneous flags
  • linker-script : Linker script for linking
  • undef-compiler-symbols : Undefine symbols. Ex. MYSYMBOL
app config -name <app-name> <param-name>

Get the value of configuration parameter <param-name> for the application specified by <app-name>.

app config [OPTIONS] -name <app-name> <param-name> <value>

Set/modify/remove the value of configuration parameter <param-name> for the application specified by <app-name>.

Options

Option Description
-name Name of the application.
-set Set the configuration parameter value to new <value>.
-get Get the configuration parameter value.
-add Append the new <value> to configuration parameter value. Add option is not supported for ,compiler-optimization
-info Displays more information like possible values and possible operations about the configuration parameter. A parameter name must be specified when this option is used.
-remove Remove <value> from the configuration parameter value. Remove option is not supported for assembler-flags, build-config, compiler-misc, compiler-optimization, linker-misc and linker-script.

Returns

Depends on the arguments specified. <none> List of parameters available for configuration and description of each parameter.

<parameter name>: Parameter value, or error, if unsupported parameter is specified.

<parameter name> <paramater value>: Nothing if the value is set successfully, or error, if unsupported parameter is specified.

Example(s)

app config -name test build-config

Return the current build configuration for the application named test.

app config -name test define-compiler-symbols FSBL_DEBUG_INFO

Add -DFSBL_DEBUG_INFO to the compiler options, while building the test application.

app config -name test -remove define-compiler-symbols FSBL_DEBUG_INFO

Remove -DFSBL_DEBUG_INFO from the compiler options, while building the test application.

app config -name test -set compiler-misc {-c -fmessage-length=0 -MT"$@"}

Set {-c -fmessage-length=0 -MT"$@"} as compiler miscellaneous flags for the test application.

app config -name test -append compiler-misc {-pg}

Add {-pg} to compiler miscellaneous flags for the test application.

app config -name test -info compiler-optimization

Display more information about possible values and default values for compiler optimization level.

app create

Create an application

Syntax

app create [options] -platform <platform> -domain <domain>

-sysproj <system-project> Create an application using an existing platform and domain, and add it to a system project. If <platform> and <domain> are not specified, then active platform and domain are used for creating the application. If <system-project> is not specified, then a system project is created with name appname_system. For creating applications and adding them to existing system project, refer to next use case. Supported options are: -name, -template.

app create [options] -sysproj <system-project> -domain <domain>

Create an application for domain specified by <domain> and add it to system project specified by <system-project>. If <system-project> exists, platform corresponding to this system project are used for creating the application. If <domain> is not specified, then active domain is used. Supported options are: -name, -template.

app create [options] -hw <hw-spec> -proc <proc-instance>

Create an application for processor core specified <proc-instance> in HW platform specified by <hw-spec>. Supported options are: -name, -template, -os, -lang, -arch.

Options

Option Description
-name <application-name> Name of the application to be created.
-platform <platform-name> Name of the platform. Use "repo -platforms" to list available pre-defined platforms.
-domain <domain-name> Name of the domain. Use "platform report <platform-name>" to list the available system configurations in a platform.
-hw <hw-spec> HW specification file exported from Vivado (XSA).
-sysproj <system-project> Name of the system project. Use "sysproj list" to know available system projects in the workspace.
-proc <processor> Processor core for which the application should be created.
-template <application template> Name of the template application. Default is "Hello World". Use "repo -apps" to list available template applications.
-os <os-name> OS type. Default type is standalone.
-lang <programming language> Programming language can be c or c++.
-arch <arch-type> Processor architecture, <arch-type> can be 32 or 64 bits. This option is used to build the project with 32/64 bit toolchain.

Returns

Nothing, if the application is created successfully. Error string, if the application creation fails.

Example(s)

app create -name test -platform zcu102 -domain a53_standalone

Create Hello World application named test, for the platform zcu102, with a domain named a53_standalone.

app create -name zqfsbl -hw zc702 -proc ps7_cortexa9_0 -os standalone

-template "Zynq FSBL" Create Zynq FSBL application named zqfsbl for ps7_cortexa9_0 processor core, in zc702 HW platform.

app create -name memtest -hw /path/zc702.xsa -proc ps7_cortexa9_0 -os standalone

-template "Memory Tests" Create Memory Test application named memtest for ps7_cortexa9_0 processor core, in zc702.xsa HW platform.

app create -name test -sysproj test_system -domain test_domain

Create Hello World application project with name test and add it to system project test_system.

app list

List applications

Syntax

app list 

List all applications for in the workspace.

Options

None

Returns

List of applications in the workspace. If no applications exist, "No application exist" string is returned.

Example(s)

app list

Lists all the applications in the workspace.

app remove

Delete application

Syntax

app remove <app-name>

Delete an application from the workspace.

Options

None

Returns

Nothing, if the application is deleted successfully. Error string, if the application deletion fails.

Example(s)

app remove zynqapp

Removes zynqapp from workspace.

app report

Report details of the application

Syntax

app report <app-name>

Return details like platform, domain, processor core, OS, etc. of an application.

Options

None

Returns

Details of the application, or error string, if application does not exist.

Example(s)

app report test

Return all the details of application test.

app switch

Switch the application to use another domain/platform

Syntax

app switch -name <app-name> -platform <platform-name> -domain <domain-name>

Switch the application to use another platform and domain. If the domain name is not specified, application will be moved to the first domain which is created for the same processor as current domain. This option is supported if there is only one application under this platform.

app switch -name <app-name> -domain <domain-name>

Switch the application to use another domain within the same platform. New domain should be created for the same processor as current domain.

Options

Option Description
-name <application-name> Name of the application to be switched.
-platform <platform-name> Name of the new Platform. Use "platform -list" to list the available platforms.
-domain <domain-name> Name of the new domain. Use "domain -list" to list avaliable domain in the active platform.

Returns

Nothing if application is switched successfully, or error string, if given platform project does not exist or given platform project does not have valid domain.

Example(s)

app switch -name helloworld -platform zcu102

Switch the helloworld application to use zcu102 platform.

sysproj

System project management

Syntax

sysproj <sub-command> [options]

Build, list and report system project, based on <sub-command> specified. Following sub-commands are supported. build - Build the system project. clean - Clean the system project. list - List all system projects in workspace. remove - Delete the system project. report - Report the details of the system project. Type "help" followed by "sysproj sub-command", or "sysproj sub-command" followed by "-help" for more details.

Options

None

Returns

Depends on the sub-command.

Example(s)

See sub-command help for examples.

sysproj build

Build system project

Syntax

sysproj build -name <sysproj-name>

Build the application specified by <sysproj-name> in the workspace. "-name" switch is optional, so <sysproj-name> can be specified directly, without using -name.

Options

Option Description
-name <sysproj-name> Name of the system project to be built.
-all Option to build all the system projects.

Example(s)

sysproj build -name helloworld_system

Build the system project specified.

sysproj build -all

Build all the system projects in the workspace.

sysproj clean

Clean application

Syntax

sysproj clean -name <app-name>

Clean the application specified by <sysproj-name> in the workspace. "-name" switch is optional, so <sysproj-name> can be specified directly, without using -name.

Options

Option Description
-name <sysproj-name> Name of the application to be clean built.

Returns

Nothing, if the application is cleaned suceessfully. Error string, if the application build clean fails.

Example(s)

sysproj clean -name helloworld_system

Clean-build the system project specified.

sysproj list

List system projects

Syntax

sysproj list 

List all system projects in the workspace.

Options

None

Returns

List of system projects in the workspace. If no system project exist, an empty string is returned.

Example(s)

sysproj list

List all system projects in the workspace.

sysproj remove

Delete system project

Syntax

sysproj remove [options]

Delete a system project from the workspace.

Options

None

Returns

Nothing, if the system project is deleted successfully. Error string, if the system project deletion fails.

Example(s)

sysproj remove test_system

Delete test_system from workspace.

sysproj report

Report details of the system project

Syntax

sysproj report <sysproj-name>

Return the details like platform, domain, etc. of a system project.

Options

None

Returns

Details of the system project, or error string, if system project does not exist.

Example(s)

sysproj report test_system

Return all the details of the system project test_system.

importprojects

Import projects to workspace

Syntax

importprojects <path>

Import all the vitis projects from <path> to workspace.

Returns

Nothing, if the projects are imported successfully. Error string, if project path is not specified or if the projects cannot be imported.

Example(s)

importprojects /tmp/wrk/wksp1/hello1

Import vitis project(s) into the current workspace.

importsources

Import sources to an application project.

Syntax

importsources [OPTIONS]

Import sources from a path to application project in workspace.

Options

Option Description
-name <project-name> Application Project to which the sources should be imported.
-path <source-path> Path from which the source files should be imported. If <source-path> is a file, it is imported to application project. If <source-path> is a directory, all the files/sub-directories from the <source-path> are imported to application project. All existing source files will be overwritten in the application, and new files will be copied. Linker script will not be copied to the application directory, unless -linker-script option is used.
-soft-link Links the sources from source-path and does not copy the source.
-target-path <dir-path> Directory to which the sources have to be linked or copied. If target-path option is not used, source files will be linked or copied to "src" directory.
-linker-script Copies the linker script as well.

Returns

Nothing, if the project sources are imported successfully. Error string, if invalid options are used or if the project sources cannot be read/imported.

Example(s)

importsources -name hello1 -path /tmp/wrk/wksp2/hello2

Import the 'hello2' project sources to 'hello1' application project without the linker script.

importsources -name hello1 -path /tmp/wrk/wksp2/hello2 -linker-script

Import the 'hello2' project sources to 'hello1' application project along with the linker script.

importsources -name hello1 -path /tmp/wrk/wksp2/hello_app -soft-link

Create a soft-link to hello1 application project from hello_app application project.

toolchain

Set or get toolchain used for building projects

Syntax

toolchain 

Return a list of available toolchains and supported processor types.

toolchain <processor-type>

Get the current toolchain for <processor-type>.

toolchain <processor-type> <tool-chain>

Set the <toolchain> for <processor-type>. Any new projects created will use the new toolchain during build.

Returns

Depends on the arguments specified <none> List of available toolchains and supported processor types

<processor-type>: Current toolchain for processor-type

<processor-type> <tool-chain>: Nothing if the tool-chain is set, or error, if unsupported tool-chain is specified