"No devices found, XRT environment sourced?" Error

Hi everyone,

I am trying to use “pynq server start” but faced with this error. I tried to add “echo XILINX_XRT/usr >> /etc/environment” to the environment file but it is not worked. Any advice?

Some more info here would really help.

Are you running this on a VM?

What version of PYNQ, how have you installed it, what hardware are you running PYNQ on?


1 Like

I also experience the same error as Tyler1 describes. And tried a few ways to understand it.
I’m using an enclustra Ultrascale module on a custom board, think this is not so important for this problem.
And I’m using a pre-built aarch64 pynq 2.7 image with ethernet access, using a point to point link to a windows machine running firefox web browser. jupiter server runs fine and I can run simple python commands. I use following piece of code to generate an overlay:

from pynq import Overlay
import numpy as np
import struct

overlay = Overlay("/home/xilinx/jupyter_notebooks/base/base.bit")

Which produces following error:
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/device.py:79: UserWarning: No devices found, is the XRT environment sourced?

It is not clear how to source the XRT environement, and I do not find docs on this, a pointer to a solution would be helpfull.

I digged a bit deeper into the problem but no success:
I see that a number of custom libraries are used, and see that following lib is a likely cause:
This lib is not included in the pre-built pynq 2.7 image
And doing a sudo apt install xrt-embedded fails on pynq 2.7 to install the xrt-embedded package, which contains this library

I also found a recommended solution in PYNQ on TE0726-03 (trenz-electronic.de), did not try it since it does not seem to address the /usr/lib/libxrt_core.so issue


Did you include xrt on your STAGE4 packages? PYNQ custom image v2.7 for Zedboard no device found error - #5 by marioruiz


Thanks for mentioning this Mario!! Can you modifye STAGE4 packages for a pre-built pynq 2.7 package?? Should I do this as a patch in the sdbuild/build directory? I use the sbuild/scripts/image_from_prebuilt.sh since I experienced serveral missing packages for a fresh pynq-2.7 build.

in the build dir I see some yocto packages for xrt
Are these sufficient?? (using a pre built python 3.7 image for aarch64)

find . -name “xrt

You need to add xrt in the STAGE4_PACKAGES within the .spec file.

If you follow the thread I linked above I provided a few debugging steps.

@marioruiz I did not make a spec file nor a board dir
Is the spec file used in the image_from_prebuilt.sh script?? That is not so clear for me since I can complete a build without having these. Simply put: is the board parameter also used to use the spec file and other information of a board?

~/pynq/PYNQ/sdbuild$ bash scripts/image_from_prebuilt.sh
scripts/image_from_prebuilt.sh board bsp_file arch prebuilt

Script for generating a board-specific image from a board agnostic prebuilt image

board : The name of the board
bsp_file : The BSP file to use
arch : The architecture of the system - either arm or aarch64
prebuilt : The image to use as a base

@marioruiz OK, had a more detailed look at the quick porting guide of Peter and see that it is possible to use a SPEC file. Will re-generate my image with a SPEC file according to your recommendations. Thanks!!


Documentation on building the SD Card here PYNQ/sdbuild at master · Xilinx/PYNQ · GitHub and here PYNQ SD Card image — Python productivity for Zynq (Pynq)


Hello Mario,

While a fast built with the scripts/image_from_prebuilt.sh succeeds, it lacked xrt support and threw a pynq error when attemting to load an Overlay bitfile.

Upon your recommendation I tried to do a build with a pre-made pynq 2.7 image. This fails however. See the ERROR LOG below. Am I doing something wrong:

Here the file tree in sdbuild
├── pynq_aarch64_2_7
└── xu1_2020
├── enclustra1_xu1_2020.bsp
└── xu1_2020.spec

And the command that I call to build the pynq 2.7 image
make BOARDDIR=enclustra PREBUILT=enclustra/pynq_aarch64_2_7 nocheck_images BOARDS=xu1_2020 nocheck_images

The content of xu1_2020.spec is
BOARD := xu1_2020
ARCH_${BOARD} := aarch64
BSP_${BOARD} := enclustra1_xu1_2020.bsp
STAGE4_PACKAGES_${BOARD} := ethernet pynq xrt usbgadget

(without FPGA_MANAGER setting it also fails)
the error log is not so clear to me about what is going wrong. And the build ends with:
make: *** [/home/rootuser/pynq/PYNQ/sdbuild/build/xu1_2020.tar.gz] Error 2

Am I doeing something the wrong way?


source run_ippack.tcl -notrace
bad lexical cast: source type value could not be interpreted as target
while executing
“rdi::set_property core_revision 2204251359 {component component_1}”
invoked from within
“set_property core_revision $Revision $core”
(file “run_ippack.tcl” line 937)
INFO: [Common 17-206] Exiting Vivado at Mon Apr 25 14:00:04 2022…
ERROR: [IMPL 213-28] Failed to generate IP.
INFO: [HLS 200-111] Finished Command export_design CPU user time: 8.94 seconds. CPU system time: 0.49 seconds. Elapsed time: 7.83 seconds; current allocated memory: 167.753 MB.
command ‘ap_source’ returned error code
while executing
“source color_convert/script.tcl”
(“uplevel” body line 1)
invoked from within
"uplevel #0 [list source $arg] "

INFO: [HLS 200-112] Total CPU user time: 21.39 seconds. Total CPU system time: 1.36 seconds. Total elapsed time: 20.08 seconds; peak allocated memory: 163.941 MB.
INFO: [Common 17-206] Exiting vitis_hls at Mon Apr 25 14:00:04 2022…
child process exited abnormally
INFO: [Common 17-206] Exiting Vivado at Mon Apr 25 14:00:05 2022…
makefile:10: recipe for target ‘hls_ip’ failed
make[1]: *** [hls_ip] Error 1
make[1]: Leaving directory ‘/home/rootuser/pynq/PYNQ/sdbuild/build/PYNQ/boards/Pynq-Z2/base’

  • unmount_special
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/proc
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/run
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/dev
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/ccache
  • rmdir /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/ccache
    Makefile:343: recipe for target ‘/home/rootuser/pynq/PYNQ/sdbuild/build/xu1_2020.tar.gz’ failed
    make: *** [/home/rootuser/pynq/PYNQ/sdbuild/build/xu1_2020.tar.gz] Error 2
1 Like


Did you patch Vivado for the Y2K22 bug? https://support.xilinx.com/s/article/76960?language=en_US



No I did not patch Vivado, thanks for the quick response and pointing to this bug fix!!
I’ll try it tomorrow.


I will suggest you get a fresh copy of the repository to avoid any kind of problems with temporary files.


Is a sudo make clean in the sdbuild directory not sufficient?

No, it is not. This is a bug that showed up after we released. There’s no easy way of cleaning the HLS projects for now

@marioruiz - Do I need to uninstall/remove VIVADO and reinstall, or is it sufficient to remove the PYNQ repository only?

Patch Vivado and get a fresh copy of the PYNQ repository. No need to reinstall Vivado

Thanks for all your patient and quick responses @marioruiz - I’ll try this tomorrow or Wednesday.


with the Vivado y2k22 patch and a fresh pynq 2.7 the IP error is solved.
ERROR: [IMPL 213-28] Failed to generate IP. => do not see this anymore.

Unfortunately the pynq 2.7 build does still not succeed. Error log below.
Is there something else I do wrong? I used the same settings as in the error log above.

I also did a commit in my local git of the board folder with bsp and spec file (and no other files)

  • sudo cp /home/rootuser/pynq/PYNQ/sdbuild/packages/pynq/pl_server.sh /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/usr/local/bin
  • sudo cp /home/rootuser/pynq/PYNQ/sdbuild/packages/pynq/pl_server.service /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/lib/systemd/system
  • sudo cp /home/rootuser/pynq/PYNQ/sdbuild/packages/pynq/pynq_hostname.sh /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/usr/local/bin
  • sudo cp /home/rootuser/pynq/PYNQ/sdbuild/packages/pynq/boardname.sh /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/etc/profile.d
    ++ date +%Y_%m_%d
    ++ git rev-parse --short=7 --verify HEAD
  • echo ‘Release 2022_04_26 4d3aeee’
  • ‘[’ xu1_2020 ‘!=’ Unknown ‘]’
  • cd enclustra/xu1_2020
  • git tag
  • ‘[’ 0 -eq 0 ‘]’
    ++ date +%Y_%m_%d
    ++ git rev-parse --short=7 --verify HEAD
    ++ git config --get remote.origin.url
  • echo ‘Board 2022_04_26’ 4d3aeee GitHub - Xilinx/PYNQ: Python Productivity for ZYNQ
  • ‘[’ ‘!’ -d /home/rootuser/pynq/PYNQ/sdbuild/build/PYNQ/boards/xu1_2020 ‘]’
  • cp -rf enclustra/xu1_2020 /home/rootuser/pynq/PYNQ/sdbuild/build/PYNQ/boards/xu1_2020
    cp: cannot stat ‘enclustra/xu1_2020’: No such file or directory
  • unmount_special
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/proc
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/run
  • for fs in $fss
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/dev
  • sudo umount -l /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/ccache
  • rmdir /home/rootuser/pynq/PYNQ/sdbuild/build/focal.xu1_2020/ccache
    Makefile:343: recipe for target ‘/home/rootuser/pynq/PYNQ/sdbuild/build/xu1_2020.tar.gz’ failed
    make: *** [/home/rootuser/pynq/PYNQ/sdbuild/build/xu1_2020.tar.gz] Error 1
1 Like