Overlay import Error on Zedboard

I built an image for Zedboard using PYNQ v2.3. I am using Vivado, SDK and Petalinux 2018.2.

I did not any prebuilt image file and used only the Petalinux BSP avnet-digilent-zedboard-v2018.2-final.bsp downloaded from Xilinx.

I created a folder Zedboard inside which I put the BSP file and a Zedboard.spec file. The contents of the Zedboard.spec file are:

ARCH_Zedboard := arm
BSP_Zedboard := avnet-digilent-zedboard-v2018.2-final.bsp
BITSTREAM_Zedboard := 

STAGE4_PACKAGES_Zedboard := pynq boot_leds ethernet

I completed the build, after facing few errors during build, thanks to PeterOgden. I burned the image from the output folder onto a 16GB SD card.

I can login to my Zedboard using pynq:9090. However, when I try to import:

from pynq import PL
from pynq import Overlay

ol = Overlay(PL.bitfile_name)

I got the following error:

ConnectionError                           Traceback (most recent call last)
<ipython-input-1-86472a2f9022> in <module>()
      2 from pynq import Overlay
----> 4 ol = Overlay(PL.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/ in bitfile_name(cls)
   1164         """
-> 1165         cls.client_request()
   1166         cls.server_update()
   1167         return cls._bitfile_name

/usr/local/lib/python3.6/dist-packages/pynq/ in client_request(cls, address, key)
   1313         except FileNotFoundError:
   1314             raise ConnectionError(
-> 1315                 "Could not connect to PL server") from None
   1316         cls._bitfile_name, cls._timestamp, \
   1317             cls._ip_dict, cls._gpio_dict, \

ConnectionError: Could not connect to PL server

UPDATE: I solved the error by restarting the Zedboard. But I am now faced with this error:

OSError                                   Traceback (most recent call last)
<ipython-input-3-86472a2f9022> in <module>()
      2 from pynq import Overlay
----> 4 ol = Overlay(PL.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/ in __init__(self, bitfile_name, download, partial, ignore_version)
    290         """
--> 291         super().__init__(bitfile_name, partial)
    293         hwh_path = get_hwh_name(self.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/ in __init__(self, bitfile_name, partial)
   1586         else:
   1587             raise IOError('Bitstream file {} does not exist.'
-> 1588                           .format(bitfile_name))
   1590         self.timestamp = ''

OSError: Bitstream file /usr/local/lib/python3.6/dist-packages/pynq/overlays/.bit does not exist.

Can someone please help?

First, boot_leds is a package that requires you to have some base overlay so LEDs can be flashed after boot. If you don’t have it that service is going to fail. Maybe you have already noticed that.

Second, if you don’t have a base overlay targeting your board, PL.bitfile_name will be empty so ol = Overlay(PL.bitfile_name) won’t work. If you have any bitstream (along with the hwh file), then you can call ol=Overlay('your_bitstream.bit')

Thanks a lot rock . I realised my mistake.

I didn’t configure the PL for the Zedboard properly.

Thanks again,