SPEAR EPICS

Input/Output Controllers (IOCs) and Channel Access (CA) Servers

Quick Links

General

Production RTOS IOCs and CPUs (except MCOR)

Node Name Console Alias IP Address MAC Address Model Location Battery
b116-iocbpm ioceast 134.79.46.154 00:01:af:17:05:7d/e MVME6100-163 B116-101-6-17, 116-VME1, slot 2 Orig
b116-iocbpm2 ioceast2 134.79.46.155 00:01:af:17:05:f8/9 MVME6100-163 B116-101-5-17, 116-VME2, slot 1 Orig
b116-ioccamac ioccam116 134.79.46.177 00:01:AF:1B:0D:6C MVME6100-161 B116-101-4-28, 116-VME3, slot 7 Orig
b116-iocmotor bl12 134.79.46.157 ec:9e:cd:08:73:c7 MVME3100 B116-101-4-28, 116-VME3, slot 2 Orig
b117-iocfdbk iocfdbk 134.79.46.128 00:01:af:18:34:3a/b MVME6100-163 B117-14-19, 117-VME2, slot 4 Orig
b117-iocmu* iocmu 134.79.46.129 00:01:AF:18:25:D7 MVME6100-161 B117-14-30, 117-VME1, slot 2 Orig
b117-iocorbit iocorbit 134.79.46.130 00:01:af:18:34:20/1 MVME6100-163 B117-14-19, 117-VME2, slot 2 Orig
b118-iocps iocps 134.79.46.153 00:01:AF:2E:96:E2/3 MVME6100-161 B118-29-17, 118-VME1, slot 2 Orig
b118-ioccamac ioccamac 134.79.46.176 EC:9E:CD:E:3B:7E MVME6100-163 B118-29-17, 118-VME1, slot 20 Orig
b120-iocmotor1 bl7 134.79.46.170 EC:9E:CD:08:73:A9 MVME3100 B120-1006-29, 120-VME1, slot 1 Orig
b131-iocmotor1 bl13 134.79.46.158 00:01:af:1b:51:11 MVME3100 B131-1305-16, 131-VME1, slot 9 Orig
b131-iocmotor2 bl5 134.79.46.169 00:01:af:2c:ea:e2 MVME3100 B131-602-24, 131-VME2, slot 1 Orig
b132-iocbpm iocwest 134.79.46.159 00:01:af:14:cb:46/7 MVME6100-163 B132-102-6-17, 132-VME1, slot 1 Orig
b132-iocbpm2 iocbpmtest 134.79.46.160 00:01:af:16:15:fc/d MVME6100-163 B116-101-3, 140-VME2 Orig
b132-iocbxbh N/A 134.79.46.173 Unknown Linux Chassis B132-102-2 N/A
b132-iocbxbv N/A 134.79.46.174 Unknown Linux Chassis B132-102-2 N/A
b132-iocbxbl N/A 134.79.46.175 Unknown Linux Chassis B132-102-2 N/A
b132-ioccamac ioccam132 134.79.46.178 TBD MVME6100 B132-102-3-27, 132-VME3, slot ? Orig
b132-iocmotor iocmotor 134.79.46.161 00:80:f6:40:59:10 SBC-VGMD w/SCSI B132-102-3-27, 132-VME3, slot 2 Orig
b132-iocrf** iocrf 134.79.46.162 Unknown Kinetics V152 B132-101-11-24, 132-VXI1, slot 0 Orig
b140-ioclinpac iocpac 134.79.46.168 00:06:3b:00:c8:c4 Coldfire uC5282 B140-106A N/A
b140-ioclinac1 ioclinac 134.79.46.166 00:01:AF:18:2D:AE MVME6100-161 B140-111-24, 140-VME1, slot 1 Orig
b140-ioclinac2 ioclinac2 134.79.46.171 Spare Spare Spare Orig
b140-iocboo1 iocboo 134.79.46.163 00:80:f6:01:21:30 SBC-VGM5/64MB/366MHz B140-321-20, 140-VME3, slot 1 Orig
b140-iocboo2 iocboo2 134.79.46.164 00:80:f6:10:47:86 SBC-VGMD w/SCSI B140-321-20, 140-VME3, slot 8 2/7/11
b140-iocbpm2 iocbpm2 134.79.46.167 00:01:af:18:34:38/9 MVME6100-163 B140-321-20, 140-VME3, slot 17 Orig
b140-iocbpm iocbpm 134.79.46.165 00:01:af:18:34:12/3 MVME6100-163 B140-106-20, 140-VME4, slot 2 Orig
b140-cpubpm cpubpm 134.79.46.172 00:40:9e:03:2c:e0 AM310/30 B140-106-05, 140-MTCA1, FRU 5 Orig
* A b117-iocmu reboot will zero booster LLRF phase stabilization which affects linac timing and causes ACM trips. A b117-iocmu will also set and then clear all alarms in the wolf box.
SPEAR timing system note:
The master TSSM in the b117-iocmu crate is deliberately designed to NOT honour VME sysreset in order to avoid affecting the slaves in other crates. A power cycle is required to reset the TSSM master hardware which will bring down the timestamp system.
** A b132-iocrf reboot will trip the RF station. Turn the RF station off before rebooting. Also, every year, adjust the EPICS_TIMEZONE environment variable in $IOC/b132-iocrf/st.cmd for daylight savings time.

Production Soft IOCs and CA Servers

IOC Name Console Alias Application Host Host IP Address OS
soft-iocbpminj iocbpminj Bpm-ICD b140-cpubpm 134.79.46.172 linuxRT
soft-iocgpib* iocgpib EtherIoc beldar 134.79.46.34 Linux
soft-iocpsspr iocpsspr PowerSupply beldar 134.79.46.34 Linux
soft-iocpsinj iocpsinj PowerSupply beldar 134.79.46.34 Linux
soft-iocpskick iocpskick PowerSupply beldar 134.79.46.34 Linux
soft-iochls iochls EtherIoc connie 134.79.46.33 Linux
soft-ioccamac ioccam EtherIoc connie 134.79.46.33 Linux
soft-iocidctrl iocidctrl InsertionDevices connie 134.79.46.33 Linux
soft-iocidintlk iocidintlk InsertionDevices connie 134.79.46.33 Linux
soft-iocmcortrim iocmcortrim Mcor connie 134.79.46.33 Linux
soft-iocmgr iocmgr IOCManager beldar 134.79.46.34 Linux
soft-iocmpsbl iocmpsbl EtherIoc beldar 134.79.46.34 Linux
soft-iocmpsinj iocmpsinj EtherIoc beldar 134.79.46.34 Linux
soft-iocmpsspr iocmpsspr EtherIoc beldar 134.79.46.34 Linux
soft-iocpps iocpps EtherIoc beldar 134.79.46.34 Linux
soft-iocrp iocrp EtherIoc beldar 134.79.46.34 Linux
soft-iocalara iocalara Alara connie 134.79.46.33 Linux
soft-iocalh-<subsystem>00 N/A ALARMS connie 134.79.46.33 Linux
soft-iocmatlab iocmat EtherIoc connie 134.79.46.33 Linux
soft-iocbucket iocbuck EtherIoc connie 134.79.46.33 Linux
soft-ioctemp ioctemp EtherIoc connie 134.79.46.33 Linux
soft-iocplcbl iocplcbl EtherIoc connie 134.79.46.33 Linux
soft-ioctesla ioctesla EtherIoc beldar 134.79.46.34 Linux
soft-ioclcw ioclcw EtherIoc beldar 134.79.46.34 Linux
soft-ioccam-watcher ioccamw Camera beldar 134.79.46.34 Linux
soft-ioccam-<location>** N/A Camera remulak 134.79.46.36 Linux
Injector CA Server N/A N/A inj02 134.79.46.48 VMS
SPEAR CA Server N/A N/A spear3 134.79.46.51 VMS
* The PTS500 frequency synthesizers go into local mode when soft-iocgpib is restarted. Before restarting soft-iocgpib, first get the current frequency setpoint values from the RF master oscillator EDM display and set the values locally using the knobs on PTS boxes.
** IOC must be restarted whenever the camera is power-cycled. Sometimes an IOC cleanup or stop does not work. The IOC then has to be manually killed.

MCOR IOCs

Note: Unless otherwise noted, console alias name is mcorxx where xx is 01 to 21. Note that a power cycle of an MCOR CPU will set all the corrector setpoints to zero and they will need to be manually restored. A sysreset will leave the power supplies at their last setpoints.
Node Name IP Address MAC Address Model PMC MAC Address Battery MVME6100 Support?
b118-iocmcor01 134.79.46.131 00:80:f6:10:47:90 SBC-VGMD w/SCSI 00:10:73:01:09:6D 01/9/06 Yes
b118-iocmcor02 134.79.46.132 00:80:f6:40:59:11 SBC-VGMD w/SCSI 00:10:73:01:09:64 11/13/06 Yes
b118-iocmcor03 134.79.46.133 00:80:f6:10:47:63 SBC-VGMD w/SCSI 00:10:73:01:09:70 1/07 Yes
b118-iocmcor04 134.79.46.134 00:80:f6:10:47:92 SBC-VGMD/256MB 00:10:73:01:09:62 11/1/07 Yes
b118-iocmcor05 134.79.46.135 00:80:f6:10:47:85 SBC-VGMD w/SCSI 00:10:73:01:09:61 Orig Yes
b118-iocmcor06 134.79.46.136 00:80:f6:10:47:94 SBC-VGMD w/SCSI 00:10:73:01:09:60 2005 Yes
b118-iocmcor07 134.79.46.137 00:80:f6:10:47:87 SBC-VGMD w/SCSI 00:10:73:01:09:6A Orig Yes
b118-iocmcor08 134.79.46.138 00:80:f6:10:47:74 SBC-VGMD w/SCSI 00:10:73:01:09:6B Orig Yes
b118-iocmcor09 134.79.46.139 00:80:f6:10:47:80 SBC-VGMD w/SCSI 00:10:73:01:09:69 Orig Yes
b118-iocmcor10 134.79.46.140 00:80:f6:10:47:54 SBC-VGMD 00:10:73:01:02:27 Orig Yes
b118-iocmcor11 134.79.46.141 00:80:f6:10:47:73 SBC-VGMD w/SCSI TBD 2008 Yes
b118-iocmcor12 134.79.46.142 00:80:f6:10:47:83 SBC-VGMD w/SCSI 00:10:73:01:09:66 1/25/11 Yes
b118-iocmcor13 134.79.46.143 00:80:f6:40:59:12 SBC-VGMD w/SCSI 00:10:73:01:09:6C 11/18/13 Yes
b118-iocmcor14 134.79.46.144 EC:9E:CD:E:8F:FA MVME6100-161 00:10:73:01:??:?? Orig Yes
b118-iocmcor15 134.79.46.145 00:80:f6:10:48:00 SBC-VGMD 00:10:73:01:03:C8 10/08/14 Yes
b118-iocmcor16 134.79.46.146 N/A N/A N/A N/A Yes
b118-iocmcor17 134.79.46.147 00:80:f6:10:47:91 SBC-VGMD w/SCSI N/A 2005 Yes
b118-iocmcor18 134.79.46.148 00:80:f6:10:47:66 SBC-VGMD w/SCSI B117 10/23/06 Yes
b118-iocmcor19 134.79.46.149 N/A N/A N/A N/A Yes
b118-iocmcor20 134.79.46.150 00:80:f6:10:47:84 SBC-VGMD w/SCSI N/A 1/10/06 No
b118-iocmcor21 134.79.46.151 00:80:f6:10:47:71 SBC-VGMD N/A Unknown No
b131-iocmcor01* 134.79.46.152 00:01:af:19:1a:00 MVME6100-161 N/A Orig Yes
* Console name is mcor131.

Development RTEMS/VxWorks/LinuxRT IOCs

Note: Console alias name same as node name unless noted.
Node Name IP Address MAC Address Model Used By Battery
iocspear2 134.79.33.73 00:80:f6:40:59:05 SBC-VGMD w/SCSI B117-10 04/15/15
ioc-b34-mg02 134.79.219.189 00:01:af:0b:12:29 Kinetics V152 B34,Rm250 Orig
iocspear5 134.79.35.74 TBD Intel Atom N270 B118 MCOR Test Orig
iocspear6 134.79.35.160 EC:9E:CD:E:8F:F8 MVME6100-161 B117-10 Orig
ioc-b34-cd06 134.79.219.118 ? MVME3100 B34,downstairs Orig
ioc-b406-mc01 134.79.218.170 ? MVME3100 B406 Orig
iocpsdev 134.79.35.169 00:01:af:2e:96:e4 MVME6100-161 B118 MCOR Test Orig
iocmcordev 134.79.35.159 00:80:f6:10:47:65 SBC-VGMD w/SCSI B117 01/29/15
iocrfdev 134.79.35.58 Unknown Kinetics V152 B118 VXI Crate Orig
b116-iocbpm3 134.79.46.156 spare spare spare spare
ioclab1 134.79.33.137 spare spare spare spare
ioc-b15-mg02 134.79.218.74 00:01:AF:31:2F:DC MVME6100-163 b15-123-0430-S3 Orig
Spare N/A 00:01:AF:16:E5:C5 MVME3100 B34,Rm250 Orig
Spare N/A 00:01:AF:15:6A:C6 MVME5500 B117 Orig
Spare N/A 00:06:3b:00:c8:c4 Coldfire uC5282 B? N/A
Spare N/A 00:01:AF:15:6B:1E MVME5500 B117 Orig
No Good N/A 00:80:f6:10:47:78 SBC-VGMD B34,Rm250 2005
Spare N/A 00:80:f6:10:47:55 SBC-VGMD w/SCSI B34,Rm250 3/5/07
Spare N/A 00:80:f6:10:47:98 SBC-VGMD/256MB B117 3/9/07
Spare N/A 00:80:f6:10:47:89 SBC-VGMD w/SCSI B117 Orig
No Good N/A 00:80:f6:01:28:20 SBC-VGM5/64MB/366MHz B34,Rm250-Flakey Replaced
Not Used N/A 00:80:f6:01:21:29 SBC-VGM5/64MB/366MHz B34,Rm250-vxWorks Orig
Spare N/A 00:80:f6:10:47:75 SBC-VGMD w/SCSI B117 07/11/08
Spare N/A 00:80:f6:10:47:93 SBC-VGMD B117 09/12/07
Spare N/A 00:80:f6:10:47:70 SBC-VGMD w/SCSI B117 1/07
Spare N/A 00:01:af:15:46:b0 MVME5500 B34,Rm250 Orig
Spare N/A 00:01:AF:30:1C:E4 MVME3100 B117 Orig
Spare N/A 00:01:af:18:34:12 MVME6100-163 Ziga Oven Orig
Spare N/A 00:01:AF:31:6E:78 MVME6100-163 Arturo? Orig
Spare N/A 00:01:AF:19:19:FF MVME6100-161 B117 Orig
Spare N/A 00:01:AF:2E:97:06 MVME6100-161 B117 Orig
Spare N/A 00:01:AF:13:B5:3C MVME6100-161 B34,Rm250 Orig
Spare N/A 00:01:AF:1A:7B:84/5 MVME6100-161 B117 Orig
Spare N/A 00:01:af:0c:28:af Kinetics V152 B117 VXI Crate Orig
Not Used N/A 08:00:3E:22:5A:45 mv167 B34,Rm250 N/A
Not Used N/A 00:01:af:0b:7f:37 MVME2100 B34,Rm250 Orig

Development Soft IOCs

IOC Name Console Alias Host Host IP Address OS
iocpsgendev iocpsgendev beldar 134.79.46.102 Linux
iocrpdev iocrpdev beldar 134.79.46.102 Linux
iocmgrdev iocmgrdev beldar 134.79.46.102 Linux
iocalhdev iocalhdev beldar 134.79.46.102 Linux
iocmotordev iocmotordev beldar 134.79.46.102 Linux

General IOC Setup

  1. Add the IOC to the appropriate table of this web page.
  2. Add the IOC to $IOC/screeniocs following instructions at the top of the file.
  3. Optional - add an alias for the IOC to $EPICS/epicsAliases.
  4. Create a directory using the IOC name under $IOC. In this directory, add a startup file (st.cmd) using instructions later on this page.
  5. Create a directory using the IOC name under $IOC_DATA using the spear account. If autosave is used by the IOC, create "autosave" and "autosave-req" directories under the IOC name. Set all new directories so that user, group, and world have write access. $IOC_DATA/<iocname> contains all files written by the IOC during operation, including *.bu files of setpoints restored during startup. It also has the screenlog.0 file, containing console messages written by the screen process started by iocConsole, and the ChannelWatcher setpoint files.
  6. The $EPICS_APP/ README file has instruction for creating and releasing IOC applications. If the IOC does not already have an application, create it under the $EPICS_APP directory and add a link to IOC application documentation. The application must include two standard modules, iocAdmin (IOC status) and restore (IOC record restore), from EPICS modules. Many applications also require seq (sequencer). To add these modules to your application, edit your configure/RELEASE file to add lines for the location of each module:
    IOCADMIN = /afs/slac/g/spear/epics/modules/iocStats/iocStats-<version>
    RESTORE = /afs/slac/g/spear/epics/modules/restore/retore-<version>
    SNCSEQ = /afs/slac/g/spear/epics/modules/seq/seq-<version> (if sequencer required)
    Also, edit your src/Makefile to add these dbd and libraries:
    DBD+=dbRestore.dbd
    DBD+=devIocStats.dbd
    USR_LIBS+=restore
    USR_LIBS+=devIocStats
    USR_LIBS+=seq pv (if sequencer required)
    Also, edit Db/Makefile to add one or more of these databases (depending on IOC types supported by the application):
    DB += $(IOCSTATS)/db/iocAdminSoft.db
    DB += $(IOCSTATS)/db/iocAdminRTEMS.db
    DB += $(IOCSTATS)/db/iocAdminVxWorks.db
  7. Optional - for IOC EPICS errlog messages to appear in the event log, add the following line to the beginning of the IOC startup file:
    iocLogInit()
    The IOC will then connect to iocLogMsgServer which forwards messages.
  8. Add the IOC to $EDM/diagnostics/cpu_diags.edl (Diagnostics -> IO Crates -> CPU Diags) and cpu_times.edl.
  9. Add applicable PVs served by the IOC to ChannelWatcher configuration files and restart ChannelWatcher.
  10. Add applicable PVs served by the IOC to Alarm Handler configuration files and restart ALH.
  11. Add setpoint PVs that need to be restored on restart and readback PVs for history using the PV database web interface. Edit the IOC startup file to restore them using dbRestore using instructions later on this page.
  12. Add the IOC and crate, if applicable, to IOCManager/.

Linux (Soft) IOC Setup

  1. Do general IOC setup.
  2. Decide on a host to run the soft Unix IOC. Currently, remulak has all camera IOCs, beldar has all IOCs that communicate with non-camera devices on the private subnet and connie has the rest. Development IOCs run on beldar. Remulak, beldar, and connie have a second NIC for the private network.
  3. Production and some development soft IOCs are run under the spear account. People who need access to the soft IOC console must be added to this account by Stephanie or Ken.
  4. Soft IOCs, excluding virtual IOCs, are started and stopped using $IOC/common/st.siocStart and st.siocStop which in turn call iocConsole to start and kill (cleanup) the task. The ioc name must be provided as an argument to st.siocStart and st.siocStop. A second optional argument, "Production", is required if the soft IOC is production. To have the IOC automatically started on host reboot, create a reboot startup file, /etc/init.d/st.<iocname>, and add symbolic links to it, /etc/rc5.d/S99<iocname> and /etc/rc3.d/S99<iocname>. These files can only be created or modified by people with sudo privilege, currently Stephanie Allison and Ken Brobeck for all SPEAR Unix machines. Copy the /etc/init.d/st.<iocname> to $IOC/<iocname>/S99<iocname> so that CVS can be used for revision history.
  5. To restart a soft IOC:
    ssh to the soft IOC host as spear.
    /etc/init.d/st.<iocname> stop
    /etc/init.d/st.<iocname> start
  6. For production soft IOCs, $IOC/<iocname>/st.cmd contains just two lines:
    epicsEnvSet("EPICS_IOC_APP","${EPICS_IOC_TOP}/<appname>/prod/iocBoot/<iocname>")
    < ${EPICS_IOCS}/common/st.cmd.soft
  7. In the epics application startup file, ${EPICS_APP}/<appname>/prod/iocBoot/<iocname>st.cmd, the first two lines are:
    < envPaths
    cd ${TOP}
    Also, load the iocAdmin database before dbRestore and iocInit():
    dbLoadRecords("db/iocAdminSoft.db", "IOC=<iocname-in-all-caps>")
  8. Add the following line to st.cmd after databases are loaded but before iocInit to restore setpoints from the PV database:
    dbRestore("spear1","<iocname>",-1)
    Load any test databases after dbRestore so that those records are not added to RDB!
  9. Ignore the following warning messages that appear during iocInit. These messages indicate that the ioc is sharing the CA server port with another ioc on the same machine, which is allowed on SPEAR unix machines:
    cas warning: Configured TCP port was unavailable.
    cas warning: Using dynamically assigned TCP port 36298,
    cas warning: but now two or more servers share the same UDP port.
    cas warning: Depending on your IP kernel this server may not be
    cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)

LinuxRT (Virtual Soft) IOC Setup

  1. Do general IOC setup.
  2. Virtual IOCs run on CPUs installed in remote (ie, microTCA or MCOR) crates (ie, soft-iocbpminj runs on b140-cpubpm).
  3. Production virtual IOCs are run under the spear account. People who need access to the IOC console must be added to this account by Stephanie or Ken.
  4. For production virtual IOCs, $IOC/<iocname>/st.cmd contains just two lines:
    epicsEnvSet("EPICS_IOC_APP","/prod/epics/app/<appname>/prod/iocBoot/<iocname>")
    . /prod/epics/app/spear/iocBoot/common/st.cmd.linuxRT
  5. Add the virtual IOC startup to $APP/spear/cpuBoot/<cpuname>/startup-ioc.cmd

LinuxRT CPU Setup

  1. The confluence page with FAQ for working with new linuxRT-x86 is a good reference.
  2. Documentation for Concurrent AM310/30 includes the Concurrent AM 31x/x0x Processor Tech Manual. Information about serial cable pinout here.
  3. Choose a node name and email m$network@ssrl to get an IP address for the node name and have it entered into DNS. If it is production, the IP address must be chosen from the 465-IOC group in the SSRL firewall. Request that the node be auto-negotiate and that it has 1Gb/Full available.
  4. Optional - add an alias for the CPU to $EPICS/epicsAliases.
  5. Note the MAC address on the CPU board.
  6. See setup for RTEMS and VxWorks IOC for notes on NFS and connection to the terminal server.
  7. Make sure the TFTP area in spearnfs is up-to-date. First, make sure /prod/linuxRT is the same as /afs/slac/g/lcls/tftpboot/linuxRT. Then log into spearnfs as spearmgr (be patient as it has to timeout on locking the authority file) and make sure /tftpboot/linuxRT is the same as /spear/prod/linuxRT.
  8. For production, add the node to the spearboot dhcp server. Login to spearboot as root. Change /etc/dhcp/spear-cpu-prod.conf to insert the new node name and ethernet hardware address in the cpu group. Restart dhcpd on spearboot by typing:
    /sbin/service dhcpd restart
    Note that dhcpd messages are logged in /var/log/messages. Copy the new version of any file to /afs/slac/g/spear/linuxSystem so that CVS can be used for revision history.
  9. Create a directory using the CPU name under $APP/spear/cpuBoot. In this directory, add startup.cmd, startup-ioc.cmd, and kernel-modules.cmd using files for b140-cpubpm as an example.
  10. Create a directory using the CPU node name under $IOC_DATA using the spear account. Set the new directory so that user, group, and world have write access. This directory is for the screenlog.0 file which contains console messages written by the screen process started by iocConsole.
  11. Add the uTCA crate containing the CPU to IOCManager remote crate monitoring and update the VME/VXI/MCOR/uTCA crate documentation. Add the crate to $EDM/diagnostics/spear_crates.edl (Diagnostics -> IO Crates).

RTEMS and VxWorks IOC Setup

  1. Choose a node name and email m$network@ssrl to get an IP address for the node name and have it entered into DNS. If it is production, the IP address must be chosen from the 465-IOC group in the SSRL firewall.
  2. Note the serial number and MAC address(es) on a sticker on the CPU board.
  3. Older boards may need to have their battery replaced. Spare batteries are in the B117 computer room and the spare modules cabinet in the electronics lab. Follow instructions to reflash the image in board-specific sections below.
  4. Login to spearnfs as root. If necessary, change /etc/exports to add the node name so the IOC can access the NFS server and if changed, force the NFS server to reload the exports file by typing:
    /usr/sbin/exportfs -ra
    Note that nfs messages are logged in /var/log/messages. Copy the new version of exports to /afs/slac/g/spear/linuxSystem so that CVS can be used for revision history.
  5. For production, add the node to the spearboot dhcp server. Login to spearboot as root. Change /etc/dhcp/spear-ioc-prod.conf to insert the new node name and ethernet hardware address in the ioc group. The MVME2400 needs extra dhcp commands so consult /afs/slac/service/dhcp-pxe/dhcpd.conf for guidance. Restart dhcpd on spearboot by typing:
    /sbin/service dhcpd restart
    Note that dhcpd messages are logged in /var/log/messages. Copy the new version of any file to /afs/slac/g/spear/linuxSystem so that CVS can be used for revision history.
  6. For development, if BOOTP is required, add the node to the dhcp server running on the dhcp3 server maintained by SCCS. Ask Stephanie Allison or Ernest Williams to add the node to /afs/slac/service/dhcp-pxe/dhcpd.conf and restart the server on rhel6-64 by typing:
    remctl dhcp3 dhcp check
    remctl dhcp3 dhcp restart
  7. For RTEMS CPUs (except MVME2400), TFTP is used to download and burn a bootloader to on-board flash memory. For MVME2400, TFTP is used to boot the RTEMS image. It is IMPORTANT (ESPECIALLY FOR THE MVME2400!!) that the version of RTEMS in the ~spearmgr/tftpboot directory on spearnfs is the same as the version of RTEMS in AFS used for building RTEMS IOC applications and the version in /prod/rtems in NFS. To update RTEMS on NFS, log into an AFS machine that has /spear/prod mounted as /prod, ssh as spear, and tar files from /afs/slac/package/rtems/<version>/target/rtems_p<revision>/ssrlApps_p<app_revision> to a new directory under /prod/rtems and adjust the ssrlApps sym link. Then log into spearnfs as spearmgr and tar files from /spear/prod/rtems/ssrlApps to ~spearmgr/tftpboot/ssrlApps.
  8. For a CPU board in a VME,VXI,MCOR crate, before removing or installing a board, first power down the crate. If the crate is connected to CANBus, then it can be powered on remotely from an EPICS display so unplug the crate as an extra precaution. For VME 64x crates, seating a CPU without the 64x handles requires a forceful push to seat the board completely.
  9. For development processors, connect the serial port to a Windows PC, using a DB9 female connector with the following pinout assignment. The Coldfire console port requires a DB9 male connector (instead of RJ45) and the pinout is compatible with the PC - a vanilla DB9 cable can be used.
    DB9 Pin RJ45 Pin on Synergy Console Port Color RJ45 Pin on MVMEx100 Console Port Color RJ45 Pin on MVME2400 Console Port Color
    1 (DCD) Not Connected N/A 8 (DTR) White Not Connected N/A
    2 (RxD) 3 (TxD) Black 4 (TxD) Red 4 (TxD) Red
    3 (TxD) 6 (RxD) Yellow 5 (RxD) Green 5 (RxD) Green
    4 (DTR) Not Connected N/A 1 (DCD) Blue 1 (DCD) Blue
    5 (GND) 5 (GND) Red 3 (GND) Black 3&6 (GND) Black and Yellow
    6 (DSR) Not Connected N/A Not Connected N/A Not Connected N/A
    7 (RTS) Not Connected N/A 7 (CTS) Brown 7 (CTS) Brown
    8 (CTS) Not Connected N/A 2 (RTS) Orange 2 (RTS) Orange
    9 Not Connected N/A Not Connected N/A Not Connected N/A
  10. For production processors, connect the console port to the RJ45 port of the nearest Perl terminal server using the following pinout assignment. The Coldfire and Concurrent console ports require a DB9 male connector (instead of RJ45).
    RJ45 Pin on Terminal Server Color RJ45 Pin on Synergy Console Port RJ45 Pin on MVMEx100 Console Port RJ45 Pin on MVME2400 Console Port RJ45 Pin on Intel Atom N270 Console Port DB-9M Pin on Coldfire Console Port DB-9M Pin on Concurrent AM310/30 Console Port
    1 (DCD) White/Orange Not Connected 8 (DTR) Not Connected Not Connected Not Connected Not Connected
    2 (RTS) Orange 8 (CTS) 7 (CTS) 7 (CTS) Not Connected Not Connected 8 (CTS)
    3 (DSR) White/Green Not Connected Not Connected Not Connected Not Connected Not Connected Not Connected
    4 (TxD) Blue 6 (RxD) 5 (RxD) 5 (RxD) 4 (RxD) 3 (RxD) 2 (RxD)
    5 (RxD) White/Blue 3 (TxD) 4 (TxD) 4 (TxD) 5 (TxD) 2 (TxD) 3 (TxD)
    6 (GND) Green 5 (GND) 6 (GND) 3&6 (GND) 6 (GND) 5 (GND) 5 (GND)
    7 (CTS) White/Brown 1 (RTS) 2 (RTS) 2 (RTS) Not Connected Not Connected 7 (RTS)
    8 (DTR) Brown Not Connected 1 (DCD) 1 (DCD) Not Connected Not Connected Not Connected
  11. Connect ethernet. The port must be set to auto-negotiate for RTEMS CPU and 100/half for SPEAR RF VxWorks CPU.
  12. Continue board-type-unique setup for Synergy, MVME6100 or MVME3100, MVME2400, or Coldfire.
  13. Set up NVRAM boot parameters for PPCs running RTEMS (except MVME2400 and Coldfire). For the SPEAR RF KineticSystem V152 MVME2400 PPC running VxWorks, setup the VxWorks boot parameters.
  14. Do general IOC setup.
  15. For production RTEMS IOCs, $IOC/<iocname>/st.cmd contains just two lines:
    setenv("EPICS_IOC_APP","../../../<appname>/prod/iocBoot/<iocname>")
    cexpsh("../common/st.cmd.rtems")
  16. For development RTEMS IOCs on the lcls-dev subnet, $IOC/<iocname>/st.cmd looks like:
    setenv("EPICS_IOC_APP","../../../<appname>/test/iocBoot/<iocname>")
    cexpsh("../common/st.cmd.rtems.lcls-dev")
  17. In the RTEMS epics application startup file, ${EPICS_APP}/<appname>/prod/iocBoot/<iocname>st.cmd, the first line is:
    chdir("../../")
  18. Load the iocAdmin database before dbRestore and iocInit():
    dbLoadRecords("db/iocAdminRTEMS.db", "IOC=<iocname-in-all-caps>")
  19. Add the following lines to st.cmd after databases are loaded but before iocInit to restore setpoints from the PV database:
    dbRestore("spear1",0,-1)
    Load any test databases after dbRestore so that those records are not added to RDB!
  20. For a CPU board in a VME,VXI,MCOR,uTCA crate, add the crate containing the CPU to remote crate monitoring, if available, and update the VME/VXI/MCOR/uTCA crate documentation. Add the crate to $EDM/diagnostics/spear_crates.edl (Diagnostics -> IO Crates).
  21. For RTEMS IOCs, optionally start a hardware watchdog and associated RPC server. This is very convenient if developing on a remote board without power-cycling/reset capability.

Synergy PPC RTEMS Setup

  1. VGMD Board Description:
    The VGMD series boards are single-CPU, dual PMC-site boards. On some of our boards, front panel access to PMC site #1 is blocked by a SCSI connector offering access to the on-board SCSI host adapter (no RTEMS driver, so far). PMC cards without a front panel may still be used on the VGMDs with the SCSI connector (e.g. a PMC Race++ interface). Unless otherwise noted, all VGMD boards have a 300 MHz CPU clock, 66 MHz bus speed, and 32MB memory.
  2. VGM5 Boards Description:
    The VGM5 series boards features a single PMC-site, an SCSI host adapter, optionally a second CPU, and a direct PowerPC to VME bus interface (no DMA, though). All VGM5 boards have 66 MHz bus speed. Two of the VGM5 boards have a 366 MHz clock and 64 MB memory. The other two have a 333 MHz clock and 32 MB memory.
  3. Background and reference for the rest of these instructions can be found in "The Bootloader" section at EPICS on RTEMS@SSRL by Till Straumann.
  4. If an old board is being swapped, before removing the old board, set a forever "Autoboot Delay" in the old board's NVRAM configuration so it won't autoboot when it's reinstalled without checking its configuration.
  5. Optional. Measure the TAU (thermal assist unit) calibration offset. The offset is the programmed into NVRAM later.
    • Board must have ambient temp (not powered for a while).
    • Measure ambient temperature (degC).
    • Write down the temperature reported by the SMON firmware:
      X: Hard reset - CPU 0 running - Temp: 24 - L2 initialized
    • It is *crucial* to use the value reported immediately after applying power to a cold board because the CPU core where the temperature is measured heats up quickly (<1s) and cools down slowly (1h).
    • Calculate the TAU calibration offset by subtracting the SMON-reported temperature from the ambient temperature.
  6. If the battery has been replaced, the baud rate may be wrong and the console port may not work. In this case, set the small white switches on the front of the CPU to FE (all switches down except the least significant (0)). The CPU will then boot up to FDiag. After configuring in FDiag (see the next step), set the most significant switch (7) up so that the switches are now 7E and the CPU will then boot up to SMon.
  7. Apply power and type config at the FDiag0 prompt. Correct the serial number if it doesn't match the sticker (after a battery replacement, the serial number MUST be corrected) and enter "Y" for "Enable Smon boot:". Press return on all other queries to use defaults. Type reboot at the FDiag0 prompt.
  8. Note the value of the ethernet "Hardware address" provided by SMON on reboot. The last digits of the hardware (or MAC) address are the same as the last digits of the serial number.
  9. Type config at the SMon0 prompt. Correct the serial number if it doesn't match the sticker. Enter the following values at the following prompts. Press return on all other prompts to use the default.
    Prompt Value to Enter
    Enable startup script: Y
    Startup delay (seconds): 5
    Target IP address: <CPU IP address>
    Host IP address: 134.79.46.40
    IP mask: Prod: 255.255.254.0
    Dev: 255.255.252.0
    IP gateway: Prod: 134.79.46.1
    Dev: 134.79.35.1 (ssrl) or
    134.79.219.1 (lcls)
  10. At the SMon0 prompt type:
    loadEB "ssrlApps/powerpc-rtems/svgm/img/reflash.st" "reflash"
  11. At the SMon0 prompt type:
    vi "startup"
  12. In vi, remove all lines and add this line to execute "ssrlApps/powerpc-rtems/svgm/img/smonscript.st" on startup:
    execEB "rtems";
    To exit from vi with changes, push the "Esc" key and type ":q". DO NOT TYPE ":wq"!!
  13. At the SMon0 prompt type:
    execEB "reflash"
    reboot
  14. Setup up NVRAM boot parameters.

MVME6100 and MVME3100 PPC RTEMS Setup

  1. The LCLS Motorola PPC configuration description and the netboot RTEMS README file provides background for these instructions. The MVME6100 and MVME3100 Installation and Use Manuals have more detail.
  2. Apply power. After a few seconds, MOTLoad will run. Correct the date and time:
    MVMEx100> set -tMMDDYYHHMMSS
    where MMDDYYHHMMSS is the current date and time. Enter time to verify the setting.
  3. If the board is new or the battery has been replaced, reinitialize the environment (must be done with the MVME3100):
    MVMEx100> gevInit
  4. Download the boot image, using the IP address (134.79.46.xxx) allocated for your processor. For the MVME3100, make a note of the Load Address that is shown in the output:
    Production:
    MVMEx100> tftpGet -c134.79.46.xxx -s134.79.46.40 -g134.79.46.1 -m255.255.254.0 -fssrlApps/powerpc-rtems/<beatnik or mvme3100>/img/netboot.flashimg.bin
    Development:
    MVMEx100> tftpGet -c134.79.yy.xxx -s134.79.46.40 -g134.79.35.1 -m255.255.252.0 -fssrlApps/powerpc-rtems/<beatnik or mvme3100>/img/netboot.flashimg.bin
  5. Copy the image into Flash.
    For MVME6100:
    MVME6100> flashProgram -s6B7000 -v
    For MVME3100:
    MVME3100> flashProgram -s<Load Address from the download> -n&722372 -v
  6. Update the automatic boot script:
    MVMEx100> gevEdit mot-script-boot
    For MVME6100:
    (Blank line terminates input.)
    netShut
    bmw -af4000000 -bf40fffff -c4000000
    go -a4000000

    For MVME3100:
    (Blank line terminates input.)
    netShut
    rs -nr3 -d0
    rs -nr4 -d0
    go -aF8000000

    Update Global Environment Area of NVRAM (Y/N)? Y
  7. Reboot the processor:
    MVMEx100> reset
  8. Setup up NVRAM boot parameters.
  9. If the CPU is already up, the image can reflashed from Cexp as follows:
    Cexp> BSP_flashWriteEnable( 0 )
    For production: Cexp> BSP_flashWriteFile( 0, 0, "/boot/rtems/ssrlApps/powerpc-rtems/<beatnik or mvme3100>/img/netboot.flashimg.bin")
    For development: Cexp> BSP_flashWriteFile( 0, 0, "/boot/package/rtems/4.9.4/target/rtems_p0/ssrlApps_p3/powerpc-rtems/<beatnik or mvme3100>/img/netboot.flashimg.bin")
    Type 'y' when prompted.

MVME2400 PPC RTEMS Setup

  1. DHCP is required to boot. Follow instructions in a previous step to set up DHCP.
  2. Install a jumper across J9 pins 2 and 3.
  3. Apply power and wait for the PPC4-Bug prompt to appear. Type env and set the desired environment, specifically set all PCI slave and VMEbus slave addresses to 0.
  4. Type niot to enter the following boot parameters. Then type nbo to boot.
    Prompt Value to Enter
    Controller LUN 00
    Device LUN 00
    Node Control Memory Address 0FF9E000
    Client IP Address 0.0.0.0
    Server IP Address 0.0.0.0
    Subnet IP Address Mask 0.0.0.0
    Broadcast IP Address 255.255.255.255
    Gateway IP Address 0.0.0.0
    Boot File Name NULL
    Argument File Name NULL
    Boot File Load Address 001F0000
    Boot File Execution Address 001F0000
    Boot File Execution Delay 00000000
    Boot File Length 00000000
    Boot File Byte Offset 00000000
    BOOTP/RARP Request Retry 03
    TFTP/ARP Request Retry 03
    Trace Character Buffer Address 00000000
    BOOTP/RARP Request Control A
    BOOTP/RARP Reply Update Control N

MVME2400 PPC VxWorks Setup

  1. Follow these instructions by Kristi Luchini to flash and set nvram.

Coldfire uC5282 RTEMS Setup

  1. Documentation includes the MCF5282 ColdFire Microcontroller User's Manual and uCdimm ColdFire 5282 Hardware/Firmware Reference Guide
  2. Use the ucbootloader 'tftp' or 'rx' commands to download the binary 'netboot.flashimg.bin' into ram and then issue the 'program' command which burns the flash.
  3. Use the 'go' command to start netboot from the ucbootloader shell. In order to have netboot starting up automatically after power-up set the variable AUTOBOOT. It is recommended that AUTOBOOT is never set to 0 -- otherwise the process can never be interrupted in case of a bad parameter setup or faulty netboot binary.
  4. The uC5282 board has no NVRAM and 'netboot' provides no interface for setting/changing non-volatile parameters. All non-volatile parmeters are stored in flash memory and the ucbootloader's 'environment' variables are used for that purpose. Some variables (such as IPADDR0) have the same semantics under ucbootloader and under netboot. Note that (for historic reasons) 'netboot' uses short and somewhat cryptic names for variables stored in NVRAM. In order to make life easier some aliases are also accepted (some of these aliases such as 'IPADDR0' are also recognized by ucbootloader). To set either the netboot name or the alias:
    setenv <name> <value>
    The list of all names that can be set:

    Netboot Name Alias Value to Enter Description
    BP_FILE N/A Prod: spearnfs:/spear/prod:rtems/ssrlApps/m68k-rtems/m68k-rtems/uC5282/bin/rtems.ralf
    Dev: afsnfs2:/afs/slac:package/rtems/4.9.4/target/rtems_p0/ssrlApps_p3/m68k-rtems/uC5282/bin/rtems.ralf
    Path to boot file
    BP_PARM N/A Prod: INIT=/boot/epics/app/spear/iocBoot/<CPU node name>/st.cmd
    Dev: INIT=/boot/g/spear/epics/app/spear/iocBoot/b140-ioclinpac/st.cmd
    Commandline string passed to bootee
    BP_SRVR N/A 134.79.46.40 Default Server IP
    BP_GTWY GATEWAY Prod: 134.79.46.1
    Dev: 134.79.35.1 (ssrl) or
    134.79.219.1 (lcls)
    Gateway
    BP_MYIF N/A doesn't work My/target IF media setup (auto, 100baseTx, etc.)
    BP_MYIP IPADDR0 <CPU IP address> My/target IP address
    BP_MYMK NETMASK Prod: 255.255.254.0
    Dev: 255.255.252.0
    My/target netmask
    BP_MYNM HOSTNAME <CPU node name> My/target name
    BP_MYDN DNS_DOMAIN slac.stanford.edu My/target DNS domain
    BP_LOGH LOGHOST Log host IP address
    BP_DNS1 DNS_SERVER 134.79.44.10 DNS server IP address #1
    BP_DNS2 N/A 134.79.44.11 DNS server IP address #2
    BP_DNS3 N/A 134.79.18.40 DNS server IP address #3
    BP_NTP1 NTP_SERVER 134.79.44.10 NTP server IP address #1
    BP_NTP2 N/A 134.79.44.11 NTP server IP address #2
    BP_NTP3 N/A 134.79.18.40 NTP server IP address #3
    BP_ENBL DO_BOOTP Prod: yes
    Dev: no
    yes (use bootp), no (use flash parameters).
    p (use file and commandline string from flash
    and bootp for everything else)
    BP_DELY AUTOBOOT* 2 for BP_DELY, 5 for AUTOBOOT Delay before autoboot starts
    (UNSET == wait for user input)
    * NOTE: avoid setting AUTOBOOT to zero unless you know what you are doing. If you want the target to boot automatically into netboot but you want netboot to wait with loading the target for a different amount of time then set both variables. The netboot name will take precedence under netboot but the alias will be used by ucbootloader. For example, to let ucbootloader start netboot with a delay/countdown of 2 seconds and let netboot wait for user input before loading the target, use the following setting:
    setenv AUTOBOOT 2 (ucbootloader waits 2s then starts netboot)
    setenv BP_DELY 0 (netboot waits indefinitely for user input)

NVRAM Boot Parameter Setup for RTEMS PPCs

  1. Boot parameters are kept in non-volatile Random Access Memory (NVRAM). To change them from the Cexp prompt:
    Cexp> nvRamConfig()
    or on reboot, abort netboot to configure NVRAM by pressing return at this prompt:
    Type any character to abort netboot: 2
    and enter "c" to change the NVRAM configuration.
  2. Enter the following values at the following prompts. Once values are set, reboot the CPU. At the Cexp prompt:
    Cexp> rtemsReboot()
    or if in netboot, enter "R" to reboot.

    Prompt Value to Enter
    Boot file name: Prod: spearnfs:/spear/prod:rtems/ssrlApps/powerpc-rtems/<svgm, beatnik, or mvme3100>/bin/rtems.ralf
    Dev: afsnfs2:/afs/slac:package/rtems/4.9.4/target/rtems_p0/ssrlApps_p3/powerpc-rtems/<svgm, beatnik, or mvme3100>/bin/rtems.ralf
    Command line parameters: Prod: INIT=/boot/epics/app/spear/iocBoot/<CPU node name>/st.cmd
    Dev: INIT=/boot/g/spear/epics/app/spear/iocBoot/<CPU node name>/st.cmd
    Server IP: 134.79.46.40
    Gateway IP: Prod: 134.79.46.1
    Dev: 134.79.35.1 (ssrl) or
    134.79.219.1 (lcls)
    My media: Leave blank if auto-negotiate. Otherwise:
    100baseTX-full
    My IP: <CPU IP address>
    My netmask: Prod: 255.255.254.0
    Dev: 255.255.252.0
    My name: <CPU node name>
    My domain: slac.stanford.edu
    Loghost IP:
    DNS server 1: 134.79.44.10
    DNS server 2: 134.79.44.11
    DNS server 3: 134.79.18.40
    NTP server 1: 134.79.44.10
    NTP server 2: 134.79.44.11
    NTP server 3: 134.79.18.40
    Use BOOTP: Prod: Y
    Dev: N
    Autoboot Delay: 2
    CPU Temp. Calibration: TAU calibration offset measured in an earlier step


SPEAR EPICS | RTEMS at SLAC | EPICS Home | SSRL Computing/Networking | SSRL Home | SLAC Computing | SLAC Networking | SLAC Home

Contact: Stephanie Allison
Last Modified: Apr 13, 2015