1 2003/P571: IOC Development Environment EPICS IOC Development Environment with EPICS on Ubuntu Based on “IOC Development Envirnment” by Andrew Johnson,

Slides:



Advertisements
Similar presentations
1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
Advertisements

January 2009EPICS Seminar in Indore1 Practice EPICS Start up and MEDM Tatsuro KEK January 2009.
ICS – Software Engineering Group 1 SNS Control Systems EPICS builds Control Systems Software Engineering “SNS Standards for Building IOC Applications”
DHCP -Ameeta and Haripriya -cmsc 691x. DHCP ► Dynamic Host Configuration Protocol ► It controls vital networking parameters of hosts with the help of.
EPICS Noboru Yaamamoto Jan 27, 2009 for EPICS seminar at RRCAT, Indore Installing EPICS.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Finding, Deploying and Managing EPICS Support Modules Andrew Johnson Computer Scientist, AES Controls.
1 Web Server Administration Chapter 3 Installing the Server.
Packaging of EPICS-basedControl System Software
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Installing software on personal computer
Linux-MVME Targets Using Motorola Board Support
Va-scanCopyright 2002, Marchany Unit 3 – Installing Solaris Randy Marchany VA Tech Computing Center.
Guide to MCSE , Enhanced 1 Activity 10-1: Restarting Windows Server 2003 Objective: to restart Windows Server 2003 Start  Shut Down  Restart Configure.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Ch 11 Managing System Reliability and Availability 1.
Lesson 4 Computer Software
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Operating Systems Operating System
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
ActEyes IP Cam Training Part 1: Camera Setup. Network Setup Overview Each IP Cam on the network will need its own IP address to be assigned. This address.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Tutorial 11 Installing, Updating, and Configuring Software
Please Note: Information contained in this document is considered LENOVO CONFIDENTIAL For Lenovo Internal Use Only Do Not Copy or Distribute!! For Lenovo.
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Chapter Two Exploring the UNIX File System and File Security.
1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
January 2009EPICS Seminar in Indore1 Practice SNL and Sequencer Tatsuro KEK January 2009.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Disk Layout/Productization Proposal Ron Rechenmacher and Geoff Savage.
WDO-It! 102 Workshop: Using an abstraction of a process to capture provenance UTEP’s Trust Laboratory NDR HP MP.
EPICS Application Development At The Canadian Light Source Glen Wright.
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
RT-LAB Electrical Applications 1 Opal-RT Technologies Use of the “Store Embedded” mode Solution RT-LAB for PC-104.
1 1999/Ph 514: Lab #3A : SNL Lab#3B : Development Environment EPICS Lab #3a State Notation Language.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
21 September 2012 GRETINA SWG GRETINA SWG Meeting Carl Lionberger LBNL GRETINA DAQ Implementation.
Linux Operations and Administration
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
EPICS Noboru Yaamamoto July 11, 2006 for EPICS seminar at VECC,Kolkata Installing EPICS.
HOW TO INSTALL WINDOWS 7? This step-by-step guide demonstrates how to install Windows 7 Ultimate. The guide is similar for other versions of Windows 7.
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
An EPICS IDE Using Eclipse Kenneth Evans, Jr. Presented at the EPICS Collaboration Meeting June 15, 2006 Argonne National Laboratory, Argonne, IL.
Disk Layout/Productization Proposal Ron Rechenmacher and Geoff Savage.
Advance startup options Shift Restart. Restart options.
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 2 Introducing Operating Systems.
EPIC S Noboru Yaamamoto July 11, 2006 for EPICS seminar at VECC,Kolkata Installing EPICS.
Stephanie Allison Software Mar 2, 2006 IOC Applications Host Applications Directory Structure Environment Setup Issues.
Installing Windows 7 Lesson 2.
IOC Application Development / Debugging
© 2002, Cisco Systems, Inc. All rights reserved.
Chapter Objectives In this chapter, you will learn:
Computer System Laboratory
The Linux Operating System
Networking for Home and Small Businesses – Chapter 2
Networking for Home and Small Businesses – Chapter 2
Operating Systems Networking for Home and Small Businesses – Chapter 2 – Introduction To Networking.
bitcurator-access-webtools Quick Start Guide
SPL – PS1 Introduction to C++.
Presentation transcript:

1 2003/P571: IOC Development Environment EPICS IOC Development Environment with EPICS on Ubuntu Based on “IOC Development Envirnment” by Andrew Johnson, APS

1 2003/P571: IOC Development Environment EPICS Preamble  This talk describes the IOC development environment that comes with EPICS Base R on Ubuntu Linux  IOC Development  Database configuration  Operation Panel  Sequencer program  Device/Record Support  Sometimes called makeBaseApp  After the PERL script that creates application areas  It uses the same major structure and build rules as Base  Allows independent compilation of the same source modules for multiple target architectures

1 2003/P571: IOC Development Environment EPICS Reference Documentation EPICS: Input / Output Controller Application Developer's Guide  Release , 27 October 2008  Accessible through the R page on the EPICS website  Chapter 4 covers the EPICS build system in great detail, and is more recent (and accurate) than much of this talk  The R3.14 build system has evolved quite a bit since R3.13.x

1 2003/P571: IOC Development Environment EPICS Purpose of an IOC DE  What is an IOC development area for?  A place to collect files and configuration data associated with  one or more similar IOCs  device, driver and/or record support  other related software  Provides simple ways to configure and automate some very complex compilation procedures involving  Databases and database templates  Startup command files  Record, device & driver support  SNL programs  Other IOC code  Portable CA Server applications  Other host software

1 2003/P571: IOC Development Environment EPICS Other Features  IOC Software is usually divided into different areas  Each area is managed separately  A may use products from other areas  EPICS Base is mainly regarded as just another  The Gnu version of make is used to build all products  Almost every directory has a Makefile in it  Make recursively descends through the directory structure  Determines what needs to be [re]built  Invokes compilers and other tools as instructed in the Makefile  CVS can be used for revision control of source code and configuration files

1 2003/P571: IOC Development Environment EPICS EPICS on Ubuntu/Live-CD  Ubuntu  1-CD/DVD Linux distrribution  Boot from CD/DVD  Don't need to install it on HDD. /Can install the system on to HDD  Run Most PC platform.  Insert CD in the CD drive and just restart,  EPICS on Ubunti  Start terminal window from menu after booting Ubuntu.  For the envrionment setting use . /opt/epics/etc/cshrc.EPICS

1 2003/P571: IOC Development Environment EPICS makeBaseApp  To create a new application area, execute the commands mkdir ~/heater cd ~/heater makeBaseApp.pl -t example water makeBaseApp.pl -t example -i water example: a name of template makeBaseApp.pl -l will give you a list of available template

1 2003/P571: IOC Development Environment EPICS makeBaseApp  makeBaseApp.pl -t example water makeBaseApp.pl -t example -i heater The first command creates: / Makefile configure/... waterApp src/... Db/... The second command creates: /iocBoot Makefile iocheater/ … makeBaseApp.pl can be run multiple times to create new subdirectories Run env EPICS_HOST_ARCH=linux-x86 make install

1 2003/P571: IOC Development Environment EPICS Directory Structure  The example directory is an application  A is structured like this: / configure/Configuration data files xxxApp/All source files except startup src/Source code xxxSrc/There can be multiple xxxSrc directories Db/Databases, templates & substitutions files xxxDbThere can be multiple xxxDb directories...May have others dirs too such as adl, edm, etc yyyApp/Any number of *App directories iocBoot/Only one iocBoot iocxxxDirectory for each ioc...

1 2003/P571: IOC Development Environment EPICS Install Directories  By default, build products are installed into various subdirectories under : / bin/Object files and executables linux-x86/ vxWorks-68040/ lib/Object libraries linux-x86/etc. include/e.g. xxxRecord.h dbd/menu, recordtype, device, driver,etc db/record instances, templates, etc javalib/.jar files DONT touch files in these directory. They will be OVERWRITTEN when you run “make” in the application directories

1 2003/P571: IOC Development Environment EPICS /configure files  Files meant to be modified  CONFIG - Can override make variables CROSS_COMPILER_TARGET_ARCHS = vxWorks  CONFIG_APP Some other definitions  RELEASE Location of other areas used in this application EPICS_BASE=/opt/epics/R3.14.7/base  Other files not meant to be modified  RULES* Files containing (pointers to) make rules in base  Makefile Some configuration tasks

1 2003/P571: IOC Development Environment EPICS /xxxApp/src files  Source code for  Device support  Record support  Sequencer (snl) program  Subroutines  Commands for iocsh,....

1 2003/P571: IOC Development Environment EPICS /xxxApp/src files  base.dbd - definitions supplied by base  Edit this if you don't want to load some base record or device types  Links to menu, recordtype, device, drivers provided by base  Earlier versions of base included hardware support too, not R  Not fully expanded, contains many component include statements include “menuGlobal.dbd” include “menuConvert.dbd” include “aiRecord.dbd”... include "waveformRecord.dbd" device(ai,CONSTANT,devAiSoft,"Soft Channel")... device(waveform,CONSTANT,devWfSoft,"Soft Channel")

1 2003/P571: IOC Development Environment EPICS xxxApp/src continued  Makefile defines what is to be built, from which source files TOP=../.. include $(TOP)/configure/CONFIG DBDINC += xxxRecord DBD += example.dbd PROD_IOC = example example_SRCS += xxxRecord.c devXxxSoft.c exampleMain.cpp example_SRCS += example_registerRecordDeviceDriver.cpp example_LIBS += iocsh miscIoc rsrvIoc dbtoolsIoc asIoc dbIoc example_LIBS += registryIoc dbStaticIoc ca Com include $(TOP)/configure/RULES  ExampleInclude.dbd include “base.dbd” include “xxxRecord.dbd” device(xxx,CONSTANT,devXxxSoft,”Soft Channel”)

1 2003/P571: IOC Development Environment EPICS xxxApp/xxxDb/Makefile  Databases installed into /db  DB += xxx.db  Template files expanded on host  yyy.template has the format record(ai,”$(USER):aiExample$(NO)”){ … }  yyy.substitutions contains file yyy.template { {USER=“mrk”,NO=“1”} {USER=“mrk”,NO=“2”} } DB += yyy.db USES_TEMPLATE += yyy.template  Template files to be expanded at boot time via dbLoadTemplate()  DB += zzz.template zzz.substitutions  Support for capfast generated files  Can also expand.dbd files

1 2003/P571: IOC Development Environment EPICS iocBoot/iocxxx  iocBoot/iocxxx/Makefile Creates cdCommands file for vxWorks targets. Make sure that  ARCH =  is defined correctly in the Makefile  For a vxWorks target the cdCommands output file looks like startup=“ “ appbin=“ “ …  A vxWorks st.cmd file looks like < cdCommands cd appbin ld < iocCore ld < xxxLib cd startup dbLoadDatabase(“../../dbd/xxxApp.dbd”) dbLoadRecords(“../../db/xxx.db”,”user=mrk”) iocInit

1 2003/P571: IOC Development Environment EPICS Make Targets (commands)  It is possible to run make (gnumake) in any subdirectory   make clean uninstall Removes all products, leaving just the original source files  make Builds and installs everything that is not up to date  configure  make Constructs target-specific files from contents of RELEASE  iocBoot  make Same as issuing command in each iocxxx subdirectory  iocBoot/iocxxx  make Creates the envPath file, if appropriate for the IOC's architecture

1 2003/P571: IOC Development Environment EPICS Make Targets (commands) cont.  xxxApp  make Same as issuing command in each subdirectory  xxxApp/xxxSrc  Builds in O. ; installs products in /  make Builds and installs all out of date components  make Build only for specified architecture(s), e.g. make vxWorks-ppc604  make clean Remove all O. directories  XxxApp/xxxDb  make Generates and installs database instance files etc.

1 2003/P571: IOC Development Environment EPICS Application Templates  MakeBaseApp uses templates for the files it creates  New application templates can be created by anyone  Base supplies the following /templates/makeBaseApp/top/ Makefile configure exampleApp exampleBoot simpleApp simpleBoot  Template files undergo textual substitutions when installed  Use “makeBaseApp.pl -l”to get the list of installed template

1 2003/P571: IOC Development Environment EPICS iocsh  Iocsh  EPICS database/CA server program  st.cmd : startup script for iocsh  Database download  Sequencer program  Start ioc operation: iocInit  Command to start iocsh /bin/ / st.cmd  Or  Chmod +x st.cmd  “./st.cmd” to start iocsh

1 2003/P571: IOC Development Environment EPICS Commands for debugging  Try first: epics> help  Then, try some of the other commands: epics> thread epics> dbl epics> dbpr “record_name” epics> scanppl epics> …

1 2003/P571: IOC Development Environment EPICS Commands to check channel  base/bin/  caConnTest.o  CaEventRate  ca_test  Caget  Camonitor  Caput  catime  Cainfo  callbackTestHost

1 2003/P571: IOC Development Environment EPICS Hands-on preparation  Boot you PC using Ubuntu CD  Wait for a while  When Ubuntu desktop is up. Open “terminal”  Applications -> Accessories -> Terminal  Insert your USB memory, if you have  In “Terminal”, input the following commands  ls /media  Cd /media/  Create working directory  mkdir Group App  Replace with your group number shown on your PC  Set User Environment variable  export USER=

Starting Ubuntu ← Just after rebooting PC. Press Enter to proceed. → Automatically log in to Ubuntu as user: ubuntu

Ubuntu:Network configuration ← select network configuration ←select eth0. And click “edit” button → setup IP address/mask or use DHCP

Ubuntu:Open Terminal

1 2003/P571: IOC Development Environment EPICS Hands on  cd Group App  makeBaseApp.pl -t example myexample  makeBaseApp.pl -i -t example myexample  make  Run Iocsh:  do:  cd iocBoot/iocmyexample ../../bin/linux-x86/myexample st.cmd  or  cd iocBoot/iocmyexample  chmod +x./st.cmd ./st.cmd

1 2003/P571: IOC Development Environment EPICS  In inocsh try:  dbl  dbpr  scnppl  In Unix shell try:  caget  cainfo  camonitor  caput,  Create User Interface with edm/medm