I am currently developing a project using PYNQ v3.0.1 on a Zynq-7000 SoC (XC7Z020) board. As part of the system architecture, I start a Flask server automatically during boot using a systemd
service. This service executes a Python script (app.py
) which initializes the PYNQ environment and loads a custom overlay (bitstream) using the Overlay
class.
However, when the script is started via the systemd
service, I encounter the following error during the overlay loading step:
RuntimeError: No Device Found
In contrast, when I manually execute the same app.py
script from the terminal (using the same environment and user), the overlay is successfully downloaded and the Flask server runs as expected.
To isolate the issue, I ensured that:
- The
systemd
service is executed as thexilinx
user. - The appropriate environment variables and virtual environment for PYNQ are sourced in the service.
- The FPGA overlay file is accessible and correctly specified.
- The script executes correctly outside of the
systemd
context.
Summary:
- Board: Zynq-7000 XC7Z020
- PYNQ Version: 3.0.1
- Problem:
Overlay
fails withRuntimeError: No Devices Found
when executed viasystemd
, but works when run manually. - Suspected Cause: Systemd service environment or hardware context not matching interactive shell.
Are there any suggestions for solving this problem to use PYNQ under systemd?
Thanks!