Accessing an overlay from multiple python interpreters

That isn’t my experience. I’ve now updated to pynq 2.7 and of a fresh sd image do the following:

  1. ssh in
  2. sudo ipython
  3. import pynq
  4. pynq.Overlay(path_to_my_bitstream, download=False)
    This results in
    RuntimeError: No Devices Found
    as does executing the command with download=True

I do get the warning
/home/xilinx/pynq/pl_server/device.py:79: UserWarning: No devices found, is the XRT environment sourced?
Looking through systemd services I make my way to pl_server.sh
and see that there are indeed a host of environment variables set via the lines

. /etc/environment
for f in /etc/profile.d/*.sh; do source $f; done

and one of those is xrt_setup.sh. I think my original question is still unanswered.

Without using jupyter AT ALL (I don’t care if it is left running, but assume that no connection to :9090 is ever made after ZCU boot), what is the proper way to go about creating a python program that will connect to and interact with pynq. One program would download and overlay, others would just interact with it. For these latter programs I think the answer given is sufficient. For the first, primary program, it clearly isn’t as I need to get some environment variables configured.

edit: just a quick followup here that running those lines from pl_server.sh while working in a su environment followed by spinning up ipython WAS sufficient to clear the runtime error with and without downloading the overlay.

I think thus my question becomes what of that host of environment specification do I need to incorporate into the startup of my process, which clearly needs to run as root?

1 Like