From de6808ccf5c45b916a829ed83a36de3319b1733e Mon Sep 17 00:00:00 2001 From: George Ryall Date: Thu, 16 May 2024 16:35:18 +0100 Subject: [PATCH] Add template IOC --- ATTOCUBE/ATTOCUBE-IOC-01App/Db/Makefile | 18 +++++ ATTOCUBE/ATTOCUBE-IOC-01App/Makefile | 9 +++ .../src/ATTOCUBE-IOC-01Main.cpp | 23 ++++++ ATTOCUBE/ATTOCUBE-IOC-01App/src/Makefile | 9 +++ ATTOCUBE/ATTOCUBE-IOC-01App/src/build.mak | 81 +++++++++++++++++++ ATTOCUBE/ATTOCUBE-IOC-02App/Db/Makefile | 18 +++++ ATTOCUBE/ATTOCUBE-IOC-02App/Makefile | 9 +++ .../src/ATTOCUBE-IOC-02Main.cpp | 23 ++++++ ATTOCUBE/ATTOCUBE-IOC-02App/src/Makefile | 9 +++ ATTOCUBE/Makefile | 31 +++++++ ATTOCUBE/configure/CONFIG | 29 +++++++ ATTOCUBE/configure/CONFIG_SITE | 43 ++++++++++ ATTOCUBE/configure/Makefile | 8 ++ ATTOCUBE/configure/RELEASE | 74 +++++++++++++++++ ATTOCUBE/configure/RULES | 6 ++ ATTOCUBE/configure/RULES.ioc | 2 + ATTOCUBE/configure/RULES_DIRS | 2 + ATTOCUBE/configure/RULES_TOP | 3 + ATTOCUBE/iocBoot/Makefile | 6 ++ ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/Makefile | 6 ++ .../iocBoot/iocATTOCUBE-IOC-01/config.xml | 12 +++ .../iocBoot/iocATTOCUBE-IOC-01/st-common.cmd | 44 ++++++++++ ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st.cmd | 18 +++++ ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/Makefile | 6 ++ .../iocBoot/iocATTOCUBE-IOC-02/config.xml | 4 + ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/st.cmd | 18 +++++ Makefile | 1 + 27 files changed, 512 insertions(+) create mode 100644 ATTOCUBE/ATTOCUBE-IOC-01App/Db/Makefile create mode 100644 ATTOCUBE/ATTOCUBE-IOC-01App/Makefile create mode 100644 ATTOCUBE/ATTOCUBE-IOC-01App/src/ATTOCUBE-IOC-01Main.cpp create mode 100644 ATTOCUBE/ATTOCUBE-IOC-01App/src/Makefile create mode 100644 ATTOCUBE/ATTOCUBE-IOC-01App/src/build.mak create mode 100644 ATTOCUBE/ATTOCUBE-IOC-02App/Db/Makefile create mode 100644 ATTOCUBE/ATTOCUBE-IOC-02App/Makefile create mode 100644 ATTOCUBE/ATTOCUBE-IOC-02App/src/ATTOCUBE-IOC-02Main.cpp create mode 100644 ATTOCUBE/ATTOCUBE-IOC-02App/src/Makefile create mode 100644 ATTOCUBE/Makefile create mode 100644 ATTOCUBE/configure/CONFIG create mode 100644 ATTOCUBE/configure/CONFIG_SITE create mode 100644 ATTOCUBE/configure/Makefile create mode 100644 ATTOCUBE/configure/RELEASE create mode 100644 ATTOCUBE/configure/RULES create mode 100644 ATTOCUBE/configure/RULES.ioc create mode 100644 ATTOCUBE/configure/RULES_DIRS create mode 100644 ATTOCUBE/configure/RULES_TOP create mode 100644 ATTOCUBE/iocBoot/Makefile create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/Makefile create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/config.xml create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st.cmd create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/Makefile create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/config.xml create mode 100644 ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/st.cmd diff --git a/ATTOCUBE/ATTOCUBE-IOC-01App/Db/Makefile b/ATTOCUBE/ATTOCUBE-IOC-01App/Db/Makefile new file mode 100644 index 000000000..8eb97279d --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-01App/Db/Makefile @@ -0,0 +1,18 @@ +TOP=../.. +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE + +#---------------------------------------------------- +# Create and install (or just install) into /db +# databases, templates, substitutions like this +#DB += xxx.db + +#---------------------------------------------------- +# If .db template is not named *.template add +# _template = + +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE + diff --git a/ATTOCUBE/ATTOCUBE-IOC-01App/Makefile b/ATTOCUBE/ATTOCUBE-IOC-01App/Makefile new file mode 100644 index 000000000..373b86bfc --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-01App/Makefile @@ -0,0 +1,9 @@ +TOP = .. +include $(TOP)/configure/CONFIG +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *protocol*)) +include $(TOP)/configure/RULES_DIRS + diff --git a/ATTOCUBE/ATTOCUBE-IOC-01App/src/ATTOCUBE-IOC-01Main.cpp b/ATTOCUBE/ATTOCUBE-IOC-01App/src/ATTOCUBE-IOC-01Main.cpp new file mode 100644 index 000000000..ee4967609 --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-01App/src/ATTOCUBE-IOC-01Main.cpp @@ -0,0 +1,23 @@ +/* ATTOCUBE-IOC-01Main.cpp */ +/* Author: Marty Kraimer Date: 17MAR2000 */ + +#include +#include +#include +#include +#include + +#include "epicsExit.h" +#include "epicsThread.h" +#include "iocsh.h" + +int main(int argc,char *argv[]) +{ + if(argc>=2) { + iocsh(argv[1]); + epicsThreadSleep(.2); + } + iocsh(NULL); + epicsExit(0); + return(0); +} diff --git a/ATTOCUBE/ATTOCUBE-IOC-01App/src/Makefile b/ATTOCUBE/ATTOCUBE-IOC-01App/src/Makefile new file mode 100644 index 000000000..f16493c41 --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-01App/src/Makefile @@ -0,0 +1,9 @@ +TOP=../.. +# This file should do very little - it's purpose is to set the APPNAME and then load build.mak + +# this definition is used in build.mak +APPNAME=ATTOCUBE-IOC-01 + +# If we are ###-IOC-01 leave this as is, if we are ###-IOC-02 or higher change to ###-IOC-01 and delete build.mak from this directory +# there should only be a single build.mak for all IOCs of a given family and it is located in the ###-IOC-01 directory +include $(TOP)/ATTOCUBE-IOC-01App/src/build.mak diff --git a/ATTOCUBE/ATTOCUBE-IOC-01App/src/build.mak b/ATTOCUBE/ATTOCUBE-IOC-01App/src/build.mak new file mode 100644 index 000000000..218d1db79 --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-01App/src/build.mak @@ -0,0 +1,81 @@ +TOP=../.. + +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE +#============================= + +### NOTE: there should only be one build.mak for a given IOC family and this should be located in the ###-IOC-01 directory + +#============================= +# Build the IOC application ATTOCUBE-IOC-01 +# We actually use $(APPNAME) below so this file can be included by multiple IOCs + +PROD_IOC = $(APPNAME) +# ATTOCUBE-IOC-01.dbd will be created and installed +DBD += $(APPNAME).dbd + +# ATTOCUBE-IOC-01.dbd will be made up from these files: +$(APPNAME)_DBD += base.dbd +## ISIS standard dbd ## +$(APPNAME)_DBD += icpconfig.dbd +$(APPNAME)_DBD += pvdump.dbd +$(APPNAME)_DBD += asSupport.dbd +$(APPNAME)_DBD += devIocStats.dbd +$(APPNAME)_DBD += caPutLog.dbd +$(APPNAME)_DBD += utilities.dbd +## Stream device support ## +$(APPNAME)_DBD += calcSupport.dbd +$(APPNAME)_DBD += asyn.dbd +$(APPNAME)_DBD += drvAsynSerialPort.dbd +$(APPNAME)_DBD += drvAsynIPPort.dbd +$(APPNAME)_DBD += luaSupport.dbd +$(APPNAME)_DBD += stream.dbd +## add other dbd here ## +#$(APPNAME)_DBD += xxx.dbd + +# Add all the support libraries needed by this IOC + +## Add additional libraries here ## +#$(APPNAME)_LIBS += xxx + +## ISIS standard libraries ## +## Stream device libraries ## +$(APPNAME)_LIBS += stream +$(APPNAME)_LIBS += lua +$(APPNAME)_LIBS += asyn +## other standard libraries here ## +$(APPNAME)_LIBS += devIocStats +$(APPNAME)_LIBS += pvdump $(MYSQLLIB) easySQLite sqlite +$(APPNAME)_LIBS += caPutLog +$(APPNAME)_LIBS += icpconfig +$(APPNAME)_LIBS += autosave +$(APPNAME)_LIBS += utilities pugixml libjson zlib +$(APPNAME)_LIBS += calc sscan +$(APPNAME)_LIBS += pcrecpp pcre +$(APPNAME)_LIBS += seq pv + +# ATTOCUBE-IOC-01_registerRecordDeviceDriver.cpp derives from ATTOCUBE-IOC-01.dbd +$(APPNAME)_SRCS += $(APPNAME)_registerRecordDeviceDriver.cpp + +# Build the main IOC entry point on workstation OSs. +$(APPNAME)_SRCS_DEFAULT += $(APPNAME)Main.cpp +$(APPNAME)_SRCS_vxWorks += -nil- + +# Add support from base/src/vxWorks if needed +#$(APPNAME)_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary + +## area detector already includes PVA, so avoid including it twice +ifeq ($(AREA_DETECTOR),) +include $(CONFIG)/CONFIG_PVA_ISIS +endif + +# Finally link to the EPICS Base libraries +$(APPNAME)_LIBS += $(EPICS_BASE_IOC_LIBS) + +#=========================== + +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE + diff --git a/ATTOCUBE/ATTOCUBE-IOC-02App/Db/Makefile b/ATTOCUBE/ATTOCUBE-IOC-02App/Db/Makefile new file mode 100644 index 000000000..8eb97279d --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-02App/Db/Makefile @@ -0,0 +1,18 @@ +TOP=../.. +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE + +#---------------------------------------------------- +# Create and install (or just install) into /db +# databases, templates, substitutions like this +#DB += xxx.db + +#---------------------------------------------------- +# If .db template is not named *.template add +# _template = + +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE + diff --git a/ATTOCUBE/ATTOCUBE-IOC-02App/Makefile b/ATTOCUBE/ATTOCUBE-IOC-02App/Makefile new file mode 100644 index 000000000..373b86bfc --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-02App/Makefile @@ -0,0 +1,9 @@ +TOP = .. +include $(TOP)/configure/CONFIG +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*)) +DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *protocol*)) +include $(TOP)/configure/RULES_DIRS + diff --git a/ATTOCUBE/ATTOCUBE-IOC-02App/src/ATTOCUBE-IOC-02Main.cpp b/ATTOCUBE/ATTOCUBE-IOC-02App/src/ATTOCUBE-IOC-02Main.cpp new file mode 100644 index 000000000..fa70c0824 --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-02App/src/ATTOCUBE-IOC-02Main.cpp @@ -0,0 +1,23 @@ +/* ATTOCUBE-IOC-02Main.cpp */ +/* Author: Marty Kraimer Date: 17MAR2000 */ + +#include +#include +#include +#include +#include + +#include "epicsExit.h" +#include "epicsThread.h" +#include "iocsh.h" + +int main(int argc,char *argv[]) +{ + if(argc>=2) { + iocsh(argv[1]); + epicsThreadSleep(.2); + } + iocsh(NULL); + epicsExit(0); + return(0); +} diff --git a/ATTOCUBE/ATTOCUBE-IOC-02App/src/Makefile b/ATTOCUBE/ATTOCUBE-IOC-02App/src/Makefile new file mode 100644 index 000000000..84c7be33e --- /dev/null +++ b/ATTOCUBE/ATTOCUBE-IOC-02App/src/Makefile @@ -0,0 +1,9 @@ +TOP=../.. +# This file should do very little - it's purpose is to set the APPNAME and then load build.mak + +# this definition is used in build.mak +APPNAME=ATTOCUBE-IOC-02 + +# If we are ###-IOC-01 leave this as is, if we are ###-IOC-02 or higher change to ###-IOC-01 and delete build.mak from this directory +# there should only be a single build.mak for all IOCs of a given family and it is located in the ###-IOC-01 directory +include $(TOP)/ATTOCUBE-IOC-01App/src/build.mak diff --git a/ATTOCUBE/Makefile b/ATTOCUBE/Makefile new file mode 100644 index 000000000..19c9068d1 --- /dev/null +++ b/ATTOCUBE/Makefile @@ -0,0 +1,31 @@ +# Makefile at top of application tree +TOP = . +include $(TOP)/configure/CONFIG + +# Directories to build, any order +DIRS += configure +DIRS += $(wildcard *Sup) +DIRS += $(wildcard *App) +DIRS += $(wildcard *Top) +DIRS += $(wildcard iocBoot) + +# The build order is controlled by these dependency rules: + +# All dirs except configure depend on configure +$(foreach dir, $(filter-out configure, $(DIRS)), \ + $(eval $(dir)_DEPEND_DIRS += configure)) + +# Any *App dirs depend on all *Sup dirs +$(foreach dir, $(filter %App, $(DIRS)), \ + $(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS)))) + +# Any *Top dirs depend on all *Sup and *App dirs +$(foreach dir, $(filter %Top, $(DIRS)), \ + $(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS)))) + +# iocBoot depends on all *App dirs +iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS)) + +# Add any additional dependency rules here: + +include $(TOP)/configure/RULES_TOP diff --git a/ATTOCUBE/configure/CONFIG b/ATTOCUBE/configure/CONFIG new file mode 100644 index 000000000..c1a470322 --- /dev/null +++ b/ATTOCUBE/configure/CONFIG @@ -0,0 +1,29 @@ +# CONFIG - Load build configuration data +# +# Do not make changes to this file! + +# Allow user to override where the build rules come from +RULES = $(EPICS_BASE) + +# RELEASE files point to other application tops +include $(TOP)/configure/RELEASE +-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common +ifdef T_A +-include $(TOP)/configure/RELEASE.Common.$(T_A) +-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) +endif + +CONFIG = $(RULES)/configure +include $(CONFIG)/CONFIG + +# Override the Base definition: +INSTALL_LOCATION = $(TOP) + +# CONFIG_SITE files contain other build configuration settings +include $(TOP)/configure/CONFIG_SITE +-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common +ifdef T_A + -include $(TOP)/configure/CONFIG_SITE.Common.$(T_A) + -include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) +endif + diff --git a/ATTOCUBE/configure/CONFIG_SITE b/ATTOCUBE/configure/CONFIG_SITE new file mode 100644 index 000000000..212485ebe --- /dev/null +++ b/ATTOCUBE/configure/CONFIG_SITE @@ -0,0 +1,43 @@ +# CONFIG_SITE + +# Make any application-specific changes to the EPICS build +# configuration variables in this file. +# +# Host/target specific settings can be specified in files named +# CONFIG_SITE.$(EPICS_HOST_ARCH).Common +# CONFIG_SITE.Common.$(T_A) +# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) + +# CHECK_RELEASE controls the consistency checking of the support +# applications pointed to by the RELEASE* files. +# Normally CHECK_RELEASE should be set to YES. +# Set CHECK_RELEASE to NO to disable checking completely. +# Set CHECK_RELEASE to WARN to perform consistency checking but +# continue building even if conflicts are found. +CHECK_RELEASE = YES + +# Set this when you only want to compile this application +# for a subset of the cross-compiled target architectures +# that Base is built for. +#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32 + +# To install files into a location other than $(TOP) define +# INSTALL_LOCATION here. +#INSTALL_LOCATION= + +# Set this when the IOC and build host use different paths +# to the install location. This may be needed to boot from +# a Microsoft FTP server say, or on some NFS configurations. +#IOCS_APPL_TOP = + +# For application debugging purposes, override the HOST_OPT and/ +# or CROSS_OPT settings from base/configure/CONFIG_SITE +#HOST_OPT = NO +#CROSS_OPT = NO + +# These allow developers to override the CONFIG_SITE variable +# settings without having to modify the configure/CONFIG_SITE +# file itself. +-include $(TOP)/../CONFIG_SITE.local +-include $(TOP)/configure/CONFIG_SITE.local + diff --git a/ATTOCUBE/configure/Makefile b/ATTOCUBE/configure/Makefile new file mode 100644 index 000000000..925430940 --- /dev/null +++ b/ATTOCUBE/configure/Makefile @@ -0,0 +1,8 @@ +TOP=.. + +include $(TOP)/configure/CONFIG + +TARGETS = $(CONFIG_TARGETS) +CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) + +include $(TOP)/configure/RULES diff --git a/ATTOCUBE/configure/RELEASE b/ATTOCUBE/configure/RELEASE new file mode 100644 index 000000000..5a6aa9e8d --- /dev/null +++ b/ATTOCUBE/configure/RELEASE @@ -0,0 +1,74 @@ +# RELEASE - Location of external support modules +# +# IF YOU CHANGE ANY PATHS in this file or make API changes to +# any modules it refers to, you should do a "make rebuild" in +# this application's top level directory. +# +# The EPICS build process does not check dependencies against +# any files from outside the application, so it is safest to +# rebuild it completely if any modules it depends on change. +# +# Host- or target-specific settings can be given in files named +# RELEASE.$(EPICS_HOST_ARCH).Common +# RELEASE.Common.$(T_A) +# RELEASE.$(EPICS_HOST_ARCH).$(T_A) +# +# This file is parsed by both GNUmake and an EPICS Perl script, +# so it may ONLY contain definititions of paths to other support +# modules, variable definitions that are used in module paths, +# and include statements that pull in other RELEASE files. +# Variables may be used before their values have been set. +# Build variables that are NOT used in paths should be set in +# the CONFIG_SITE file. + +# Variables and paths to dependent modules: +#MODULES = /path/to/modules +#MYMODULE = $(MODULES)/my-module + +# If using the sequencer, point SNCSEQ at its top directory: +#SNCSEQ = $(MODULES)/seq-ver + +# EPICS_BASE should appear last so earlier modules can override stuff: +EPICS_BASE = C:/Instrument/Apps/EPICS/base/master + +# Set RULES here if you want to use build rules from somewhere +# other than EPICS_BASE: +#RULES = $(MODULES)/build-rules + +# These lines allow developers to override these RELEASE settings +# without having to modify this file directly. +-include $(TOP)/../RELEASE.local +-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local +-include $(TOP)/configure/RELEASE.local + +# Macros required for basic ioc/stream device +ACCESSSECURITY=$(SUPPORT)/AccessSecurity/master +ASUBFUNCTIONS=$(SUPPORT)/asubFunctions/master +ASYN=$(SUPPORT)/asyn/master +AUTOSAVE=$(SUPPORT)/autosave/master +CALC=$(SUPPORT)/calc/master +CAPUTLOG=$(SUPPORT)/caPutLog/master +DEVIOCSTATS=$(SUPPORT)/devIocStats/master +ICPCONFIG=$(SUPPORT)/icpconfig/master +LIBJSON=$(SUPPORT)/libjson/master +LUA=$(SUPPORT)/lua/master +MYSQL=$(SUPPORT)/MySQL/master +ONCRPC=$(SUPPORT)/oncrpc/master +PCRE=$(SUPPORT)/pcre/master +PUGIXML=$(SUPPORT)/pugixml/master +PVDUMP=$(SUPPORT)/pvdump/master +SNCSEQ=$(SUPPORT)/seq/master +SQLITE=$(SUPPORT)/sqlite/master +SSCAN=$(SUPPORT)/sscan/master +STREAMDEVICE=$(SUPPORT)/StreamDevice/master +UTILITIES=$(SUPPORT)/utilities/master +ZLIB=$(SUPPORT)/zlib/master + +# optional extra local definitions here +-include $(TOP)/configure/RELEASE.private + +include $(TOP)/../../../ISIS_CONFIG +-include $(TOP)/../../../ISIS_CONFIG.$(EPICS_HOST_ARCH) + +# IOC-specific support module +ATTOCUBE=$(SUPPORT)/attocube/master diff --git a/ATTOCUBE/configure/RULES b/ATTOCUBE/configure/RULES new file mode 100644 index 000000000..6d56e14e8 --- /dev/null +++ b/ATTOCUBE/configure/RULES @@ -0,0 +1,6 @@ +# RULES + +include $(CONFIG)/RULES + +# Library should be rebuilt because LIBOBJS may have changed. +$(LIBNAME): ../Makefile diff --git a/ATTOCUBE/configure/RULES.ioc b/ATTOCUBE/configure/RULES.ioc new file mode 100644 index 000000000..901987c6c --- /dev/null +++ b/ATTOCUBE/configure/RULES.ioc @@ -0,0 +1,2 @@ +#RULES.ioc +include $(CONFIG)/RULES.ioc diff --git a/ATTOCUBE/configure/RULES_DIRS b/ATTOCUBE/configure/RULES_DIRS new file mode 100644 index 000000000..3ba269dcc --- /dev/null +++ b/ATTOCUBE/configure/RULES_DIRS @@ -0,0 +1,2 @@ +#RULES_DIRS +include $(CONFIG)/RULES_DIRS diff --git a/ATTOCUBE/configure/RULES_TOP b/ATTOCUBE/configure/RULES_TOP new file mode 100644 index 000000000..d09d668d5 --- /dev/null +++ b/ATTOCUBE/configure/RULES_TOP @@ -0,0 +1,3 @@ +#RULES_TOP +include $(CONFIG)/RULES_TOP + diff --git a/ATTOCUBE/iocBoot/Makefile b/ATTOCUBE/iocBoot/Makefile new file mode 100644 index 000000000..91e47d0b5 --- /dev/null +++ b/ATTOCUBE/iocBoot/Makefile @@ -0,0 +1,6 @@ +TOP = .. +include $(TOP)/configure/CONFIG +DIRS += $(wildcard *ioc*) +DIRS += $(wildcard as*) +include $(CONFIG)/RULES_DIRS + diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/Makefile b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/Makefile new file mode 100644 index 000000000..09b391227 --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/Makefile @@ -0,0 +1,6 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +#ARCH = windows-x64 +ARCH = $(EPICS_HOST_ARCH) +TARGETS = envPaths dllPath.bat relPaths.sh runIOC.bat runIOC.sh +include $(TOP)/configure/RULES.ioc diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/config.xml b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/config.xml new file mode 100644 index 000000000..2b1dab7ac --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/config.xml @@ -0,0 +1,12 @@ + + + +This is a template description +These are template details + + + + + + + diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd new file mode 100644 index 000000000..a87cfa517 --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd @@ -0,0 +1,44 @@ +epicsEnvSet "STREAM_PROTOCOL_PATH" "$(ATTOCUBE)/data" +epicsEnvSet "DEVICE" "L0" + +##ISIS## Run IOC initialisation +< $(IOCSTARTUP)/init.cmd + +## Device simulation mode IP configuration +$(IFDEVSIM) drvAsynIPPortConfigure("$(DEVICE)", "localhost:$(EMULATOR_PORT=57677)") + +## For recsim: +$(IFRECSIM) drvAsynSerialPortConfigure("$(DEVICE)", "$(PORT=NUL)", 0, 1, 0, 0) + +## For real device: +$(IFNOTDEVSIM) $(IFNOTRECSIM) drvAsynSerialPortConfigure("$(DEVICE)", "$(PORT=NO_PORT_MACRO)", 0, 0, 0, 0) +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)", -1, "baud", "$(BAUD=9600)") +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)", -1, "bits", "$(BITS=8)") +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)", -1, "parity", "$(PARITY=none)") +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)", -1, "stop", "$(STOP=1)") +## Hardware flow control off +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)", 0, "clocal", "Y") +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)",0,"crtscts","N") +## Software flow control off +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)",0,"ixon","N") +$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("$(DEVICE)",0,"ixoff","N") + +## Load record instances + +##ISIS## Load common DB records +< $(IOCSTARTUP)/dbload.cmd + +## Load our record instances +dbLoadRecords("$(ATTOCUBE)/db/attocube.db","PVPREFIX=$(MYPVPREFIX),P=$(MYPVPREFIX)$(IOCNAME):,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),PORT=$(DEVICE)") + +##ISIS## Stuff that needs to be done after all records are loaded but before iocInit is called +< $(IOCSTARTUP)/preiocinit.cmd + +cd "${TOP}/iocBoot/${IOC}" +iocInit + +## Start any sequence programs +#seq sncxxx,"user=ooy64575" + +##ISIS## Stuff that needs to be done after iocInit is called e.g. sequence programs +< $(IOCSTARTUP)/postiocinit.cmd diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st.cmd b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st.cmd new file mode 100644 index 000000000..acb44d021 --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-01/st.cmd @@ -0,0 +1,18 @@ +#!../../bin/windows-x64/ATTOCUBE-IOC-01 + +## You may have to change ATTOCUBE-IOC-01 to something else +## everywhere it appears in this file + +# Increase this if you get <> or discarded messages warnings in your errlog output +errlogInit2(65536, 256) + +< envPaths + +cd "${TOP}" + +## Register all support components +dbLoadDatabase "dbd/ATTOCUBE-IOC-01.dbd" +ATTOCUBE_IOC_01_registerRecordDeviceDriver pdbbase + +## calling common command file in ioc 01 boot dir +< ${TOP}/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/Makefile b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/Makefile new file mode 100644 index 000000000..09b391227 --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/Makefile @@ -0,0 +1,6 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +#ARCH = windows-x64 +ARCH = $(EPICS_HOST_ARCH) +TARGETS = envPaths dllPath.bat relPaths.sh runIOC.bat runIOC.sh +include $(TOP)/configure/RULES.ioc diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/config.xml b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/config.xml new file mode 100644 index 000000000..78b864645 --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/config.xml @@ -0,0 +1,4 @@ + + + + diff --git a/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/st.cmd b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/st.cmd new file mode 100644 index 000000000..ef31c7e5b --- /dev/null +++ b/ATTOCUBE/iocBoot/iocATTOCUBE-IOC-02/st.cmd @@ -0,0 +1,18 @@ +#!../../bin/windows-x64/ATTOCUBE-IOC-02 + +## You may have to change ATTOCUBE-IOC-02 to something else +## everywhere it appears in this file + +# Increase this if you get <> or discarded messages warnings in your errlog output +errlogInit2(65536, 256) + +< envPaths + +cd "${TOP}" + +## Register all support components +dbLoadDatabase "dbd/ATTOCUBE-IOC-02.dbd" +ATTOCUBE_IOC_02_registerRecordDeviceDriver pdbbase + +## calling common command file in ioc 01 boot dir +< ${TOP}/iocBoot/iocATTOCUBE-IOC-01/st-common.cmd diff --git a/Makefile b/Makefile index cabadaab1..05e43dc8e 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,7 @@ IOCDIRS += PACE5000 IOCDIRS += MEASM905 IOCDIRS += LM500 IOCDIRS += RKNMNTR +IOCDIRS += ATTOCUBE ## check on missing directories IOCMAKES = $(wildcard */Makefile)