Bringing up ZC706/FMCOMMS5 with PYNQ

I am trying to bring up the ZC706/FMCOMMS5 SDR combination. I have modified the ADI HDL Reference Design and generated a bitstream in Vivado 2020.2, and I’m dying to load and operate the bitstream in PYNQ.

I have successfully built the PYNQ 2.7 boot files from source (using the custom XSA in lieu of a BSP); however, even building libiio from source according to ADI’s directions fails to detect the FMCOMMS5 in iio_info, which only displays the ZC706 xadc. ADI seems to require the meta-adi-core and meta-adi-xilinx Yocto user layers be added for libiio to be installed correctly.

I also have tried the steps outlined in Peter Ogden’s excellent post Deploying PYNQ and Jupyter with Petalinux - Learn - PYNQ–with a couple of modifications. First, since I didn’t have a BSP, instead of executing the line

petalinux-create -t project -s xilinx-zcu104-v2019.2-final.bsp

I created the project using the first step in ADI’s instructions for adding meta-adi-core and meta-adi-xilinx Yocto layers:

petalinux-create -t project --template zynq --name ZC706redux
then
petalinux-config --get-hw-description=/home/jim/hardware (path to XSA folder)

The second modification was to skip the steps beginning with “Creating a recipe for PYNQ-Helloworld” because that example is not compatible with the ZC706, and the build fails.

Even so, I didn’t make it to the step of petalinux-build this time, as a warning and an error were generated at the

petalinux-config -c kernel step. First, even though system.xsa has been copied to /project-spec/hw-description/ I received the warning:

WARNING: /home/jim/ZC706A/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...

along with the error:

ERROR: Nothing RPROVIDES 'libiio-python3' (but /home/jim/ZC706A/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)

I became quite fond of PYNQ using the ZCU111, but current projects require use of the ZC706/FMCOMMS5 combination. Any and all help is greatly appreciated!

Hi there,

There’s quite a rich readme on the ADI meta layer repo that might be helpful to sort out some of the device tree issues.

There’s also a few ADI forum posts that have relevant info to your issue in the comments: How to add AD9361 driver after making Linux system with Petalinux2017.4 tool - Q&A - Linux Software Drivers - EngineerZone and meta-adi with custom board - Q&A - Linux Software Drivers - EngineerZone

It appears that there are only 2019 tool version branches on the ADI github repo, which means you might have to downgrade the tools and use an older version of pynq if you want to be compatible with their drivers. Can’t say how easy it would be to integrate into 2020.2 pynq.

Thanks
Shawn

1 Like

The adi master allegedly supports Petalinux 2021.1. Still looking for answers on how to bring up PYNQ!

Thanks
Jim

2021.1 version of the tools isn’t supported with the current pynq build flow, you would need a 2020.2 version of the bsp and complementary ADI meta layer versions.

Ideally you would download the xilinx zc706 bsp and make a new board folder in pynq/boards/ZC706, where the petalinux_bsp folder would contain the ADI layers and patches, but you are likely to run into a lot of incompatibility issues (again 2021.1 isn’t supported).

If you look at the meta-adi-xilinx layer it uses the same linux version as pynq 2.5, so it would likely be the best bet for compatibility.

Thanks
Shawn

1 Like

Yup. Already tried that, using Petalinux 2019.1 and the ADI HDL 2019_R2 generated under Vivado 2019.1. Got an error eerily similar to this poor guy (who is still waiting for an official answer)… Petalinux issue could not apply patches for plnx-zynq7 (xilinx.com)

The only difference was, poster’s error concerns pmbus.c, while the patch I consistently have trouble with is for gpio.c.

1 Like

Would need to look at what file it’s patching and changes are being made. You could try running it without the patch and just see how far you can get, and if everything else passes, go back and resolve it.

Also, quick note on your first post (if sticking with meta-pynq approach) – have you ran

echo "KERNEL_DTB=\"${dts_to_use}\"" >> project-spec/meta-user/conf/petalinuxbsp.conf

Like outlined in the adi repo readme?

Thanks
Shawn

1 Like

Shawn,

Yes, I have done that. Turns out both Petalinux and Yocto both need to know the location of the device tree to get the job done.

I am starting over by rebuilding the hdl_2021_r1 branch of the ADI HDL reference design in Vivado 2021.1, then building the master branch of meta-adi in Petalinux 2021.1, both as recommended and supported. Then, hopefully, I can try pulling in the meta-pynq layer for the win. I’ll let you know what happens. And thank you for your responses!

Jim