Note:  this help file is meant only for users of ulab, the Sun system
which supports the departmental microprocessor lab for courses
CS341, 444, and 644.

The mtip program provides access from the UNIX environment to each of the
"online" microprocessor systems, for example the PC systems known as
"standalone PCs", or SAPCs for short.  These systems run no operating
system such as DOS, Windows, or Linux, but only a downloader/debugger 
called Tutor based on device drivers from Linux.  To mtip, such a system
is just a "board", short for "singleboard computer".

There are two important command-line arguments available, both optional:

  -f 	-  This specifies an executable file to be downloaded, a
		   ".lnx" file for SAPC.

  -b  - This specifies the board number you wish to connect to.
		   Valid numbers are currently 1 - 6.  (Note: You must leave
		   a space between the 'b' and the number).  If you leave this
		   argument out, an available board will be found for you.
Examples:

  mtip -b 1      - This will connect you to the board #1 if it is
	 	   available, without a file for downloading.

  mtip -f hw1.lnx - This will connect you to an available board,
		   and specify the program hw1.lnx to be downloaded
		   later when you use the ~d command inside mtip.
		   This is the most useful form of the mtip command.

WRONG EXAMPLE:	

	mtip -b2	- WRONG:  NO SPACE BETWEEN THE 'b' AND 2

Once you have started mtip successfully, you are connected to a single
system and it is reserved for you until you exit mtip with ^C^C
(two control Cs) or ~q (mtip quit command).  Inside the mtip environment, 
you can download the program indicated by the argument line, reset YOUR board,
run and debug a program on your board, and issue a UNIX command using the
shell escape, or quit.

The ESCAPE CHARACTER:

	~ 	This is the escape character that MUST precede ALL COMMANDS.
                (if you need to change it, use the -e argument to mtip)

The Most Important Commands:  (uppercase or lowercase: ~Q or ~q for quit, etc.)

	~h	- Help.  Will display all commands possible.
	~q	- quit mtip back to UNIX.
	~d	- This command will download the file argued in the command
		  line by the -f.
	~r	- This command will reset YOUR board. 
	~f      - This command will allow you to specify the download file
		  from inside mtip (same effect as -f on command line)
	~\char  - Send one char to board "as is", for ex. 
	~!	- This will allow you to issue a UNIX command to a subshell.

In addition, some control characters maintain their normal functionality.
Control-z suspends the mtip job.  Watch out if you use this--be sure
to pick the job up again within minutes, or kill it.  One control-c
will be sent along to the board, but another one right after that will
cause mtip to quit.  The quit char, control-\ or whatever, will make
mtip quit and dump core.  Be sure to "rm core" after that.

Examples:  (user input only--see mtip.example for full script)

	mtip -f hw1.lnx     Start up mtip for program hw1.lnx,
	~r	(NO RETURN NEEDED) reset my board (always do this first)
	~d	(NO RETURN) Now hw1.lnx gets downloaded to the board.
	go 100100   Use Tutor on the board to run the program.
	~! ls RETURN	List my files on UNIX.
	~q	My work is done; time to quit.


Other mtip-related tools and files--

A sample script of a run is available under "help mtip.example".

musers is a simple tool for telling who is using mtip--it is just
a shell script utilizing ps, so some extra info is shown as well.
It may show bogus entries, such as "emacs mtip.c", since it is just
searching for the string "mtip".  Also note that normal users show
up twice on this list, since mtip uses two processes per user.

mkill lets you kill off user processes tying up boards--just type
"mkill" and it displays info on each process and asks you whether
or not to kill it.  Honor system of course. 



next up
Next: mtip example