SETTING UP A NEW PROJECT ON BLUE
Setup the cdfvme_common software
setup cdfvme_common v2_0 -q 68k
In your home directory, make a directory called l1cal
mkdir l1cal
Note: l1cal is the name of all crates in EDG
In the l1cal directory, make a directory with a version number and your name
mkdir v1_0Mary
In your version directory, copy the teststand software
cp –r /products/prd/cdfvme_teststand/v1_1/*
Run the newTestStand script, syntax: ./newTestStand <crate> <boardname> <boardprog>
According to the Fermilab notes, the syntax is:
./NewTestStand teststandpackagename packagename boardname
./newTestStand l1cal pfred pfredsumet
or
./newTestStand l1cal cratesum cratesum1
Declare the software to UPS
ups declare –f NULL –r $PWD –M ups –m l1cal.table l1cal v1_0Mary
Setup the software in UPS
setup l1cal v1_0Mary –q68
We will now repeat the process with the board software
In your home directory, make a directory with your boardname (pfred for this example)
mkdir pfred
In the pfred directory, make a directory with a version number and your name
mkdir v1_0Mary
In your version directory, copy the template software
cp –r /products/prd/cdfvme_template/v1_0/*
Run the newPackage script, syntax: ./newPackage <board> <boardprog>
According to Fermilab notes, the syntax is:
./newPackage packagename boardname
./newPackage pfred pfredsumet
Declare the software to UPS
ups declare –f NULL –r $PWD –M ups –m pfred.table pfred v1_0Mary
Setup the software in UPS
setup pfred v1_0Mary –q68k
You now need to compile the software you just set up.
Change to the crate home
cd $L1CAL_DIR
Make the software
gmake
Change to the board home
cd $PFRED_DIR
Make the software
gmake
Note: You can get a lot of warning messages here, but you can ignore them unless they specifically say error.
This ends the steps that you have to do to set up a new project. Once you have this done, each time you log in, you only need to run the setup lines, so that the environment is set correctly for your project. If you don’t want to type the 2 setup lines in, you can put them in your .bashrc file in your home directory so they are automatically executed each time you log in.
Start kermit
kermit
At the kermit prompt, connect to the crate
kermit@blue> cdf
Press return once to get the VxWorks prompt (which is ->) or turn the crate on
Open a new shell and enter the 2 setup commands (or don’t if they’re in .bashrc)
Change to the crate home
cd $L1CAL_DIR
Start the software
java l1cal.l1cal
A window running the CDFVME test stand software should now appear. You now need to configure the software.
File-Preferences-Turn on both Init System Options (Init Boards and Open Connection) and save and exit
File-Edit Config-Double click on crate0, then click on pfredsumet (or whatever is below MVME). Then highlight one of the two boards and delete it (Edit-Delete Board).
In the same window, choose Edit-Modify Board Entry and then pick MVME and edit. Change the values to the following:
Location: red
Server Name: red.uchicago.edu
Server ID: don't need to change
Next, pick pfredsumet and edit. Change the slot and base address to the correct values for the board. For example, pfredsumet in slot 10, use:
Slot: 10
Base Addr 0x5000000
ID: pfredsumet
Close all windows and save all changes
Initialize the system with DAQ-Init System
Miscellaneous Notes
If when trying to initialize the system you get an error message like the following:
Trying to open file /products/prd/cdfvme_common/v1_0/server/lib/VxWorks-5.3/68k/CrateVme
CrateVme: Opening crate
Trying to open file /products/prd/cdfvme_common/v1_0/server/lib/VxWorks-5.3/68k/pfredsumetVme
PfredsumetVme: No such file or directory
.
. More error messages here about ROBIN
.
Do the following:
- Find your pfredsumet file (or whatever file it is complaining about)
- Load this file. In the kermit window, at the VxWorks prompt (->), enter:
ld < /home/maryh/pfred/v1_0mary/server/lib/VxWorks-5.3/68k/pfredsumetVme
You can also automatically load this file by placing this line in the startup file that is run each time the system boots. This file is called red_startup and is located in /home/vxworks. The one problem here is that everyone uses the same startup file, so be sure to clearly mark the sections or lines that you add and comment out (but don’t delete someone else’s sections if they are causing a problem for you.
Sometimes when running the initialization, you can get a bunch of errors for things that are about stuff with Fermilab crates. This is due to the file system.link in $L1CAL_DIR, which is mentioning boards that we don’t have in our crate. To get rid of these error messages, edit the file system.link, so it reads as follows:
// [TYPE]
// <name> Server 0 Slot 0 <Server 1 Slot 1>
// …
// [NEXT_TYPE]
[GLINK]
[TAXI]
[HOTLINK]
As always there is a problem with editing this file, if you edit it before you run gmake in $PFRED_DIR, gmake won’t work properly. I don’t know if this will be a problem when you attempt to add your own code or not. So you may not want to edit this file after all.
The cdf script run in kermit, actually executes the following commands:
set line /dev/ttyS0
set speed 9600
connect
Settings required to boot the crate from blue.uchicago.edu
boot device: ei
processor #: 0
hostname: blue.uchicago.edu
filename: /products/prd/vxworks/v5_3b/target/config/mv167/vxWorks
inet on ethernet: 128.135.152.89
inet on backplane: 128.135.152.89
host inet: 128.135.152.88
gateway inet: 128.135.152.1
user: vxworks
ftp password: see Mary
flags: 0x0
target name: red.uchicago.edu
startup script red_startup
other:
Settings required to boot the crate from b0dau30.fnal.gov
boot device: ei
processor #: 0
hostname: b0dau30.fnal.gov
filename: /cdf/code-IRIX-6.5/products/vxworks_generic/v5_3b/target/config/mv167/vxWorks
inet on ethernet: 128.135.152.89
inet on backplane: 128.135.152.89
host inet: 131.225.206.191
gateway inet: 128.135.152.1
user: <your username>
ftp password: <your password>
flags: 0x0
target name: red.uchicago.edu
startup script: <File in your home directory>