Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programmable-logic:zybo-z7:demos:petalinux [2022/03/28 21:20] – Update xilinx links Arthur Brown | programmable-logic:zybo-z7:demos:petalinux [2023/08/25 00:29] (current) – Move to direct file links for downloads Arthur Brown | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Zybo Z7 Petalinux Demo ====== | ====== Zybo Z7 Petalinux Demo ====== | ||
- | <WRAP round todo> | + | {{: |
- | === Under Construction === | + | |
- | </ | + | |
===== Description ===== | ===== Description ===== | ||
Line 17: | Line 14: | ||
* HDMI output with KMS (kernel mode setting) | * HDMI output with KMS (kernel mode setting) | ||
* HDMI input via UIO drivers | * HDMI input via UIO drivers | ||
- | | + | * Pcam 5C input via V4L2 drivers |
- | * Audio input | + | |
- | | + | |
---- | ---- | ||
===== Inventory ===== | ===== Inventory ===== | ||
- | * Zybo Z7 (-10 or -20) with a MicroUSB Programming Cable (and external Power Supply) | + | * Zybo Z7 (-10 or -20) with a MicroUSB Programming Cable. |
- | * Vivado installation compatible with the latest release of this demo (2020.1) | + | * Petalinux Installation compatible with the latest release of this demo |
- | * //See [[programmable-logic: | + | * //See Xilinx' |
- | * Vivado and Vitis installations compatible with the latest release of this demo (2020.1) | + | |
- | * //See [[programmable-logic: | + | |
- | * Petalinux Installation compatible with the latest release of this demo (2020.1) | + | |
- | * //See Xilinx' | + | |
* Serial Terminal application to receive messages printed by the demo | * Serial Terminal application to receive messages printed by the demo | ||
* //See [[programmable-logic: | * //See [[programmable-logic: | ||
+ | * Micro SD card formatted as a FAT filesystem | ||
+ | |||
+ | |||
+ | **For the Pcam 5C demo**: | ||
* Pcam 5C to use video for Linux functionality | * Pcam 5C to use video for Linux functionality | ||
+ | * Ethernet cable to retrieve the pictures as .bin files (useful for testing the Ethernet feature as well) | ||
+ | * External 5V power supply | ||
+ | |||
+ | **For testing the HDMI and USB features**: | ||
+ | * 1 HDMI Type A to Type A or HDMI Type A to DVI-D cable | ||
+ | * HDMI or DVI monitor | ||
+ | * Keyboard with USB 2.0 cable | ||
+ | |||
+ | **For changing or extending the hardware platform**: | ||
+ | * Vivado installation compatible with the latest release of this demo | ||
+ | * //See [[programmable-logic: | ||
---- | ---- | ||
Line 44: | Line 50: | ||
**Note:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.// | **Note:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.// | ||
- | ^ Board Variant | + | ^ Board Variant |
- | | Zybo Z7-20 | @# | + | | Zybo Z7-10 | @# |
- | | Zybo Z7-10 | @# | + | | Zybo-Z7-20 | @# |
- | | Zybo Z7-20 | v2017.4-3 | + | | Zybo Z7-10 | 10/ |
- | | Zybo Z7-10 | v2017.4-1 | + | | Zybo Z7-20 | 20/ |
- | | Zybo Z7-20 | v2017.2-1 | + | | Zybo Z7-10 | 10/ |
- | | Zybo Z7-10 | v2017.2-1 | + | | Zybo Z7-20 | 20/ |
+ | | Zybo Z7-20 | v2017.4-3 | ||
+ | | Zybo Z7-10 | v2017.4-1 | ||
+ | | Zybo Z7-20 | v2017.2-1 | ||
+ | | Zybo Z7-10 | v2017.2-1 | ||
- | **Note for Advanced Users:** //All demos for the Zybo Z7 are provided through | + | **Note for Advanced Users:** //GitHub sources |
---- | ---- | ||
Instructions on the use of the latest release can be found in this dropdown: | Instructions on the use of the latest release can be found in this dropdown: | ||
- | --> Using the Latest Release # | + | --> Using the Latest Release #^ |
<WRAP group> | <WRAP group> | ||
{{page> | {{page> | ||
+ | |||
+ | --> (Alternative for building the project) Use the pre-built image # | ||
+ | |||
+ | **Note**: This procedure only works if you are using the .bsp release. If you cloned the project source directly from GitHub, skip this section. | ||
+ | |||
+ | If the project created from the .bsp release contains the // | ||
+ | |||
+ | ---- | ||
+ | <-- | ||
--> Set up the Zybo Z7-20 # | --> Set up the Zybo Z7-20 # | ||
- | Attach the Pcam 5C assembly (which includes the Pcam 5C and the attached 15-pin flat flexible cable) by inserting the other end of the FFC into the Pcam connector | + | **Set up for booting Petalinux |
- | {{: | + | * Plug the Zybo Z7-20 into the computer via the microUSB programming cable and power on the board (you can also use an external power supply, but make sure the JP6 is set properly). Make sure the JP5 jumper is set to SD. Use the steps described in //Booting Petalinux on a Zynq Board//. |
+ | ** Additional set up for the Pcam 5C demo: ** | ||
+ | |||
+ | * Make sure you are powering the Zybo Z7-20 with an external 5V power supply and have the JP6 jumper on the **WALL** option. | ||
+ | * For retrieving the pictures you can use multiple procedures described in the //Using the demo// section. | ||
+ | * Attach the Pcam 5C assembly (which includes the Pcam 5C and the attached 15-pin flat flexible cable) by inserting the other end of the FFC into the Pcam connector on the Zybo Z7 as shown in image below. Ensure the cable is securely latched by pressing down firmly on the connector with two fingers. For a more detailed set of instructions, | ||
+ | |||
+ | {{: | ||
---- | ---- | ||
<-- | <-- | ||
Line 89: | Line 115: | ||
---- | ---- | ||
===== Using the demo ===== | ===== Using the demo ===== | ||
+ | |||
+ | The functionality of the demo features are presented in the sections below. | ||
+ | |||
+ | --> Testing the Ethernet connection # | ||
+ | <WRAP group> | ||
+ | |||
+ | After you connect the Ethernet cable to the network (wall outlet, router, PC) run the following command in the serial terminal. You can choose as address your PC's Ethernet or Wi-Fi IP address (depending on how your PC is connected to the network). | ||
+ | |||
+ | < | ||
+ | ping < | ||
+ | </ | ||
+ | |||
+ | Upon success you should see no packet loss. | ||
+ | |||
+ | Alternatively you can run the command: | ||
+ | |||
+ | < | ||
+ | ip a | ||
+ | </ | ||
+ | |||
+ | If there is a successful connection, you should be able to read the board' | ||
+ | |||
+ | < | ||
+ | 2: eth0: (...) | ||
+ | (...) | ||
+ | inet <ip address> | ||
+ | (...) | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | <-- | ||
+ | |||
+ | --> Testing the USB support # | ||
+ | <WRAP group> | ||
+ | For testing USB support you can insert a FAT-formatted USB stick into the board' | ||
+ | If the device is detected you should see in the terminal a message similar to: | ||
+ | < | ||
+ | usb-storage 1-1:1.0: USB Mass Storage device detected | ||
+ | </ | ||
+ | |||
+ | Next, run the command | ||
+ | < | ||
+ | fdisk -l | ||
+ | </ | ||
+ | |||
+ | This way you can identify the device location, e.g. /dev/sda1. If that location is different in your case, you should use it instead of /dev/sda1 next. | ||
+ | |||
+ | To mount the USB drive you should run the following commands | ||
+ | < | ||
+ | mkdir / | ||
+ | mount /dev/sda1 / | ||
+ | </ | ||
+ | You could use that directory to transfer data between the board and your PC. | ||
+ | |||
+ | Before removing the USB stick from the board you can unmount it using the command | ||
+ | < | ||
+ | umount / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | <-- | ||
+ | |||
+ | --> Testing the LEDs, switches and buttons using UIO drivers # | ||
+ | <WRAP group> | ||
+ | </ | ||
+ | |||
+ | The boards LEDs, switches and buttons can be accessed through UIO drivers. In some of the earlier versions of the project (before 2020) a series of [[https:// | ||
+ | |||
+ | <-- | ||
+ | |||
+ | --> Testing the SSH server# | ||
+ | <WRAP group> | ||
+ | |||
+ | One way to test the SSH server is to connect to the board from your PC via SSH. | ||
+ | |||
+ | First, get your board' | ||
+ | < | ||
+ | ssh root@< | ||
+ | </ | ||
+ | |||
+ | You should be able to interact with the linux environment similarly to the serial terminal. | ||
+ | |||
+ | </ | ||
+ | |||
+ | <-- | ||
+ | |||
+ | --> Testing the packages # | ||
+ | <WRAP group> | ||
+ | |||
+ | To view all installed packages run the command | ||
+ | < | ||
+ | ls /usr/bin | ||
+ | </ | ||
+ | |||
+ | For testing for instance your gcc package you can try to create and compile a C source file. | ||
+ | Create a source file: | ||
+ | < | ||
+ | cd ~ | ||
+ | touch source_file.c | ||
+ | </ | ||
+ | Open it using the vi editor: | ||
+ | < | ||
+ | vi source_file.c | ||
+ | </ | ||
+ | Insert a simple C program code. Press **i** and copy-paste the following code using **Ctrl+Insert** - **Shift+Insert**: | ||
+ | < | ||
+ | #include < | ||
+ | |||
+ | int main() { | ||
+ | printf(" | ||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | Save it by pressing **Esc** and typing **:wq** | ||
+ | |||
+ | Compile and run it | ||
+ | < | ||
+ | gcc source_file.c -o my_app | ||
+ | ./my_app | ||
+ | </ | ||
+ | |||
+ | Upon success you should see the output: Hello World | ||
+ | |||
+ | </ | ||
+ | |||
+ | <-- | ||
+ | |||
+ | --> Testing the HDMI output and USB input from keyboard # | ||
+ | <WRAP group> | ||
+ | </ | ||
+ | |||
+ | To test the HDMI output with kernel mode setting, connect a HDMI cable between your HDMI TX port and an HDMI monitor. Next, connect your keyboard to the USB port. | ||
+ | |||
+ | You should be able to use the monitor the same way as the serial terminal, type in commands using the connected keyboard and access all features in the demo. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | **Note**: For the HDMI input there is currently no demo application that uses the UIO drivers. | ||
+ | |||
+ | <-- | ||
--> Taking pictures using V4L2 and the Pcam 5C (Z7-20 only) # | --> Taking pictures using V4L2 and the Pcam 5C (Z7-20 only) # | ||
<WRAP group> | <WRAP group> | ||
+ | |||
Run the following commands in the serial console connected to your board. | Run the following commands in the serial console connected to your board. | ||
- | Set the width, height, and framerate | + | **Set the width, height, and frame rate of your capture.** |
< | < | ||
width=1920 && height=1080 && rate=15 | width=1920 && height=1080 && rate=15 | ||
</ | </ | ||
- | Prepare your media and video pipeline. | + | Before running the next commands make sure to use arguments that correspond to the data in the device topology. |
+ | To view the information about the video device run the command: | ||
+ | < | ||
+ | media-ctl /dev/media0 -p | ||
+ | </ | ||
+ | |||
+ | You should be able to view the device topology with various entities and pads. Pay attention to the **ov5640 2-003c** and **43c60000.mipi_csi2_rx_subsystem** entities whose names could slightly change. If any of the names differ from the ones used in the commands below make sure to modify them to include the correct name. | ||
+ | |||
+ | **Prepare your media and video pipeline.** | ||
< | < | ||
media-ctl -d /dev/media0 -V '" | media-ctl -d /dev/media0 -V '" | ||
Line 106: | Line 284: | ||
</ | </ | ||
- | Capture 14 frames. | + | **Capture 14 frames.** |
< | < | ||
yavta -c14 -f YUYV -s " | yavta -c14 -f YUYV -s " | ||
</ | </ | ||
+ | |||
+ | As a result you should obtain 14 .bin files | ||
<WRAP round important> | <WRAP round important> | ||
Line 121: | Line 301: | ||
--> Retrieving the pictures # | --> Retrieving the pictures # | ||
<WRAP group> | <WRAP group> | ||
- | Run the following commands in a terminal on your Linux machine. | ||
- | Copy the .bin files produced by the capture commands | + | To retrieve the pictures you need to transfer |
+ | |||
+ | Make sure no data was lost during the transfer of the files. | ||
+ | |||
+ | Run the following commands in a terminal on your Linux machine | ||
Replace 10.113.0.117 with your board' | Replace 10.113.0.117 with your board' | ||
Line 131: | Line 314: | ||
<WRAP round tip> | <WRAP round tip> | ||
- | You can find the IP address of your board by running the following command in your serial console. | + | You can also find the IP address of your board by running the following command in your serial console. |
< | < | ||
ip addr show | ip addr show | ||
Line 151: | Line 334: | ||
<-- | <-- | ||
- | --> Audio input / output # | + | --> |
<WRAP group> | <WRAP group> | ||
+ | <WRAP round important> | ||
+ | ==Warning== | ||
+ | Audio features are currently completely non-functional. | ||
+ | </ | ||
+ | |||
Run the following commands in the serial console connected to your board. | Run the following commands in the serial console connected to your board. | ||
Line 181: | Line 369: | ||
For additional and in-depth information about how Petalinux works please consult the [[https:// | For additional and in-depth information about how Petalinux works please consult the [[https:// | ||
- | For technical support, please visit the [[https:// | + | For technical support, please visit the [[https:// |
---- | ---- | ||
- | < | + | {{tag> |