Tested with Matlab 2010b and Xilinx ISE 13.1, on Ubuntu 11.04 Natty Narwhal (x86_64).
After a distribution upgrade from Maverick to Natty, Simulink loses its ability to simulate using Xilinx blocks, and Xilinx system generator fails during compilation.
Firstly, to get Simulink running properly again you need to symlink gcc to the previous version:
Code:
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
EDIT: N.B. Link back to gcc-4.5 before compiling any kernel modules and/or upgrades (e.g. nVidia dkms modules, VMWare modules, compat-wireless etc), otherwise you can end up with a less-than-usable system.
Next, to get system generator compiling again you need to back up the saferun scripts and modify them. You may need to use locate to find the scripts if not using the default install directory, or are on a 32-bit system.
Code:
locate saferun
sudo cp /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin/saferun /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin/saferun.bak
sudo cp /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin64/saferun /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin64/saferun.bak
Open the first saferun script:
Code:
gksu gedit /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin/saferun
And cut it down so only the first line and last three lines are still present:
Code:
#!/bin/sh
# Now run the executable
cmd=`readlink -f $0`
$cmd.bin "$@"
Repeat for the remaining script:
Code:
gksu gedit /opt/Xilinx/13.1/ISE_DS/ISE/sysgen/bin/lin64/saferun
Another possible solution to the sysgen problem may be to change the interpreter used for sh (use bash instead of dash). I have not tested this personally.
Code:
sudo ls -la /bin/sh
lrwxrwxrwx 1 root root 4 2011-08-10 12:28 /bin/sh -> dash
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
Attached is a short script for launching sysgen (works for default x64 install, modify for your system) for use with a menu launcher.
Any other Natty Matlab/Simulink/Xilinx tips are appreciated.
Bookmarks