This chapter assumes that the ARC software has already been installed on your system, though you may not have used it yet. If you know that ARC has not been installed on your system, see section Installing ARC on your system. If you are not sure, or if you do not know the location of the main ARC directory in your system, you should contact the person at your site in charge of the ARC installation before continuing.
This section is mainly intended to bootstrap new users, but may be useful to even experienced users when they need to break in a new board.
You should have, somewhere in your system, a directory called "arc". This is often located in /usr/local/arc, but could be elsewhere, depending on how your system is set up. If you don't know where this directory is, contact the person at your site in charge of the ARC installation before continuing.
Once you've found where the "arc" directory is, you'll need to figure out where the executable files live. The executables will be in a subdirectory of arc, but the exact name depends on your host system architecture. Here are some examples:
Once you've found the directories with the executables, you'll need to add this directory to your path. If you use csh or tcsh, you probably want to add something like the following to the end of your ".cshrc" file:
set path=($path /usr/local/arc/sparcbin)
(You should replace `/usr/local/arc/sparcbin', with the path to the binary directory you determined above.)
If you are using `csh' or `tcsh' as your shell, you can load the changes by typing `source ~/.cshrc'. This will only affect the particular shell you execute it in. If you log out and back in, the path modifications should be executed for all of your shells.
If you are using a shell other than `csh' or `tcsh', you may need to do something different to extend your path. See the manual page on your shell for details.
Before starting ARC, you will need to know the name of the serial port you intend to use. The device names vary from system to system. Often, a serial port is set up to not give read and write permissions to standard users. Occasionally, a serial port is set up to run "getty", which means the system thinks a serial terminal (such as a VT100) is connected, and that users will wish to log in. If in doubt, you should talk to your local system administrator to help you get started using the serial port.
Here are some typical serial port names, but realize that names sometimes vary even between different machines of the same architecture, so the following are suggestions for names to try, rather than the final answers:
You may want to confirm that the serial port works before you try to use
ARC to talk to a processor board, as it is good to keep the number of
unknowns to one at a time. One way to do this is to hook the serial
port on your host machine to a serial source that is known to work (for
instance, a modem or another serial port) and run kermit
.
It is critical to get this step right before you continue. If you have not used serial ports on a unix machine before, I highly recommend you find someone more experienced to help you.
The issue of serial cabling is very complex. This section only handles specific issues relating to using 68332 boards. For more general information, see section Building Serial Cables.
The serial port on both the Motorola BCC and Vesta boards is a piece of male header with the following pinout:
| | | | | 3 | 2 | 1 | |________________________ 332RxD Ground 332TxD
On the Motororola BCC this connector is P4, on the Vesta it is J5 (see section Vesta Board Diagram). Pin 1 is labelled and the same on both boards.
Many people make a serial cable for these boards by soldering one end of a piece of 3-conductor wire to a piece of female header, and the other end to a DB25 or DB9 cable. If you do this, I highly recommend that you mark pin 1 on both the cable and the board with some paint.
A better solution is to make a converter from the 3-pin serial header to a female phone jack, and then use the instructions in (see section Building Serial Cables). I also recommend that you replace the male header with a 3-pin keyed header and build a 3-pin header to RJ11 adapter with the following parts avaliable from Digikey:
WM4301-ND Keyed 3-pin male header connector (solder to board) H9011-ND RJ-11 6-4 Jack with 6" leads (goes to housing) WM2001-ND Keyed 3-pin female housing (goes to RJ11 jack) WM2200-ND Crimp terminals for housing (crimp on wires, put in housing)
When plugged into the host computer (your workstation) and not the 332 you will get about -10V between pins 2 and 3 on the connector to the 332. Check this now. If you got it backwards and have no voltage between pins 2 and 3, but -10V between pins 1 and 2, you can either change the cable or install a null modem.
The tattletale board serial ports use stereo headphone jacks, and you should have a stero-jack to DB9 cable or stereo jack to 8-pin mini DIN cable that came with the board.
If you are using a NeXT or some Sparcs, you can get a mini-jack to DIN cable from Onset that I expect would work, though I haven't actually tried one. If you are using a Mac, you are out of luck because none of the arc development system currently works on a Mac. If you are using any other machine, I recommend getting the DB9 cable instead.
The pinout for the DB9 end of the cable is the standard IBM PC pinout:
5 4 3 2 1 This is the pinout as you look at the DB9 end 9 8 7 6 of the cable from the board Pin 2: Host serial receive (332 board serial transmit) Pin 3: Host serial transmit (332 board serial receive) Pin 5: Ground
If you are using an IBM PC with a DB9 port, you are in luck. Otherwise, follow the instructions in (see section Building Serial Cables) to convert the DB9 to the standard RJ11 connector just as you would if the DB9 were on a host instead of to the 332 board (the cabling scheme is symmetric).
When plugged into the host computer (your workstation) and not the 332 you will get about -10V to -5V between pins 3 and 5 on the DB9. Check this now. If you got it backwards and have no voltage between pins 3 and 5, but -10V to -5V between pins 2 and 5 instead swap pins 2 and 3 until this test works.
You should have a serial cable hooked up between your host computer and your board now.
To run arc, type:
arc -port /dev/your-serial-port
Arc should give you a startup message and then give you the "arc>" prompt.
If this doesn't work, check that your path includes the correct arc binary directory for your machine type. See (see section Set up your environment to use ARC) for details.
On a Vesta board you can put a normally open pushbutton switch across the two pins of J4 to make a reset button (see section Vesta Board Diagram). I recommend soldering a few inches of wire to a pushbutton switch on one end, and a two-long piece of female header on the other. Attach this to J4 (on the same end as the serial ports, towards the other side).
If you are using the platform board, then you already have a reset button. If not, add the following circuit (if you can):
+5V ____ | \ / \ 10K Resistor / |---------- /RESET signal to pin 57 on connector P1 / / Reset button (Normally open) | | ---- Ground
I've never figured out a good way to do this, other than to stack the BCC on top of a wire-wrap board with a reset button on it.
On a Tattletale, there are two hardware additions which should be performed on the Tattletale expansion board regardless of your application: a RESET button, and a DOWNLOAD button. Both of these should be normally open buttons connected as shown below. The RESET button will pull the MCLR line low when pressed and reset the board. The DOWNLOAD button, if pulled low during RESET will allow code to be downloaded to EEPROM.
RESET Button DOWNLOAD Button +5V +5V ____ ____ | | \ \ / / \ 10K Resistor \ 10K Resistor / / |---------- /MCLR |---------- /IRQ3 / / / Reset button / Download button | (Normally open) | (Normally open) | | ---- ---- Ground Ground
Plug the board in and test that the MCLR line is pulled low when you press the RESET button, and is high otherwise. Similarly test that the IRQ3 line is pulled low when you press the DOWNLOAD button (it should also cause a little red LED on the bottom of the board to light), and high otherwise.
The Motorola BCC and Vesta boards require a regulated 5V power supply.
On a Vesta board, the power connector is J6 (see section Vesta Board Diagram). Pin 1 is ground and pin 2 is +5V.
On a Motorola BCC there is no connector. You will either have to power it via another board (such as the Motorola platform board) or hook a power cable directly to one of the 64 pin connectors. The outermost pins (1,2,63, and 64) are all ground pins; the next innermost pins (3,4,62, and 61) are all power pins.
Be sure to get this right the first time. If you plug the power supply in backwards you may toast your board right now. None of these connectors provide any kind of diode protection and the components may not survive negative voltage being applied. Immediately check that there is +5V across the power and ground connectors on the 64 pin header as described above.
Tattletale boards have a 5V regulator on board. Therefore you can use anything from 6V to 12V to power the board. However, in order to program the EEPROM, you should use a 12V DC power supply.
On the Tattletale expansion boards, there is a coax power connector, which is a common connector on the end of AC/DC transformers.
************************ WARNING **********************************
Although using coax power connectors is common, the polarity is not standard. Devices and supplies come in two different flavors -- tip positive and tip negative. The Tattletale expects TIP NEGATIVE DC power. The symbol for the one you want looks like this:
____ / (+) -----------| 0------- (-) \____
The polarity of the outside part is on the left attached to the arc, and the polarity of the tip is on the right attached to the dot in the middle. Most AC/DC converters are marked similarly to this. (Though even if it is labeled I still recommend double-checking with a multimeter).
To test your target board and its connection to your host computer, press the board's RESET button, and you should see the board print a startup message onto the main ARC screen.
The startup message should look something like this:
Anarchboot Multitasking 68332 Kernel Version 0.919 Copyright Anne Wright 1993 Compiled May 3 1995 at 13:09:12 Checking for reset run programs Control-d to inhibit reset run...10...9...8...7...6...5...4...3...2...1... Running program vision as process 99 vestaboot.919>
If you do not get this, confirm that power is applied correctly to your board, confirm that the board is hooked up to the correct serial port, and confirm that your serial cable is contructed correctly. Do not try to go on until you get this step to work.
By now you should have ARC running on your host machine communincating with your processor board. You are now ready to load a program.
If your system has EEPROM (all Tattletale boards and modified Vesta
boards), you have the option of loading programs to EEPROM as well as RAM.
This will allow programs to persist reliably even when the board is powered
off. These examples use the ramload
command which only loads to
RAM. They would also work for loading to EEPROM by giving identical
commands to te romload
command. See section Loading user programs and libraries in ARC for more information.
To compile and load a program into arc, type:
arc> ramload progname.c
This command calls the arcc
program to deal with the compilation,
then downloads the resulting a.out file. If the compilation fails, double
check that your arc directory see section Installing ARC on your system and
environment see section Set up your environment to use ARC are set up properly.
If the compilation succeeds but it does not download properly to the board, go back and double check that you can talk to `arc' successfully see section Make sure your board boots and talks to ARC.
Once the download is completed successfully, You can then try running your program by typing:
arc> run progname
If the program is configured to run when reset is pressed, you can also run it simply by pressing the board's reset button. By default, programs will run on reset. See (see section Changing program startup parameters) for information.
Congratulations! You have now worked through all the steps required to use the ARC Development system.