Now, you are ready to create an EPICS application to use for testing.  First, it is recommended to create a working directory in your home directory (~) to store the test application. Then we will use makeBaseApp.pl (script in EPICS Base) to create the application. You can find reference material about this script in the Application Developer's Guide, or here.

Calling makeBaseApp.pl with the flag -t and type ioc will create the Application and configure directories as well as makefiles needed for a basic EPICS application.  Calling it a second time with the -i flag will create an iocBoot directory and test IOC.  See the output example in the code block below.

Create Test Application
jmock@lcls-dev3  $ pwd
/u/ld/jmock
jmock@lcls-dev3  $ mkdir JeremyTest
jmock@lcls-dev3  $ cd JeremyTest/
jmock@lcls-dev3  $ makeBaseApp.pl
Usage:
<base>/bin/<arch>/makeBaseApp.pl -h
             display help on command options
<base>/bin/<arch>/makeBaseApp.pl -l [options]
             list application types
<base>/bin/<arch>/makeBaseApp.pl -t type [options] [app ...]
             create application directories
<base>/bin/<arch>/makeBaseApp.pl -i -t type [options] [ioc ...]
             create ioc boot directories
where
 app  Application name (the created directory will have "App" appended)
 ioc  IOC name (the created directory will have "ioc" prepended)
jmock@lcls-dev3  $ makeBaseApp.pl -t ioc
Name the application(s) to be created.
Names given will have "App" appended to them.
Application names? JeremyTest
jmock@lcls-dev3  $ ls
JeremyTestApp/  Makefile  configure/
jmock@lcls-dev3  $ makeBaseApp.pl -i -t ioc
Name the IOC(s) to be created.
Names given will have "ioc" prepended to them.
IOC names? sioc-b34-jeremy
The following target architectures are available in base:
    rhel6-x86_64
    RTEMS-beatnik
    RTEMS-mvme3100
    RTEMS-uC5282
    RTEMS-svgm
    linuxRT-x86_64
    linuxRT-i686
    linuxRT-arm_zynq
    rhel7-x86_64
    ubuntu1904-x86_64
    ubuntu20041-x86_64
What architecture do you want to use? rhel7-x86_64
The following applications are available:
    JeremyTest
What application should the IOC(s) boot?
The default uses the IOC's name, even if not listed above.
Application name? JeremyTest
jmock@lcls-dev3  $ ls
JeremyTestApp/  Makefile  configure/  iocBoot/

The directory structure you should find at this point is a typical EPICS application structure. You can find a layout of the directory structure here.

At this point, you can build the application. From <TOP>, simply type make. Pay attention to what directories and files exist before and after the build process.  From <TOP> you can also call make clean , make clean uninstall  and make distclean . Explore around the application structure.

Now we will move on to the problem to solve.


  • No labels