CS 273: Software

Getting Access From Inside the CS Domain

In order to make use of the CS 273 software, you need to make some changes to your environment. Here's what you have to do, and what software is available.

Changing Your Environment

First, some background. On Unix systems, the way to make a file "hidden" is to use a period as the first character of the file name. The ls command won't list such a file (this can be overridden with the -a option, as in ls -a). The purpose of this is so you can have configuration files in your home directory, and not clutter up your directory listings with them. Traditionally, these files are called "dot files" since a period looks like a dot.

The most important dot file is .cshrc. This is a shell script that is executed whenever you do anything that creates a new command interpreter (Unix terminology for a command interpreter is a shell), like logging in or opening a new window. It is in your home directory, so, if your login name is "rpetty" it'll be called /user/rpetty/.cshrc

In the cs.nmsu.edu domain, most installed software is divided into packages in a directory called /local. The way you get access to these packages is by putting lines in your .cshrc file of the form

source /local/cshrc.packagename
.

As an example, here's a portion of my .cshrc file:


source /local/config/cshrc.acroread
source /local/config/cshrc.cvs
source /local/config/cshrc.emacs
source /local/config/cshrc.gcc

These lines give me access to the Adobe acrobat reader, to the CVS revision control system, to Gnu emacs, and to the Gnu Compiler Collection (incidentally, my .cshrc isn't read-protected, so you can go ahead and look at it if you're curious).

In order to get access to the CS273 software, you need to add the following line to your .cshrc file:

source /home/CS273/cshrc.273
(notice that this isn't in /local!) The changes will take effect the next time you login.

The Software

This will give you access to three pieces of software needed for the class:

as11
The assembler. It is run as described in the documentation in the lab manual
tksim11
The simulator. There is also a text-mode version of the simulator, more suitable for running over low-speed lines (like from home), called sim6811. So far as I know, there is no documentation on how to run the simulator; fortunately, it's all pretty intuitive.
gdl
The downloader.

Getting a Copy for Home

This document describes how to obtain, compile, and install the as11 assembler and sim6811 and tksim11 simulators. It does not include the gdl downloader, since comparitively few students will need it, as you won't ordinarily be debugging software for the board itself at home. However, the current version of gdl is available at http://www.cs.nmsu.edu/~pfeiffer/gdl-0.7.3.tar.gz. Procedures for untarring, compiling, and installing it are similar to those of the CS273 tools.

These tools are only available as source code. You'll need to download the "tarball," compile it, and install it, as follows.

  1. Download the software from http://www.cs.nmsu.edu/~pfeiffer/cs273tools-1.1.4.tar.gz
  2. Unpack configure, compile, and install the software.

    
    % tar xvzf cs273tools-1.1.4.tar.gz
    % cd cs273tools-1.1.4
    % ./configure
    % make
    % sudo make install
    
    

    Notes on the commands:

    1. tar xvzf cs273tools-1.1.4.tar.gz
    unpacks the software into a subdirectory called cs273tools-1.1.4
    2. cd cs273tools-1.1.4
    changes your current working directory to cs273tools-1.1.4
    3. ./configure
    inspects your system and configures the software for any irregularities. This command has a large number of options (./configure --help will tell you about them); probably the most important one is that if you don't want to install the software in the default location you should run it as
    ./configure --prefix=somedirectory
    As the command inspects your system, it will print a large number of messages describing what it's found. If it needs something on your system that turns out not to be there, it will stop, and you'll need to install the missing software. If you let me know about problems, I'll do what I can to try to help you track it down.

    Two problems that have come up fairly frequently, particularly with new Linux installations, are:

    1. A message to the effect that the C compiler is unable to create executables

      This has turned out to be missing development versions of the standard C libraries. The easiest way to obtain them, on a Debian-derived system (this includes ubuntu and many others) is to install the build-essential package.

    2. A message saying wish is not present.

      This one means that the tcl scripting language and its tk toolkit aren't installed. These can be obtained by installing the tk8.4 package. Alternatively, you can elect not to install tksim11 by passing the --disable-tksim11 option to configure.

    4. make
    compiles the code
    5. make install
    installs the tools. If you're installing in the default location you'll have to have root access to do this (the command as shown uses sudo to get root access).


Last modified: Fri Sep 12 15:01:48 MDT 2008

Valid HTML 4.01 Transitional