Environment Setup

There are a few pieces of software that we will use throughout the semester. All you need for now is Git and a text editor, but if you want to you can install the other things as well.

Git

How you install Git depends on your operating system.

macOS

On macOS, Git comes with the Xcode command line tools package. This package must be installed separately from Xcode itself. To see if you already have it installed, open up the Terminal application. When you open up Teminal, you will be presented with a command prompt which looks something like this:

Computer-Name:~ Username$

You can run commands at this prompt. Try running Git by typing the world git (all lowercase) and then pressing enter. If Git is already installed you will see a usage message. If not, a window will pop up asking if you want to install the Xcode command line tools. Install them now if this happens. You may get the following message:

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

If so, run this command:

sudo xcodebuild -license

You will be prompted for a password, enter the password for your computer. You can scroll through the license by pressing the space bar, and press q to stop reading the license. You will then need to type agree and press enter. Once you have completed this, try running git again.

Windows

There are many ways to install Git in Windows. I recommend installing Cygwin, which gives you access to other tools from Unix land as well (such as the GCC compiler). Instructions for setting up Cygwin are below, if you want to install Git by other means you are on your own.

Download Cygwin here

If you have a 64-bit computer (you probably do) be sure to download setup-x86_64.exe.

Run the setup-x86_64.exe program that you downloaded. Step through the installation process. The defaults should be fine until you get to the mirror selection screen. I had good luck picking http://mirrors.xmission.com. Once the Cygwin core has been downloaded you will be presented with the Select Packages screen which looks like this:

While you are installing Git you might as well install GCC and Make as well. So there are 3 packages under the Devel section that you should install: gcc-core, git, and make. Expand the Devel section and scroll down to find each of these packages. Click on Skip and it will mark the package for installation:

From the Doc section you should mark the package man-pages-posix for installation so that you have access to the manual pages for different commands.

Once those 4 packages have been marked for installation, click Next, and then Next again, keeping “Select required packages (RECOMMENDED)” checked.

Once all the packages have been installed, have Cygwin create a desktop shortcut and/or an entry in the start menu.

Now run Cygwin and you should be presented with a command prompt that looks something like this:

User@ComputerName-d3a3c25ad0 ~
$

Type the word git and press enter. If you see a usage message rather than an error, Git was installed correctly.

Text Editor

If you have only ever used IDEs and have never installed a text editor, you should install one. Popular cross-platform text editors include Atom and Sublime Text. Notepad++ is a Windows-only editor, and TextWrangler is a macOS-only editor. There are many other choices as well, but any of these will work just fine for our purposes.

C Compiler

We will write a little bit of C in this class. If you followed the instructions above for installing Git on macOS or Windows you will already have one.

Logisim

For creating logic circuits we will use Logisim. This is a Java application so you will need to have Java installed on your computer. Java comes pre-installed on macOS, but you may need to install it on Windows.

If you are running macOS and you install the macOS Logisim package it will try to make you install legacy Java, which you do not want to do. Instead you want to download the JAR file. It’s a little annoying to get to, so I put a copy of it here: logisim-generic-2.7.1.jar. You’ll need to run it from the command line. If it is in your Downloads folder you can open up a terminal and run it like this:

java -jar Downloads/logisim-generic-2.7.1.jar

I have not tested the Windows version. Dowload the .exe version, try it out, and let me know how it goes!

QtSpim

When we write assembly code you will need the MIPS simulator QtSpim. Here is the downloads page: https://sourceforge.net/projects/spimsimulator/files/

Download the most recent .msi file for Windows, download the most recent .mpkg.zip file for macOS.