Xilinx Workarounds
- Ian Gray
- Russell Joyce (Deactivated)
The purpose of this page is to document workarounds for issues with the various Xilinx tools that we use.
[HLS 2014.3+, SDK] Vivado HLS crashing on startup
If HLS crashes on startup and the error log notes a crash in libgdk then export the following evironment variable before running vivado_hls
:
export SWT_GTK3=0
[SDK 2016.2 (and maybe others)] Segfault on launch
On Ubuntu 16.04 (and possibly others) SDK will crash on launch due to GTK and Eclipse problems (similar to HLS issue above).
To fix this, export the following environment variable before running Vivado/SDK:
export SWT_GTK3=0
[HLS 2013.x onwards] Vivado HLS cannot compile testbenches (Cannot find crt1.o)
If you get an error along the lines of "cannot find crt1.o", click "Project" in the top menu, then Project Settings. Within this box, click "Simulation" on the left, then paste the following into the "Linker Flags" box:
-B"/usr/lib/x86_64-linux-gnu/"
[Vivado (All Versions)] Cannot change MicroBlaze Interrupt Polarity/Type
In Vivado's MicroBlaze config, it is typically impossible to change between edge/level triggered interrupts, and to change the polarity.
To change these, ensure that the external pin that the Interrupt line is connected to is of type "interrupt" (can be changed when creating the pin), then click the pin and go to "properties" in the middle-left panel. Under "CONFIG", change "SENSITIVITY" from "LEVEL_HIGH" to "EDGE_RISING" to change edge vs level interrupts. I assume that "LEVEL_LOW" and "EDGE_FALLING" are also valid values, although the set of valid values doesn't appear to be listed anywhere.
[Vivado (All Versions)] IP Integrator crashes when using Xpra
When you have the "add IP" floating window open (or anything with a miniature title-bar), it was never meant to have an OS chrome added to it (and it's being added by Xpra).
DO NOT PRESS THE WINDOW MANAGER CLOSE BUTTON ON THESE WINDOWS. Pressing the window manager's close button will cause the whole of Vivado to crash.
[Vivado (All Versions)] Vivado crashes with NullReferenceException on startup
Not a clue here, I assume it's a corrupted recently used list. The easiest fix is simply to remove the .Xil
and .Xilinx
folders from your home directory.
[ISE (All Versions)] Install Xilinx cable drivers on "unsupported" configurations
The Xilinx cable driver install scripts tend not to work on modern operating systems, or if they do, unpack udev rules which do not work on modern operating systems. Xilinx's official line is "these platforms are unsupported", but it can be worked around.
Use the following set of commands (as root) to manually set these up:
# Ensure fxload is installed using your platform's package manager apt-get install fxload OR yum install fxload # Copy firmware to a better location cp /opt/Xilinx/<VERSION>/ISE_DS/ISE/bin/lin/install_script/install_drivers/linux_drivers/pcusb/*.hex /usr/share # Create UDEV rules cat > /etc/udev/rules.d/80-xilinx.rules <<'EOF' # version 0003 ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode" SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode" EOF # Reload udev rules udevadm control --reload-rules # Make libusb actually accessible (sometimes required) ln -s /lib/libusb-1.0.so.0 /lib/libusb.so
Note: these commands have been tested on Debian 6 and 7, and various Ubuntu versions. They may not fully work on yum based platforms, and may require paths to be changed on all platforms.
Important: Linking system libraries in this way is not recommended. If programs depending on libUSB fail after making this tweak, remove the symlink added and use a different method (e.g. add the symlink in a different folder and add to LD_LIBRARY_PATH as needed. Using LD_PRELOAD with the target library may also work).
[ISE (All Versions)] Multiple bash/shell errors
Debian and Ubuntu based platforms may see bash syntax errors when sourcing init scripts, installing tools, or other things. This is because these platforms actually use dash in the place of bash, which isn't 100% compatible.
Issue the following command to fix, choosing "no" at the prompt in order to make real bash the default shell again.
sudo dpkg-reconfigure dash
Similar errors can also occur when sourcing the setup scripts from other shells (e.g. zsh), which can be fixed by temporarily using a bash shell instead.
[ISE/Vivado (All Versions)] Help! I can't use program xyz after sourcing the init scripts!
If you get an error along the lines of the following:
libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by XXX)
This is because Xilinx ship a full set of system libraries with ISE/Vivado which get exported into your environment. These then pollute the current shell, causing weird behaviour with programs compiled against a newer libc ABI. These problems have been seen when trying to use any of the apt tools, or anything which depends on libboost.
Experimentation has shown that the Xilinx tools work fine with the standard Debian system libraries, and so $LD_LIBRARY_PATH
can be unset (by running unset LD_LIBRARY_PATH
).
If you encounter this error often, or you already have a custom LD_LIBRARY_PATH
, you can wrap the init script as follows and source this instead:
OLD_LIBPATH=$LD_LIBRARY_PATH source /path/to/xilinx/settings64.sh export LD_LIBRARY_PATH=$OLD_LIBPATH
Caution: This is a dangerous hack/workaround. This seems to work on certain systems, but it can't be guaranteed and might cause issues with the Xilinx tools. It is probably safer just to keep a separate shell open for Xilinx work and source the setup scripts only in this.
[SDK (All Versions)] Cannot find gmake
This is caused by Xilinx's tools invoking gmake
instead of make
.
If you have root, simply install the gmake
package. If not, create a manual link to gmake as follows:
# Create somewhere in our home directory as our local bin location cd ~ mkdir localbin cd localbin # Link gmake to system make ln -s `which make` gmake # Source on each shell start echo "export PATH=`pwd`:$PATH" >> ~/.profile
Then restart your shell and all Xilinx tools. If you start the tools from a graphical environment, you may need to log out and back in again.
[HLS (Some Versions)] Add to include paths / edit build configuration
When attempting to edit the build configuration (i.e. adding a -I
include path) in the HLS GUI, you will notice that your changes are forgotten every time you actually try to build the project.
It appears that project settings are stored in the files vivado_hls.app
, .project
, .cproject
, and <solution_name>/script.tcl
.
You can try to edit them all, but easier is to edit the <solution_name>/script.tcl
file and then invoke HLS from the command line:
vivado_hls -f project_name/solution_name/script.tcl
Note that HLS expects to be invoked from the directory above your project directory. This will regenerate the project metadata using the TCL script as canonical.
To add include paths, edit the add_files
commands in the TCL script to include a -cflags
option, as below:
add_files project_name/src/file.cpp -cflags "-Iproject_name/include/."
[SDK (All Versions)] Cannot generate BSP
On certain Linux builds (e.g. LMDE), SDK will throw an error when creating a new project with a BSP, because it needs 32-bit libz.
To fix this, install the i386 libz-dev
package:
sudo apt-get install libz-dev:i386
[Vivado (All Versions)] Horrible font rendering on some systems
For some reason, the Java font smoothing in Vivado on some Linux systems is completely broken, resulting in text being incredibly jagged and messy.
As a workaround, the JRE can be modified to use basic font smoothing as its default, which results in text that's not as nice as it could be, but better than the alternative.
For details on how to do this, see this Stack Overflow question. This does seem to fix the problem, but messing with the JRE source probably isn't sustainable or recommended.
[Vivado (All Versions)] Internal exception in "Create and Package New IP" wizard
To fix this, go to Project Settings -> IP -> Packager and set the vendor to something other than "(none)" as it doesn't seem to like the brackets in this default name.
For more info, see this Xilinx forum thread.
[Vivado (All Versions)] Segfault on launch
On some Linux systems, Vivado will segfault on launch when the GNOME_DESKTOP_SESSION_ID
variable is set.
To fix this, unset the variable in your shell before running Vivado:
unset GNOME_DESKTOP_SESSION_ID
[ISE 14.3 (and possibly others)] Certain tools crash during design implementation
On some Linux systems with certain versions of glibc, implementation will crash with error post_par_trce: application received signal 6
in the console and the following in the parent terminal:
*** glibc detected *** /opt/Xilinx/14.3/ISE_DS/ISE/bin/lin64/unwrapped/trce: double free or corruption (!prev)
Based on suggestions from here, this can be fixed by running the following before launching XPS/ISE (change '14.3' as appropriate for other versions):
export LD_PRELOAD=/opt/Xilinx/14.3/ISE_DS/ISE/lib/lin64/libstdc++.so.6:/opt/Xilinx/14.3/ISE_DS/ISE/lib/lin64/libTw.so
Important note: Xilinx SDK will not build projects when LD_PRELOAD is set like this. Do not launch SDK from within XPS after setting this environment variable - clear it first and run xsdk
separately.