Skip to content

Building DART v0.1 Software

sagarchaki edited this page Nov 17, 2015 · 2 revisions

These instructions have been tested on freshly installed VMs of Xubuntu 14.04 and 15.04.

Quick Install

If you just want to play around with DMPL, run the following commands. This requires no superuser privileges, and installs a statically compiled version of dmplc along with examples:

cd /tmp
git clone https://github.com/cps-sei/dart.git
cd dart
./install-dmplc-static.sh $HOME/dart-install

Note that the argument to install-dmplc-static.sh should be a fully qualified path, e.g., $HOME/dart-install but not dart-install or ./dart-install. That's it! Head over to the DART Examples to start playing. However, if you want to install the full DART toolchain, keep reading on.

Install PRISM Model Checker

You have to install PRISM manually. We recommend downloading and compiling the source code, and making sure that the prism binary is on your PATH.

Installation Using Script

For convenience, we have packaged all remaining installation instructions into a script. To install DART in $HOME/dart-install, run the following commands:

cd /tmp
git clone https://github.com/cps-sei/dart.git
cd dart
./install.sh $HOME/dart-install 0.1

Note that the argument to install.sh should be a fully qualified path, e.g., $HOME/dart-install but not dart-install or ./dart-install. Note also that the script will require your password to install packages via sudo. However, instead of using the script, you can also follow the instructions in the rest of this page one by one.

Install Packages

sudo apt-get install perl git build-essential subversion libboost-all-dev bison flex realpath cbmc tk xvfb

Install Madara

Follow the instructions at http://sourceforge.net/p/madara/wiki/InstallationFromSource for Madara without DDS for Linux. The tested version of the instructions are below. Copy and paste them into a terminal. You will need the export statements below (and in the following sections) to install and use the DART software. You may wish to copy them into your .bashrc file (and type . ~/.bashrc to reload the file). The remaining instructions on this page will install everything in the $HOME directory. If you would like to install somewhere else, change all instances of $HOME to your target directory.

export ACE_ROOT=$HOME/ace/ACE_wrappers
export MADARA_ROOT=$HOME/madara 
export LD_LIBRARY_PATH=$ACE_ROOT/lib:$MADARA_ROOT/lib:$LD_LIBRARY_PATH
export PATH=$ACE_ROOT/bin:$MADARA_ROOT/bin:$PATH 

#Make the ace and madara directories in $HOME
mkdir $HOME/ace $HOME/madara

#ACE
svn co svn://svn.dre.vanderbilt.edu/DOC/Middleware/sets-anon/ACE $HOME/ace
cd $ACE_ROOT/ace
echo "#include \"ace/config-linux.h\"" > config.h
cd $ACE_ROOT/include/makeinclude
echo "include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU" > platform_macros.GNU
cd $ACE_ROOT/ace
perl $ACE_ROOT/bin/mwc.pl -type gnuace ace.mwc
make

#MADARA
git clone -b dart-0.1 git://git.code.sf.net/p/madara/code $HOME/madara
cd $MADARA_ROOT
perl $ACE_ROOT/bin/mwc.pl -type gnuace MADARA.mwc
make tests=1

Install Java

sudo apt-get install openjdk-7-jdk
export JAVA_ROOT=/usr/lib/jvm/java-7-openjdk-amd64
export LD_LIBRARY_PATH=$JAVA_ROOT/jre/lib/amd64/server:$LD_LIBRARY_PATH

Install V-REP

Download the EDU version of V-REP from here: http://www.coppeliarobotics.com/downloads.html. We tested with version 3.1.3 rev. 2B. The following commands assume that the downloaded package is saved in $HOME and called vrep.tar.gz. The current version of VREP (as of 24 FEB 2015) is now above 3.1.3 rev. 2B, and the DART software has not been tested with anything beyond that, therefore, the following links point to the version stated above.

cd $HOME
wget http://coppeliarobotics.com/V-REP_PRO_EDU_V3_1_3_rev2b_64_Linux.tar.gz
wget http://coppeliarobotics.com/V-REP_PRO_EDU_V3_1_3_rev2b_Linux.tar.gz
wget http://coppeliarobotics.com/V-REP_PRO_EDU_V3_1_3_rev2b_Mac.zip
wget http://coppeliarobotics.com/V-REP_PRO_EDU_V3_1_3_rev2b_Setup.exe

Then unpack the package to a folder called vrep and set appropriate environment variables:

cd $HOME
mkdir vrep
tar xfz vrep.tar.gz -C vrep --strip-components 1 #or tar xfz V-REP_PRO_EDU_V3_1_3_rev2b_64_Linux.tar.gz -C vrep  --strip-components 1
export VREP_ROOT=$HOME/vrep

Install GAMS

Checkout and compile GAMS as follows.

cd $HOME
git clone -b dart-0.1 https://github.com/jredmondson/gams.git gams

export GAMS_ROOT=$HOME/gams
export LD_LIBRARY_PATH=$GAMS_ROOT/lib:$LD_LIBRARY_PATH
export PATH=$GAMS_ROOT/bin:$PATH

cd $GAMS_ROOT
mwc.pl -features vrep=1 -type gnuace gams.mwc
make tests=1 vrep=1

Install MZSRM Mixed-Criticality Scheduler

This step is optional unless you want to use the ZSRM scheduler. For our current set of examples, and a modern machine, the default Linux scheduler suffices, and this step can be skipped. Build and load the Modal ZSRM (MZSRM) kernel module using following commands.

cd $HOME
git clone https://github.com/cps-sei/mzsrm.git mzsrm
export MZSRM_ROOT=$HOME/mzsrm
cd $MZSRM_ROOT && make

The following command must be run only when you need the MZSRM scheduler in the OS (e.g., during a demo using the DART Demonstration Infrastructure). It is not needed to compile or use the DART software. The command must be rerun after each reboot. It loads the MZSRM kernel module.

cd $HOME/mzsrm/zsrmm && sudo ./load-module.sh

The following command will unload the MZSRM scheduler (i.e., the kernel module)

cd $HOME/mzsrm/zsrmm && sudo ./unload-module.sh

Install OSATE2 and ZSRM plugin

This step is optional unless you want to test out the ZSRM schedulability analysis. For our current set of examples, this step can be skipped. Download OSATE2. For this script:

wget https://dl.dropboxusercontent.com/u/83609895/osate2-2.0.0-201502210502-linux.gtk.x86_64.zip

The version above may be no longer available, any version of OSATE after that date ('201502210502' or Feb 21 2015) should work. Point your browser to to see the current testing builds and download the version that matches your system.

Extract it.

cd $HOME
unzip osate2-2.0.0-201502210502-linux.gtk.x86_64.zip

Run the osate executable (e.g., $HOME/osate2/osate). To install the plugin, select menu option Help >> Install New Software... You should see a dialog similar to below:

Click Add..., then Archive..., then select the ZSRMSchedulingInstallablePlugin.zip (BUG: Where does this come from if I elected not to build it myself) file from your local filesystem. Click OK, uncheck Group items by category, and click Select All. Click Next >, and complete the install process.

See Example 5 in DART Examples for usage instructions.

Install DMPLC

Checkout and compile DMPLC.

cd $HOME
git clone -b release-0.1 https://github.com/cps-sei/dmplc.git

export DMPL_ROOT=$HOME/dmplc
export PATH=$DMPL_ROOT/src/dmplc:$PATH
export PATH=$DMPL_ROOT/src/vrep:$PATH

cd $DMPL_ROOT
make clean
make # or make MZSRM=0 # which doesn't require/depend on the MZSRM kernel module

Congratulations! You have built the DART Software successfully. Head over to the DART Examples so see how to use it.