Skip to content

Commit 04ef37a

Browse files
EPICS example ai device driver ioc
0 parents  commit 04ef37a

File tree

20 files changed

+399
-0
lines changed

20 files changed

+399
-0
lines changed

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Install directories
2+
/bin/
3+
/cfg/
4+
/db/
5+
/dbd/
6+
/html/
7+
/include/
8+
/lib/
9+
/templates/
10+
11+
# Local configuration files
12+
/configure/*.local
13+
14+
# iocBoot generated files
15+
/iocBoot/*ioc*/cdCommands
16+
/iocBoot/*ioc*/dllPath.bat
17+
/iocBoot/*ioc*/envPaths
18+
/iocBoot/*ioc*/relPaths.sh
19+
20+
# iocsh
21+
.iocsh_history
22+
23+
# Build directories
24+
O.*/
25+
26+
# Common files created by other tools
27+
/QtC-*
28+
/.vscode/
29+
*.orig
30+
*.log
31+
.*.swp
32+
.DS_Store

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Makefile at top of application tree
2+
TOP = .
3+
include $(TOP)/configure/CONFIG
4+
5+
# Directories to build, any order
6+
DIRS += configure
7+
DIRS += $(wildcard *Sup)
8+
DIRS += $(wildcard *App)
9+
DIRS += $(wildcard *Top)
10+
DIRS += $(wildcard iocBoot)
11+
12+
# The build order is controlled by these dependency rules:
13+
14+
# All dirs except configure depend on configure
15+
$(foreach dir, $(filter-out configure, $(DIRS)), \
16+
$(eval $(dir)_DEPEND_DIRS += configure))
17+
18+
# Any *App dirs depend on all *Sup dirs
19+
$(foreach dir, $(filter %App, $(DIRS)), \
20+
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS))))
21+
22+
# Any *Top dirs depend on all *Sup and *App dirs
23+
$(foreach dir, $(filter %Top, $(DIRS)), \
24+
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS))))
25+
26+
# iocBoot depends on all *App dirs
27+
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
28+
29+
# Add any additional dependency rules here:
30+
31+
include $(TOP)/configure/RULES_TOP

configure/CONFIG

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# CONFIG - Load build configuration data
2+
#
3+
# Do not make changes to this file!
4+
5+
# Allow user to override where the build rules come from
6+
RULES = $(EPICS_BASE)
7+
8+
# RELEASE files point to other application tops
9+
include $(TOP)/configure/RELEASE
10+
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
11+
12+
ifdef T_A
13+
-include $(TOP)/configure/RELEASE.Common.$(T_A)
14+
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
15+
endif
16+
17+
# Check EPICS_BASE is set properly
18+
ifneq (file,$(origin EPICS_BASE))
19+
$(error EPICS_BASE must be set in a configure/RELEASE file)
20+
else
21+
ifeq ($(wildcard $(EPICS_BASE)/configure/CONFIG_BASE),)
22+
$(error EPICS_BASE does not point to an EPICS installation)
23+
endif
24+
endif
25+
26+
CONFIG = $(RULES)/configure
27+
include $(CONFIG)/CONFIG
28+
29+
# Override the Base definition:
30+
INSTALL_LOCATION = $(TOP)
31+
32+
# CONFIG_SITE files contain local build configuration settings
33+
include $(TOP)/configure/CONFIG_SITE
34+
35+
# Host-arch specific settings
36+
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
37+
38+
ifdef T_A
39+
# Target-arch specific settings
40+
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
41+
42+
# Host & target specific settings
43+
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
44+
endif
45+

configure/CONFIG_SITE

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# CONFIG_SITE
2+
3+
# Make any application-specific changes to the EPICS build
4+
# configuration variables in this file.
5+
#
6+
# Host/target specific settings can be specified in files named
7+
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
8+
# CONFIG_SITE.Common.$(T_A)
9+
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
10+
11+
# CHECK_RELEASE controls the consistency checking of the support
12+
# applications pointed to by the RELEASE* files.
13+
# Normally CHECK_RELEASE should be set to YES.
14+
# Set CHECK_RELEASE to NO to disable checking completely.
15+
# Set CHECK_RELEASE to WARN to perform consistency checking but
16+
# continue building even if conflicts are found.
17+
CHECK_RELEASE = YES
18+
19+
# Set this when you only want to compile this application
20+
# for a subset of the cross-compiled target architectures
21+
# that Base is built for.
22+
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
23+
24+
# To install files into a location other than $(TOP) define
25+
# INSTALL_LOCATION here.
26+
#INSTALL_LOCATION=</absolute/path/to/install/top>
27+
28+
# Set this when the IOC and build host use different paths
29+
# to the install location. This may be needed to boot from
30+
# a Microsoft FTP server say, or on some NFS configurations.
31+
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
32+
33+
# For application debugging purposes, override the HOST_OPT and/
34+
# or CROSS_OPT settings from base/configure/CONFIG_SITE
35+
#HOST_OPT = NO
36+
#CROSS_OPT = NO
37+
38+
# These allow developers to override the CONFIG_SITE variable
39+
# settings without having to modify the configure/CONFIG_SITE
40+
# file itself.
41+
-include $(TOP)/../CONFIG_SITE.local
42+
-include $(TOP)/configure/CONFIG_SITE.local
43+

configure/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TOP=..
2+
3+
include $(TOP)/configure/CONFIG
4+
5+
TARGETS = $(CONFIG_TARGETS)
6+
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
7+
8+
include $(TOP)/configure/RULES

configure/RELEASE

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# RELEASE - Location of external support modules
2+
#
3+
# IF YOU CHANGE ANY PATHS in this file or make API changes to
4+
# any modules it refers to, you should do a "make rebuild" in
5+
# this application's top level directory.
6+
#
7+
# The EPICS build process does not check dependencies against
8+
# any files from outside the application, so it is safest to
9+
# rebuild it completely if any modules it depends on change.
10+
#
11+
# Host- or target-specific settings can be given in files named
12+
# RELEASE.$(EPICS_HOST_ARCH).Common
13+
# RELEASE.Common.$(T_A)
14+
# RELEASE.$(EPICS_HOST_ARCH).$(T_A)
15+
#
16+
# This file is parsed by both GNUmake and an EPICS Perl script,
17+
# so it may ONLY contain definititions of paths to other support
18+
# modules, variable definitions that are used in module paths,
19+
# and include statements that pull in other RELEASE files.
20+
# Variables may be used before their values have been set.
21+
# Build variables that are NOT used in paths should be set in
22+
# the CONFIG_SITE file.
23+
24+
# Variables and paths to dependent modules:
25+
#MODULES = /path/to/modules
26+
#MYMODULE = $(MODULES)/my-module
27+
28+
# If using the sequencer, point SNCSEQ at its top directory:
29+
#SNCSEQ = $(MODULES)/seq-ver
30+
31+
# EPICS_BASE should appear last so earlier modules can override stuff:
32+
EPICS_BASE = /opt/EPICS
33+
34+
# Set RULES here if you want to use build rules from somewhere
35+
# other than EPICS_BASE:
36+
#RULES = $(MODULES)/build-rules
37+
38+
# These lines allow developers to override these RELEASE settings
39+
# without having to modify this file directly.
40+
-include $(TOP)/../RELEASE.local
41+
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
42+
-include $(TOP)/configure/RELEASE.local

configure/RULES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# RULES
2+
3+
include $(CONFIG)/RULES
4+
5+
# Library should be rebuilt because LIBOBJS may have changed.
6+
$(LIBNAME): ../Makefile

configure/RULES.ioc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#RULES.ioc
2+
include $(CONFIG)/RULES.ioc

configure/RULES_DIRS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#RULES_DIRS
2+
include $(CONFIG)/RULES_DIRS

configure/RULES_TOP

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#RULES_TOP
2+
include $(CONFIG)/RULES_TOP
3+

0 commit comments

Comments
 (0)