E-box/Install manual: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 87: Line 87:


Check your permissions:
Check your permissions:
  ls-l
  ls -l




Make sure the installation files are executable and change your permissions if necessary:
Make sure the installation files are executable and change your permissions if necessary:
  chmod 755-R  /home/username/matlab2007b
  chmod 755 -R  /home/username/matlab2007b


    
    
Line 113: Line 113:
  Password:
  Password:
  cd /usr/bin
  cd /usr/bin
  ln-s /usr/local/matlab75/bin/./matlab /bin/matlab
  ln -s /usr/local/matlab75/bin/./matlab /bin/matlab





Revision as of 16:00, 10 June 2011

This page contains the neccesary step to install a realtime linux system with EtherCAT

Installing a linux distribution

Ubuntu 10.04 LTS

Ubuntu.jpg

Ubuntu is an operating system developed by the Ubuntu community. Based on Linux and GNU software Ubuntu is perfect for most PC's and laptops. It contains all the applications you need, a modern web browser, email package, programs for photo editing and important to us: all the tools for programming. Ubuntu is developed with focus on security. LTS (Long Term Support) versions will be three years provided with security updates. These LTS versions are free and available for everyone. Upgrades to new versions of Ubuntu will always be free.


This part describes how to install and configure Ubuntu 10.04LTS with rt-kernel. The last LTS (Long Term Support) version with rt support during the writing of this document is Ubuntu version 10.04 (Lucid Lynx). It is also possible to install Ubuntu Studio. This version for audio- and video editing is still equipped with the Linux kernel-rt


Download and install ubuntu-desktop-amd64.iso 10.04.2 (64 bits) or ubuntu-10.04.2-desktop-i386.iso (32 bits):

http://www.ubuntu-nl.org/getubuntu/download/LTS  or  http://releases.ubuntu.com


Download the latest updates via the Synaptic Package Manager. Package updates are allowed. Do not upgrade e to a higher Ubuntu version eg 10.10. Download and install Linux-rt via the Synapic Package Manager. Restart Ubuntu and repeatedly press the Shift button. You'll come into the Grub boot manager menu. Select the rt kernel version.

Check the kernel version in a terminal with:

uname -r

respons: kernelversion-rt

2.6.31-11-rt

Required packages

Download and install via the Synaptic Package manager:

Nautilus file browser. (This is useful as superuser)
gcc and g++ 4.1 (For Matlab 2007b)
java-1.6.0-sun or sun-java6-bin (using Matlab and  smartSVN)

Some packages are not available with the default settings. Check also: Pre-released updates (lucid Proposed) and unsupported updates.

Synaptic.jpg

Check java version:

java -version


Two versions of gcc and g++ are installed. These are gcc and g++ 4.1 and 4.3. The default version is probably the highest 4.3. Matlab2007b MEX only works with gcc and g++ version 4.0 to 4.2.


Check the default used version:

gcc --version
g++ --version


Force a symbolic link to version 4.1 in the /usr/bin directory:

cd /usr/bin
ln -sf gcc -4.1 gcc
ln -sf g++ -4.1 g++

Installing Matlab

Currently two versions of Matlab are supported: 2007b and 2010a (experimental support only). Choose a supported version.

Installing Matlab 2007b

Matlab 2007b is availiable at:

\\wtbfiler\Software\Unix-Software\matlab2007b


Use samba to the connect the wtbfiler:

taskbar, places, connect to server, windows share (samba) 

Type server wtbfiler, leave the other fields empty and connect. Domain Name, Username and Password should be filled on the next page otherwise it will not work.

Samba.jpg


Copy the Matlab folder temporarily to your Home directory.

Check your permissions:

ls -l


Make sure the installation files are executable and change your permissions if necessary:

chmod 755 -R  /home/username/matlab2007b


Create a new directory:

mkdir /usr/local/matlab75

copy the licence.dat in this directory.

It's possible to do this on the commandline. It is more convienient to use the Nautilus file browser. Open a new terminal start nautilus and copy the file:

sudo nautilus
Password:


Open a terminal and install Matlab2007b:

sudo ./install


Create a symbolic link for matlab in /usr/bin (Matlab starts from any directory):

sudo su
Password:
cd /usr/bin
ln -s /usr/local/matlab75/bin/./matlab /bin/matlab


Start Matlab:

 matlab


If your matlab code is invisible set the visual effects in Ubuntu to none:

 System, Preferences, Appearance, Visual Effects


For MEX we need g++ and gcc 4.1. Force matlab to use the gcc compiler by:

 >> mex-setup

Mex.jpg

Option 2: gcc MEX files

Matlab is installed and configured.

Getting the software

Install smartsvn

https://e-box.wtb.tue.nl/svn/e-box/

After updating your local copy, run

make_all_clean
make_all_install

in Matlab to obtain a fresh copy of the latest verion.