## MPG IOC RTEMS startup script setenv("EPICS_CA_MAX_ARRAY_BYTES", "30000") # For iocAdmin setenv("ENGINEER","Stephanie Allison") setenv("LOCATION","RF Hut") setenv("LOGNAME","screenlog.0") # Load object, including RTEMS chdir("../../") ld("bin/RTEMS-beatnik/mpg.obj") dbLoadDatabase("dbd/mpg.dbd") mpg_registerRecordDeviceDriver(pdbbase) ## Start the IOC log client iocLogInit() # Allows gdb to attach to this target #rtems_gdb_start(0,0) # Load record instances dbLoadRecords("db/evgIN20.db") dbLoadRecords("db/evgPatternIN20.db") dbLoadRecords("db/iocAdmin.db","IOC=IOC:IN20:EV01") dbRestore("/data/IOC-IN20-EV01.sav",0,-1) bspExtVerbosity=0 EgConfigure(0,0x280000,0) # From Till Straumann (for RTEMS 4.9.1 upgrade): # This should set the VME chip into a mode where it # surrenders the VME bus after every transaction. # This means that the master has to rearbitrate for the bus for every cycle # (which slows things down). # # The faster setting I had enabled would let the master hold on to the bus # until some other master requests it. *(long*)(vmeTsi148RegBase + 0x234) &= ~ 0x18 # Set Cexp priority one lower than pnetTask. Cexp_priority_orig = 100 rtems_task_set_priority(0, 101, &Cexp_priority_orig) iocInit() # after h/w initialisations bspExtVerbosity=1 dbpf("EVG:IN20:EV01:CTRL.DESC","Production") dbpf("IOC:IN20:EV01:EDEFNAME.DESC","Production") # eDef reservation sequence seq(&edefMask,"SYS=SYS0,IOC=IOC:IN20:EV01") seq(&edefReserve,"SYS=SYS0,IOC=IOC:IN20:EV01")