Xilinx ZYNQ UltraScale+ MPSoC - Development - Petalinux

From RidgeRun Developer Connection
< Xilinx ZYNQ UltraScale+ MPSoC
Revision as of 13:08, 30 August 2022 by Jrodriguez (talk | contribs) (Create a new project)
Jump to: navigation, search






Previous: Development/Targeted Reference Designs (TRD) Index Next: Development/Vitis Baremetal





Petalinux SDK installation

You can download the Petalinux SDK from Xilinx Embedded Design Tools or using the Vivado Unified installer. Even if you use the unified installer you will need to install the SDK by executing the installer:

./petalinux-v2022.1-final-installer.run

Then, whenever you need the SDK you can load the environment by sourcing the settings.sh file from the installation directory.

source settings.sh

Create a new project

Download the latest KV260 Starter Kit BSP from Xilinx Embedded Design Tools. In this case, we are going to use version 2022.1.

A new Petalinux project using the downloaded template can be created with:

petalinux-create -t project -s xilinx-kv260-starterkit-v2022.1-05140151.bsp -n sample-project

Add Xilinx packages

You can enable the specific Xilinx packages for the KV260 Starter kit by setting the board variant as follows:

cd sample-project
echo 'BOARD_VARIANT = "kv"' >>  project-spec/meta-user/conf/petalinuxbsp.conf

And adding the packages to the rootfs configuration menu:

echo 'CONFIG_packagegroup-kv260-smartcam' >> project-spec/meta-user/conf/user-rootfsconfig
echo 'CONFIG_packagegroup-kv260-aibox-reid' >> project-spec/meta-user/conf/user-rootfsconfig
echo 'CONFIG_packagegroup-kv260-defect-detect' >> project-spec/meta-user/conf/user-rootfsconfig
echo 'CONFIG_packagegroup-kv260-nlp-smartvision' >> project-spec/meta-user/conf/user-rootfsconfig

After that, you can enter the rootfs configuration menu and activate each package by typing 'y' next to each one inside the user packages menu:

petalinux-config -c rootfs
Rootfs configuration to enable all the Xilinx packages

Creating your own app

To create a custom application to include in your image you can execute the following command:

petalinux-create -t apps -n sample-app

This will create the app inside the project-spec/meta-user/recipes-apps/sample-app directory which you can modify as you wish. For now, we will leave the default app which prints "Hello World!" to stdout.


Building and flashing the board

Once you are happy with the packages included in your Petalinux image you can build it as follows:

petalinux-build


Previous: Development/Targeted Reference Designs (TRD) Index Next: Development/Vitis Baremetal