Software IS1200 VT24

MARS for LAB 1

MARS is an interactive MIPS simulator. This software is pre-installed in the Ubuntu rooms in Kista. To use the software, open a Terminal window and type the command

java -jar /opt/mars/4.5/Mars4_5.jar

You can also download and use MARS on any compatible computer. Download links and instructions are available from Missouri State University: http://courses.missouristate.edu/KenVollmar/MARS/ Links to an external site.. To start the MARS java file, run

java -jar Mars4_5.jar

from the command line.

Note 1: If you experience windows problems on MARS on a Mac, see these posts.

MCB32tools for LAB 1, 2, 3, and the Mini Project

The MCB32tool chain is an open source tool chain that includes a C compiler and software for easy programming of the ChipKIT environment. This tool chain should be used in both the labs and in the project.

Computer rooms at KTH

To run the mcbtools on the Ubuntu machine, you can open the Terminal and execute the following command:

. /opt/mcb32tools/environment

Finding your way around the command line

There is a comprehensive guide to CSC's Ubuntu systems at the following URL. The guide is available in Swedish:

https://www.csc.kth.se/utbildning/kth/kurser/DD1341/inda10/unix.pdf

If you are unfamiliar with how to use UNIX commands, you may also check out this tutorial Links to an external site..

For your own computer with MacOS, Ubuntu Linux, or Windows

Follow the instructions at http://github.com/is1200-example-projects/mcb32tools/releases/ Links to an external site.
For testing your installation using the instructions above, replace the command git clone git://github.com/is1200-example-projects/hello-leds.git with git clone https://github.com/is1200-example-projects/hello-leds.git.

Note: After that you installed the MCB32 toolchain (see above), you can install gcc in the msys terminal by typing "pacman -Sy gcc".   

If you are running Windows, a good alternative to msys is WSL (Windows Subsystem for Linux). Please see the following page for information about using MCB32 on WSL.

If you run into problems on your own computer, please use the pre-installed software in the computer rooms at KTH. We will be grateful to know about what happened, so we can tell other students about any important pitfalls or workarounds.

Note for Ubuntu and other Linux systems

Ubuntu: To access the hardware, your user must be a member of the dialout group. If your own computer has a problem with this, please use the Users and groups applet to add yourself to the dialout group. You may need to re-login (reboot will work) for the change to take effect. If the Users and groups applet is not available, check this help-page: http://askubuntu.com/questions/66718/how-to-manage-users-and-groups Links to an external site.

Other distributions: In Debian based distributions, the group should be the same as above, i.e. dialout. In arch the respective group is uucp. Information about your distribution you can find on you distributions documentation. For further information about how to determine the correct group and how to add your user to this groups, check the ChipKIT/MC32 toolchain FAQ.

Don't spend more than an hour or so on this. If it does not work, please use the pre-installed software in the computer rooms at KTH.

C-compilers for LAB 2

In lab 2, you should compile and execute C programs using a C compiler of your choice. We recommend that you use the gcc Links to an external site. compiler from the command line and that you edit the code in a simple text editor (see above). You can also use an IDE (integrated development environment), but we would strongly recommend that you focus on and learn how to use a UNIX shell, command line, and text editors.

Here is some advice about getting a C compiler:

  • Windows: If you have already installed msys2 for the MCB32 toolchain (see above), you can install gcc in the msys terminal by typing "pacman -Sy gcc".  
  • Linux: On Linux-platforms, gcc is usually installed as default.
  • MacOS X: Install XCode Links to an external site., which comes with a C compiler that you can use from the terminal.

Logisim for LAB 4 and the LD-LAB

Logisim is a freely available graphical editor and simulator for simple simulation of digital circuits. This software is pre-installed in the Ubuntu rooms in Kista. To use the program, open a Terminal window and type the command

logisim

You can also download and use Logisim on any compatible computer. Download links and instructions are available here: http://cburch.com/logisim/ Links to an external site.. To start the Logisim java file, run

java -jar logisim-generic-2.7.1.jar

from the command line.

Text Editors 

There are many text editors available that are good for coding. Here are a few recommendations.