start.txt

Getting Started with the M68360 QUADS software
==============================================

The document start.txt describes the steps necessary to getting started 
with the M68360 QUADS software.

The sessions that can be run are the three tutorial files included 
in the examples directory: lapd.tut, x25d.tut and x25b.tut. These 
files are all described below.

In describing examples, we will assume an IBM/PC host, running MS-DOS. 
SUN/4 users should be able to follow this easily enough, as the 
functions invoked are the same for each host (there are usually 
fairly minor differences in command syntax). For simplicity sake, 
we will also assume that you are working with an ADI board, jumpered 
to address 100 (hex) on the PC-bus and that the MC68360 QUADS board 
has been dip-switch set to address 0 (this is the default setting).

Commands following the prompt "DOS>" are issued to the host computer, 
those following the prompt "QUICCbug>" are typed to the board. 
All input is entered on the IBM/PC console.


I. Software Installation
========================

The Version 0.3 diskettes should contain (at least) two executable 
files: host_cl.exe and psrec.exe along with a set of g-files. The 
two ".exe" files should be copied to some directory in your command 
search path. (Otherwise, you will have to run the programs by 
typing ..\host_cl and ..\psrec since it is standard practice to run these
programs from within the EXAMPLES directory where the g-file are
stored).  Move to the EXAMPLES directory (exsV0_3). 

For details regarding the command syntax and g-file contents, 
consult the MC68360 Software User's Manual.

II. Establish contact with and reset the board
==============================================

DOS> host_cl 100 0

After running the command line driven host program, a legend 
screen should be displayed on the screen. This describes all of 
the control characters that are intercepted and handled by the host 
in a special way. All other input typed is passed to the board.

Press control-R. This exits the legend menu, resetting the board 
at the same time. You are now communicating directly with QUICCbug, 
the on-board monitor/debugger (also called CPU32bug). The QUICCbug 
reset message should be displayed in the top part of the console 
along with the version number.

III. Running MC68360 QUADS software from Flash EPROM
====================================================

You may start up the 360sw application from the FLASH EPROM.  
This part of the document is provided, primarily, because 
the Software User Interface Software (360sw) is not
contained in the flash EPROM's shipped with the early 
versions of the board. If you just received your board there is
a good chance your FLASH EPROM has already been programmed and 
you do not need to do this step.  The Motorola S-record format 
files are provided so they can be programmed into the Flash EPROMS. 
This section shows you how to download the software to the Flash EPROM.

1. Download the QUICC User Interface Software Rev 0.3 to RAM:
-------------------------------------------------------------

To instruct the board to wait for the program to be downloaded type:

QUICCbug> pdl

This instructs the board to start waiting for a program to be 
downloaded over the parallel port.

Exit the host program by typing control-X. You are now back in 
the normal DOS environment.

Now we download the QUICC module (Q_FLV0_7.srx) over the parallel 
port (using the ADI card) to the board. The program must be loaded 
to RAM first, then from RAM it is programmed to the Flash EPROM.  
So the program is downloaded to RAM (address 0x480000), rather 
than the address encoded in the s-record file (address 0x80000).

To download the code with a positive offset from the address to which
it is linked, the argument "-add" (followed by a hexadecimal offset)
must precede the program name on the command line.  The download 
process is as follows:

DOS> psrec -add 400000 Q_FlV0_7.srx 100 

The prompt will take several minutes to come back as the process
of downloading a large file like this takes some time.

5.Programming the Flash EPROMS: 
-------------------------------
There are two types of flash that have been used on the QUADS board.
Later versions of the board have AM29F010 Flash EPROMS.  Earlier
versions have AM28F010 Flash EPROMS.

If you have AM28F010 flash, an additional 12v is needed to erase and 
program the flash.  If 12v is not applied to the board an error results, 
that error is then printed to the screen.

To program the flash to start from address 0x80000 and load from
memory beginning at address 0x480000 and end at approximately 
0x4FFFFF type:

QUICCbug> lof 480000 4FFFFF 80000


6. Running QUICC User Interface Software from Flash EPROMS:
-----------------------------------------------------------

We are now finished downloading. Re-enter the host program to 
re-establish communication with the board and start up the MC68360 
QUADS User Interface Software.

DOS> host_cl 100 0

In the next step we can check to see that the QUICC User Interface 
Software was loaded correctly.  To do this we will run the program 
from the debugger, you can type:

QUICCbug> 360sw

It will take a few seconds for the "QUICC menu" to come up.  

Note: 
360sw is a pre defined macro in the QUICCbug that performs
the QUICCbug command running the 360sw application from the flash
EPROM. Before using this macro make sure that the flash EPROM in
the QUADS board was programmed. 

You now should be looking at the first menu in the QUICC User Interface
Software application. You will see "QUICC menu" at top, with 30 options
listed below it.  If you see this menu then you have downloaded the
software correctly.  If not, try doing a memory display of the 
srecords which were downloaded to the RAM as well as Flash EPROMS.

QUICCbug> md 480000;di

or

QUICCbug> md 80000;di

You should see some assembler code listed, such as:
00080000  00020700              ORI.B   #$0,D2
00080004  0008                  DC.W    $8  Undefined Opcode
00080006  0008                  DC.W    $8  Undefined Opcode
00080008  46FC2700              MOVE.W  #$2700.SR
0008000C  207C0002 0700         MOVEA.L #$20700,A0
... etc.

If the code does not appear to be there, then the download was not
successful and you should retry from step 2.

**Note**: Remember that if the MC68360 QUADS board gets powered off 
for any reason prior to the flash being loaded you will have to 
download the software again to RAM.


IV. Running tutorials
====================

There are several provided tutorial files (lapd.tut, lapd.tut
x25b.tut and x25d.tut) that can now be run. 
A tutorial is a recorded session of commands that includes comments 
and explanations about what is going on on the M68360ADS. 

Since tutorials run under the 360sw application, we must first 
start up the 360sw application. You may start up the 360sw
application from the FLASH EPROM (type 360sw from QUICCbug).

You now should be looking at the first menu in the application. 
Select option number 27, titled "Tutorial". When it prompts you 
for the name of the file to be read, enter the name of the tutorial
file to run, for example "lapd.tut".
Run through the tutorial by following the instructions displayed
on the screen. 
The sessions should be self-explanatory.

If you do intend to use the LAPB module section.
Note that to provide history sessions for LAPB requires 
an external cable looping back MC68360 channels SCC-1 and SCC-2, 
in which the Tx and Rx data and clock lines are crossed.

