Getting Started with Xilinx ZYNQ UltraScale+ MPSoC
Xilinx ZYNQ UltraScale+ MPSoC | ||||
---|---|---|---|---|
Introduction | ||||
Getting Started | ||||
Xilinx Kria | ||||
Development | ||||
Development Flows Examples | ||||
GStreamer | ||||
|
||||
Contact Us |
Using prebuilt Ubuntu image
Out of the box, the board is able to boot Ubuntu 20.04. Newer versions require updating the boot firmware. To accomplish this, you can download this latest firmware and then follow the firmware update instructions.
Flash the microSD card
You can download the prebuilt images from the following link: Install Ubuntu on Xilinx. With these images, you should be able to get a graphical interface automatically working using a display, keyboard, and mouse.
After downloading the image you need to write it to your microSD card. You can flash it with a tool like balenaEtcher (https://www.balena.io/etcher/) or follow the instructions below:
1. Insert the microSD card into your computer and identify the corresponding device:
dmesg | grep sd | tail
2. Flash the downloaded image, change /dev/sdX to your corresponding device:
xzcat ~/Downloads/<image-file.xz> | sudo dd of=/dev/sdX bs=32M
3. Eject the microSD card:
sudo eject /dev/sdx
Setup the Board
1. Insert the prepared microSD card into the board.
2. Connect an HDMI or DisplayPort display.
3. Connect the USB keyboard and mouse.
4. Connect your power supply. The KV260 Starter kit will power on and boot automatically.
First Boot
Many green LEDs close to the Micro-USB connector will light as soon as the board gets power. Wait for the kernel to finish loading, and you will see the login screen with a single user named "ubuntu":
- Log in to ubuntu with the password: ubuntu
- It will immediately ask you to change the password. Go ahead and choose another one.
After these steps, you should see the Ubuntu 20.04 GUI Desktop.
Before proceeding with the installation check that the correct date is configured in the system with:
date
if not, set the correct date with:
TZ='America/Los_Angeles' sudo date -s '2022-08-26 16:00:00'
Running the NLP-SmartVision app
Installing the Xilinx environment and app
Install the Xilinx Development and Demonstration environment:
sudo snap install xlnx-config --classic
For Ubuntu 20.04 you need to install an older version with:
sudo snap install xlnx-config --classic --channel=1.x
Then initialize the Xilinx environment. This will install all the required packages. Just execute and follow the on-screen instructions:
xlnx-config.sysinit
Install the NLP-SmartVision app:
sudo xlnx-config --snap --install xlnx-nlp-smartvision
Loading the firmware
Once everything is installed and the firmware is in the /lib/firmware/xilinx folder, the accelerator bitstream must be loaded:
You can list the available accelerators with:
sudo xlnx-config --xmutil listapps
If there is another bitstream loaded first unload it with:
sudo xlnx-config --xmutil unloadapp
Now, load the nlp-smartvision accelerator:
sudo xlnx-config --xmutil loadapp nlp-smartvision
App usage
For the NLP-SmartVision app, you will need either a USB Webcam or a MIPI camera + USB microphone. Then, set the default microphone as follows:
ubuntu@kria:~$ xlnx-nlp-smartvision.set-mic Microphones available in the System: card 1: Device [Usb Audio Device], device 0: USB Audio [USB Audio] Which card number do you want to use?1
After that you can start the application with the -u or -m option depending on if you want to use the USB or MIPI camera. It is important to note that the application assumes you are running it from the GNOME environment and won't work remotely without further configuration.
# USB Camera xlnx-nlp-smartvision.nlp-smartvision -u # MIPI Camera xlnx-nlp-smartvision.nlp-smartvision -m
Once the application is running you can talk to it to change the current task. This will switch the machine learning model running on the DPU. The possible voice commands are:
Using prebuilt Petalinux image
Flash the microSD card
You can download the prebuilt images from the following link: Petalinux SD image 2021.1.
After downloading the image you need to write it to your microSD card. You can flash it with a tool like balenaEtcher (https://www.balena.io/etcher/) or following the instructions below:
1. Insert the microSD card into your computer and identify the corresponding device:
dmesg | grep sd | tail
2. Flash the downloaded image, change /dev/sdX to your corresponding device:
xzcat ~/Downloads/<image-file.xz> | sudo dd of=/dev/sdX bs=32M
3. Eject the microSD card:
sudo eject /dev/sdx
Setup the Board
1. Insert the prepared microSD card into the board.
2. Connect an HDMI or DisplayPort display.
3. Connect the micro-USB cable to the port next to the JTAG port on the board and to the host computer.
4. Use the following command to see which ports are enumerated after connecting the USB cable to the computer. The second one should be the UART port.
dmesg | grep tty
5. Use your favorite program to open the serial port. You may need to install the FTDI drivers (https://ftdichip.com/drivers/vcp-drivers/).
sudo minicom -D /dev/ttyUSB1 -b 115200 # or sudo putty /dev/ttyUSB1 -serial -sercfg 115200,8,n,1,N
6. Connect your power supply. The KV260 Starter kit will power on and boot automatically.
First Boot
Many green LEDs close to the Micro-USB connector will light as soon as the board gets power. Wait for the kernel to finish loading, and you will be asked for login credentials:
- The default user is petalinux.
- It will immediately ask you to type a password. Go ahead and choose one.
After these steps, you should be able to run any command in the terminal.
Before proceeding with the installation check that the correct date is configured in the system with:
date
if not, set the correct date with:
TZ='America/Los_Angeles' sudo date -s '2022-08-26 16:00:00'
Running the SmartCam app
Installing the app
Run the following command to get the list of all the available packages.
sudo xmutil getpkgs
Then install the SmartCam application with the following command. Press 'y' when prompted and wait for all the packages to finish installing.
sudo dnf install packagegroup-kv260-smartcam.noarch
Loading the firmware
Once everything is installed the accelerator bitstream must be loaded:
You can list the available accelerators with:
sudo xmutil listapps
Unload the default dp bitstream first with:
sudo xmutil unloadapp
Now, load the smartcam accelerator:
sudo xmutil loadapp kv260-smartcam
App usage
For using the app with the included AR1335 camera connected to the IAS connector use the following command:
sudo smartcam --mipi -W 1920 -H 1080 -r 30 --target dp
To use a USB camera with the app use the following command:
sudo smartcam --usb 0 -W 1920 -H 1080 -r 30 --target dp
References
You can take a look at the official Xilinx documentation at the following links: