To be able to run any course related tools and packages (for example TSim) you need to first run the following command:

$ setup_course tda381

Note that the old course code TDA381 is used here.

You are strongly encouraged to test your lab solutions on a multi-processor or multi-core machine, for example remote[n].student.chalmers.se. Since these machines do not have a lot of memory, you need to compile your labs with the special flag -J-Xmx20m to tell the Java Virtual Machine to use only 20MB of memory---see example below.

javac -J-Xmx20m Lab1.java

Windows computers (for Java exercises/labs)

Although it is a little complicated, it is possible to run the tools needed for the Java-related exercises and assignments used in the course. It relies on having Cygwin installed. Cygwin is a set of tools which makes your Windows machine more unix like.

Installing Cygwin

Erlang

To download Erlang/OTP, simply go to this webpage and choose the version to install depending on your machine operating system.

Some GNU/Linux distributions have packages for Erlang which have removed the support for the graphical interface that you will need for the labs (e.g., Ubuntu). Therefore, we recommend you to use the link given above and fetch the package for your distro there.

You will need to install the 32-bit version of Erlang/OTP in order for the CCHAT lab to work.

Remotely running the course tool

In this section we are going to describe how to run the course tools from a server on Chalmers but having the windows displayed on your local Windows computer.

Getting started with lab 1 in your own machine (Only Linux and OSX)

  1. Go to the downloads section of lab1 and download the example, the map, the TSim interface, the simulator source code and the source code.

  2. Install development libraries for the simulator's dependencies: Xaw, Xt, Xmu, X11 and Xext.

    • On Ubuntu, Mint, anything else Debian: sudo apt-get install libxaw7-dev libxt-dev libxmu-dev libx11-dev libxext-dev
    • On Fedora, RHEL, OpenSUSE: sudo yum install libXaw-devel libXt-devel libXmu-devel libX11-devel libXext-devel
    • On Arch: sudo pacman -S libxaw libxt libxmu libx11 libxext
    • On OSX: install XQuartz from http://xquartz.macosforge.org/landing/
  1. Unpack the tsim source code: tar -xzf tsim-0.84.tar.gz

  2. Build and install tsim: cd tsim-0.84 && ./configure && make && sudo make install && cd ..

  3. Build the 2 program (requires a C compiler, obviously): gcc -o 2 2.c

  4. Unpack the TSim interface: tar -xzf Tsim.tar.gz

  5. Build the example: javac Lab1.java

  6. Run it: ./2 "tsim --speed 20 Lab1.map" "java Lab1 10 5 20"