Contents
Previous
Next
This section briefly explains how to create an example IOC application
in a directory <top>, naming the application firstApp
and the ioc directory ioctarget.
Execute the command:
echo $HOST_ARCH
This should display your workstation architecture, for
example solaris. If you get an "Undefined variable" error ask
your EPICS system manager how to set this variable for your particular
environment.
Execute the commands:
mkdir <top>
cd <top>
<base>/bin/<arch>/makeBaseApp.pl -t example first
<base>/bin/<arch>/makeBaseApp.pl -i -t example target
where:
- <top>
- Any directory name you chose.
- <base>
- Full path name to EPICS base.
- <arch>
- Your host architecture (i.e. the output of the echo command above).
For example at ANL/APS the following commands create an application:
cd
mkdir myapp
cd myapp
/usr/local/epics/baseR3.13.1/bin/solaris/makeBaseApp.pl -t example first
/usr/local/epics/baseR3.13.1/bin/solaris/makeBaseApp.pl -i -t example target
Windows Users Note:
Perl scripts are invoked with the command perl <scriptname>
on win95/NT. Perl script names are case sensitive. For example to
create an application on WIN95/NT:
perl C:\epics\base\bin\win32\makeBaseApp.pl -t example first
Spend some time looking at the files that appear under <top>.
Do this BEFORE building.
In directory <top> execute the command:
gnumake
Again look at all the files that appear under <top>.
The next step is to set the IOC boot parameters via the console serial
port on your IOC. Life is much easier if you find out how to connect
the serial port to a window on your workstation. See your EPICS system
manager for details.
The vxWorks boot parameters look something like the following:
boot device : xxx
processor number : 0
host name : xxx
file name : <full path to board support>/vxWorks
inet on ethernet (e) : xxx.xxx.xxx.xxx:<netmask>
inet on backplane (b):
host inet (h) : xxx.xxx.xxx.xxx
gateway inet (g) :
user (u) : xxx
ftp password (pw) (blank = use rsh): xxx
flags (f) : 0x0
target name (tn) : <hostname for this inet address>
startup script (s) : <top>/iocBoot/ioctarget/st.cmd
other (o) :
The actual values for each field are site and IOC
dependent. Consult your EPICS system manager for help. Two fields that
you can change at will are the vxWorks boot image and the location of
the startup script.
Note that the full path name for the correct board support boot
image must be specified. If bootp is used the same information will
need to be placed in the bootp host's configuration database instead.
See your EPICS system manager for details.
You are now ready to boot your IOC. When your boot parameters are set
properly, just press the reset button on your IOC, or use the @
command to commence booting. You will find it VERY convenient to have
the console port of the IOC attached to a scrolling window on your
workstation.
See the description of the example given in the section
Application Templates Supplied with base. Also try some of the
vxWorks shell commands described in the "IOC Test Facilities" chapter
of the Application Developer's Guide.
Contents
Previous
Next