Jump to content

Xilinx ZYNQ UltraScale+ MPSoC/Development/Petalinux: Difference between revisions

No edit summary
Line 21: Line 21:
Download the latest KV260 Starter Kit BSP from [https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html Xilinx Embedded Design Tools]. In this case, we are going to use version 2022.1.
Download the latest KV260 Starter Kit BSP from [https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html 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:


<syntaxhighlight lang=bash>
petalinux-create -t project -s xilinx-kv260-starterkit-v2022.1-05140151.bsp -n sample-project
</syntaxhighlight>


= Add Xilinx packages =
You can enable the specific Xilinx packages for the KV260 Starter kit by setting the board variant as follows:
<syntaxhighlight lang=bash>
cd sample-project
echo 'BOARD_VARIANT = "kv"' >>  project-spec/meta-user/conf/petalinuxbsp.conf
</syntaxhighlight>
And adding the packages to the rootfs configuration menu:
<syntaxhighlight lang=bash>
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
</syntaxhighlight>
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:
<syntaxhighlight lang=bash>
petalinux-config -c rootfs
</syntaxhighlight>
[[File:Kv260-rootfs-xilinx-packages.png|1000px|thumb|center|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:
<syntaxhighlight lang=bash>
petalinux-create -t apps -n sample-app
</syntaxhighlight>
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:
<syntaxhighlight lang=bash>
petalinux-build
</syntaxhighlight>


<noinclude>{{Xilinx ZYNQ UltraScale+ MPSoC/Foot|Development/Targeted Reference Designs (TRD)|Development/Vitis Baremetal}}</noinclude>
<noinclude>{{Xilinx ZYNQ UltraScale+ MPSoC/Foot|Development/Targeted Reference Designs (TRD)|Development/Vitis Baremetal}}</noinclude>
222

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.