Compare commits

..

91 Commits

Author SHA1 Message Date
4476c71f62 removed 'git describe' from EPICS version string, as it is now shown in Revision string 2020-06-26 11:17:51 +02:00
e9471b3072 Merge branch '7.0' of https://git.launchpad.net/epics-base into PSI-7.0 2020-06-24 18:01:47 +02:00
Michael Davidsaver
19146a597b WIN32: fix epicsSocketEnableAddressReuseDuringTimeWaitState() 2020-06-19 20:17:14 -07:00
Michael Davidsaver
4eb8ea33ea make-tar add -v and -d arguments
Add -d developer mode to permit export of
branches and raw revisions.

Switch to bash for builtin getopts
2020-06-19 20:17:14 -07:00
Michael Davidsaver
1e425159ed travis mixup STATIC=YES
Ensure that trusty isn't only tested with STATIC=YES,
and others only STATIC=NO.
2020-06-19 20:17:14 -07:00
Andrew Johnson
9259e40483 Perl scripts: leading tabs => spaces, rm trailing spaces 2020-06-17 16:00:31 -05:00
Andrew Johnson
b8f0fd4cdb Make BKPT field an epicsUInt8 for consistency
It was the last 'char' field in dbCommon and the Base record types.
2020-06-12 17:11:34 -05:00
Andrew Johnson
545550dd9a convertRelease: Restore $Bin to @INC
This is needed when convertRelease.pl gets run before the
EPICS::Path and EPICS::Release modules are installed, and
after 'make uninstall' has deleted the lib/perl directory.
2020-06-05 12:51:54 -05:00
Andrew Johnson
eb060e7fcd RULES_MODULES: Fix runtests with no submodules 2020-06-05 10:23:07 -05:00
4082cb27c3 new architecture nilrt7-armv7a (NI Linux Real Time) for ESI 2020-06-03 10:47:14 +02:00
88cdffddb6 Merge branch '7.0' release 7.4.0.1 into PSI-7.0
Conflicts:
	.gitmodules
	modules/database/src/ioc/db/Makefile
	modules/libcom/test/epicsAtomicTest.cpp
	modules/pvAccess
	modules/pvData
	modules/pvDatabase
	modules/pva2pva
2020-06-03 10:46:07 +02:00
Michael Davidsaver
786c4c2ca2 Revert "dbRecordtypeFieldItem() avoid excess strcmp()"
This reverts commit 48eb4ff4ac.
2020-06-02 11:26:07 -07:00
Michael Davidsaver
48eb4ff4ac dbRecordtypeFieldItem() avoid excess strcmp()
only one is going to match.
2020-06-02 07:55:22 -07:00
Michael Davidsaver
6c914d19c3 db: validate dbrType 2020-06-02 07:55:22 -07:00
Michael Davidsaver
d6f8e9038c getLinkValue() use dbInitEntryFromAddr()
Called from dbGet().  Optimize hash table lookup
and bsearch of array to O(0) assignment.
2020-06-02 07:55:22 -07:00
Michael Davidsaver
5917990908 dbPutGetTest test plain array field 2020-06-02 07:55:22 -07:00
Michael Davidsaver
eeb198db15 change arrRecord cvt_dbaddr() to behave like waveformRecord et al. 2020-06-02 07:55:22 -07:00
Andrew Johnson
1fec685eed Merge new stuff after the 7.0.4 release work 2020-05-28 21:23:44 -05:00
Andrew Johnson
0bfe0eda0c Update the things to skip in make-tar.sh 2020-05-28 21:18:28 -05:00
Michael Davidsaver
6188d3fdaf update doc comments 2020-05-28 16:26:56 -07:00
Andrew Johnson
cd07888149 Set next development versions 2020-05-28 18:25:32 -05:00
Michael Davidsaver
688bc3247c missing include 2020-05-28 16:07:50 -07:00
b27d1416b5 install location with patch level 2020-04-07 15:38:05 +02:00
ab97b5fe54 Bring back VxWorks 5 compatibility 2020-04-07 15:37:32 +02:00
bbaa207603 Merge remote-tracking branch 'remotes/xiaoqiang/wine_msvc' into PSI-7.0 2020-04-06 14:00:56 +02:00
Xiaoqiang Wang
605937bbac use the msvc from a new location 2020-04-06 11:05:04 +02:00
Xiaoqiang Wang
594fcb9a0d CXXFLAGS from CONFIG_win32-x86.Common 2020-04-03 15:10:46 +02:00
Xiaoqiang Wang
e033c0cfb2 use MSVC via WINE to compile for windows 2020-04-01 14:44:38 +02:00
Xiaoqiang Wang
53ebbab941 use MSVC_DIR to pick up MSVC toolchains 2020-04-01 14:42:18 +02:00
86adc529ef Merge remote-tracking branch 'origin' into PSI-7.0
Conflicts:
	configure/os/CONFIG_SITE.Common.linuxCommon
	modules/libcom/src/log/iocLog.c
	modules/libcom/src/log/logClient.c
	modules/pvAccess
	modules/pvData
	modules/pvDatabase
2020-02-06 17:28:40 +01:00
3a774d37f8 call shell to get EPICS_SITE_VERSION only when compiling EPICS base 2019-09-20 09:02:35 +02:00
5f6b1e2b16 (Re-)connect only when there is something to send. This avoids constant useless disconnect/connect cycles if the server (or firewall) keeps closing the connection. 2019-09-04 10:14:05 +02:00
584caf54b2 don't use space in version string 2019-09-03 09:17:38 +02:00
d602c1cdcb detect when server closes connection. can only be done reliably with recv, not with send 2019-09-02 17:47:43 +02:00
12ce14b6e5 no need to delay startup only because log server is currently not available 2019-09-02 17:47:43 +02:00
e02709b3a4 send pending log messages directly after connecting 2019-09-02 17:47:43 +02:00
b19709039d avoid needless memmove calls 2019-09-02 17:47:42 +02:00
3c4ffbf267 elimitate duplicate code in logClient 2019-09-02 17:47:42 +02:00
4942da0c88 do not discard unsent messages when log server has closed connection, instead try to send them after reconnect 2019-09-02 17:47:42 +02:00
5f547257ac speed up logRestart thread termination at exit 2019-09-02 17:47:42 +02:00
1b99366887 don't send errlog on all logClients 2019-09-02 17:47:42 +02:00
871af36ac5 move -fno-strict-aliasing flag to central place for all Linux version 2019-09-02 16:44:53 +02:00
0ad6d2aec9 typo in comment 2019-09-02 13:53:21 +02:00
8837d2f275 use perl instead of date in EPICS_SITE_VERSION because of Windows 2019-09-02 10:49:44 +02:00
09a17127a9 make xxxTestHarness TESTPRODs instead of PRODs 2019-09-02 10:47:43 +02:00
3699c5bc4c fix strict-aliasing warnings 2019-08-26 15:50:07 +02:00
157b0867fa removed unused vxWorks version defaults 2019-08-14 14:06:05 +02:00
56529964f3 always use -g for non-vxWorks gnu compiler 2019-08-14 13:55:07 +02:00
c28e240fce clear whitespace 2019-08-14 11:39:30 +02:00
b04b2dab22 fix astac crash 2019-08-13 15:13:54 +02:00
8edcd7b07f use READLINE as default for all Linux systems 2019-08-09 16:21:08 +02:00
ca78451122 move PSI specifics out to CONFIG_SITE. files 2019-08-09 13:33:41 +02:00
4cc44e3dce cleanup spaces 2019-08-09 13:32:49 +02:00
e81d3a1d7d remove strict-aliasing warnings in RHEL7 2019-08-09 11:34:50 +02:00
53dd61b80a merged with R7.0.3 2019-08-09 11:31:43 +02:00
5b754d320f fix posix epicsThreadSleepQuantum() implementation not to return 0.01 on Linux 2019-07-24 14:17:25 +02:00
2be2658cfc added modules/pcas 2019-07-22 17:12:22 +02:00
2b157096e6 merge branch '7.0' into 'PSI-7.0' 2019-07-22 15:44:08 +02:00
71eaddfd84 Merge branch 'refs/heads/PSI-7.0.1' into PSI-7.0 2019-07-22 15:36:33 +02:00
5589deb3ad make sure softIoc for vxWorks contains all functions 2019-07-22 15:17:18 +02:00
0bb80e373b add simple calculations to macros 2019-05-10 14:44:17 +02:00
4acdd83984 also build pcas 2019-05-10 11:13:23 +02:00
d12d38f970 re-enable -fno-strict-aliasing for vxWorks 2019-05-10 11:08:48 +02:00
74d9749255 fix install location 2019-05-10 11:07:50 +02:00
3276ada78a build for DeltaTau with ELDK-5.3 for newer C++ compiler 2019-05-08 17:32:50 +02:00
de378eec34 also build pcas 2019-04-03 15:14:34 +02:00
dbb2d875fb undo commit 2206934 which introduces a MKDIR rule that conflicts with driver/makefile 2019-04-03 15:13:00 +02:00
c7f966a1f5 fix install location 2019-04-03 15:10:28 +02:00
7889dda6f8 merged with upstream 2019-02-20 10:51:02 +01:00
a2ccf3b631 add raspberryPi and skip unused vxWorks archs 2018-10-31 15:23:05 +01:00
57db34b303 Merge branch 'FixShellCommands' into PSI-7.0 2018-10-24 09:25:44 +02:00
4f790758af no PVA for mvl40-xscale_be 2018-10-23 10:01:13 +02:00
ce9dfc6bb4 need some .o files, but there aren't many any more 2018-10-18 16:20:45 +02:00
4f40ad1927 build for mvl40-xscale_be (without PVA)configure/os/CONFIG.Common.mvl40-xscale_be 2018-10-18 16:20:13 +02:00
a42a4010d6 skip building with clang on old SL6 to avoid problems with cross build from RHEL7 2018-10-11 13:20:59 +02:00
a2aa17fafc some drivers complain about strict-aliasing 2018-10-11 08:36:35 +02:00
5bf2784db2 add -fno-strict-aliasing for those archs which complain about anyscalar.h 2018-10-05 10:43:08 +02:00
7a4e7b7600 add tar and copysrc make rules 2018-10-03 17:13:13 +02:00
70aa23513f use -isystem option to find correct headers for cross compiling for old Linux host versions 2018-10-03 16:47:57 +02:00
71ded2f25f install dbCaPvt.h needed by devIocStats/ioccar 2018-10-03 16:43:32 +02:00
11103351b2 add build year-month to version string 2018-10-03 16:38:53 +02:00
146a413977 add -isystem to avoid system headers in .d files (does not work for vxWorks 5) 2018-10-03 13:48:09 +02:00
4e44550f62 Merge branch 'FixShellCommands' into PSI-7.0 2018-09-28 11:41:52 +02:00
9952470486 Merge branch 'FixShellCommands' into PSI-7.0 2018-09-27 13:58:23 +02:00
02d30dedbc install server.h for misc module 2018-09-26 16:10:30 +02:00
5ed0fe52a0 Merge branch '7.0' into PSI-7.0 2018-09-26 11:45:19 +02:00
42b1f774da add PSI configuration 2018-09-25 11:13:08 +02:00
7738b68320 fix missing template instances for old vxWorks (uses -fno-implicit-templates) 2018-09-24 18:00:53 +02:00
1199fabe90 Fix strange compiler errors with gcc 2.96:
using <namespace::function>; seems not to work but
using namespace <namespace>; works
Also 'add' only works with explicit namespace. Why?
2018-09-21 16:21:13 +02:00
1aefc5f2f0 re-enable building vxWorks 5 2018-09-21 16:20:17 +02:00
6f666c6c22 Add mechanism to skip modules for selected architectures 2018-09-21 15:50:06 +02:00
118 changed files with 1189 additions and 332 deletions

1
.ci

Submodule .ci deleted from 55038b7315

3
.gitmodules vendored
View File

@@ -26,3 +26,6 @@
path = .ci
url = https://github.com/epics-base/ci-scripts
branch = master
[submodule "modules/pcas"]
path = modules/pcas
url = https://github.com/epics-modules/pcas

View File

@@ -1,22 +1,26 @@
#!/bin/sh
#!/bin/bash
#
# Make tar for git repo w/ one level of sub modules.
#
set -e
set -e -u
die() {
echo "$1" >&2
exit 1
}
TOPREV="$1"
FINALTAR="$2"
PREFIX="$3"
maybedie() {
if [ "$DEVMODE" ]; then
echo "Warning: $1" >&2
else
echo "Error: $1" >&2
exit 1
fi
}
if ! [ "$TOPREV" ]
then
usage() {
cat <<EOF >&2
usage: $0 <rev> [<outfile> [<prefix>]]
usage: $0 [-v] [-s] <rev> [<outfile> [<prefix>]]
<rev> may be any git revision spec. (tag, branch, or commit id).
@@ -24,9 +28,33 @@ usage: $0 <rev> [<outfile> [<prefix>]]
If <outfile> is omitted, "base-<rev>.tar.gz" will be used.
If provided, <prefix> must end with "/". If <prefix> is omitted,
the default is "base-<rev>/".
Options:
-v Enable verbose prints
-d Enable permissive developer mode
EOF
exit 1
fi
}
export DEVMODE=
while getopts "vd" OPT
do
case "$OPT" in
v) set -x;;
d) DEVMODE=1;;
?) echo "Unknown option"
usage;;
esac
done
shift $(($OPTIND - 1))
TOPREV="$1"
FINALTAR="$2"
PREFIX="${3:-}"
[ "$TOPREV" ] || usage
case "$FINALTAR" in
"")
@@ -59,16 +87,13 @@ case "$PREFIX" in
esac
# Check for both <tag> and R<tag>
if [ "$TOPREV" = "HEAD" ]
then
true
elif ! [ `git tag -l $TOPREV` ]
if ! [ `git tag -l $TOPREV` ]
then
if [ `git tag -l R$TOPREV` ]
then
TOPREV="R$TOPREV"
else
die "No tags exist '$TOPREV' or 'R$TOPREV'"
maybedie "No tags exist '$TOPREV' or 'R$TOPREV'"
fi
fi
@@ -89,11 +114,17 @@ git archive --prefix=$PREFIX $TOPREV | tar -C "$TDIR"/tar -x
#
# sub-modules appear in tree as eg.:
# 160000 commit c3a6cfcf0dad4a4eeecf59b474710d06ff3eb68a modules/ca
git ls-tree -r $TOPREV | awk '/^[0-9]+ commit / {print $3, $4}' | \
git ls-tree -r $TOPREV | \
awk '/^[0-9]+ commit / && $4 != ".ci" {print $3, $4}' | \
while read HASH MODDIR
do
echo "Visiting $HASH $MODDIR"
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
if [ -e $MODDIR/.git ]
then
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
else
maybedie " Submodule not checked out."
fi
done
# make a list of files copied and filter out undesirables
@@ -105,13 +136,17 @@ sed -i -e 's|^\./||' "$TDIR"/list.1
# Exclude files
sed \
-e '/\/\.\?ci\//d' \
-e '/\/\.ci\//d' \
-e '/\/\.ci-local\//d' \
-e '/\/\.tools\//d' \
-e '/\/jenkins\//d' \
-e '/\/\.git/d' \
-e '/\/\.hgtags$/d' \
-e '/\/\.cproject$/d' \
-e '/\/\.project$/d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/\.appveyor\.yml$/d' \
-e '/\/\.readthedocs\.yml$/d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2
@@ -129,5 +164,5 @@ tar -t $TAROPT -f "$FINALTAR" > "$TDIR"/list.3
# make sure we haven't picked up anything extra
if ! diff -u "$TDIR"/list.2 "$TDIR"/list.3
then
echo "Oops! Tarfile diff against plan shown above"
die "Oops! Tarfile diff against plan shown above"
fi

View File

@@ -51,10 +51,10 @@ jobs:
- dist: xenial
- dist: bionic
env: EXTRA="CMD_CXXFLAGS=-std=c++11"
env: STATIC=YES EXTRA="CMD_CXXFLAGS=-std=c++11"
- dist: trusty
env: STATIC=YES EXTRA="CMD_CXXFLAGS=-std=c++11"
env: EXTRA="CMD_CXXFLAGS=-std=c++11"
- dist: bionic
compiler: clang

View File

@@ -23,3 +23,10 @@ DIRS += modules
modules_DEPEND_DIRS = src
include $(TOP)/configure/RULES_TOP
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
copysrc:
tar cf - --exclude-vcs --exclude-backups --exclude=O.* modules/*/src | tar xf - -C $(INSTALL_LOCATION)
tar:
tar cfjP epics_base-$(EPICS_VERSION_NUMBER).tar.bz2 $(INSTALL_LOCATION)

View File

@@ -58,12 +58,8 @@ include $(CONFIG)/CONFIG_BASE_VERSION
include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).Common
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
# Parse configure/RELEASE
# except when building Base itself, where this file is empty,
# and would error in src/tools/ anyway.
ifndef BASE_TOP
# Parse configure/RELEASE to find all upstream modules
RELEASE_TOPS := $(shell $(CONVERTRELEASE) -T $(TOP) releaseTops)
endif
ifdef T_A

View File

@@ -34,7 +34,7 @@ CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
WARN_CFLAGS_YES = -Wall
WARN_CFLAGS_NO = -w
OPT_CFLAGS_YES = -O3
OPT_CFLAGS_YES = -O3 -g
OPT_CFLAGS_NO = -g
PROF_CXXFLAGS_YES = -p
@@ -43,7 +43,7 @@ CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
CODE_CXXFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
WARN_CXXFLAGS_YES = -Wall
WARN_CXXFLAGS_NO = -w
OPT_CXXFLAGS_YES = -O3
OPT_CXXFLAGS_YES = -O3 -g
OPT_CXXFLAGS_NO = -g
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))

View File

@@ -52,12 +52,12 @@ EPICS_MODIFICATION = 4
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included in the official EPICS version number if zero
EPICS_PATCH_LEVEL = 0
EPICS_PATCH_LEVEL = 1
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
EPICS_DEV_SNAPSHOT=
#EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=
EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=-pre1
#EPICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-rc1

View File

@@ -2,11 +2,11 @@
EPICS_CA_MAJOR_VERSION = 4
EPICS_CA_MINOR_VERSION = 13
EPICS_CA_MAINTENANCE_VERSION = 6
EPICS_CA_MAINTENANCE_VERSION = 7
# Development flag, set to zero for release versions
EPICS_CA_DEVELOPMENT_FLAG = 0
EPICS_CA_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -2,11 +2,11 @@
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 18
EPICS_DATABASE_MAINTENANCE_VERSION = 0
EPICS_DATABASE_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions
EPICS_DATABASE_DEVELOPMENT_FLAG = 0
EPICS_DATABASE_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -2,11 +2,11 @@
EPICS_LIBCOM_MAJOR_VERSION = 3
EPICS_LIBCOM_MINOR_VERSION = 18
EPICS_LIBCOM_MAINTENANCE_VERSION = 0
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions
EPICS_LIBCOM_DEVELOPMENT_FLAG = 0
EPICS_LIBCOM_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -161,7 +161,9 @@ USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
# Site version number, if set will append '-' and this string to the
# EPICS version number string that is reported by many tools.
EPICS_SITE_VERSION =
ifeq ($(INSTALL_LOCATION),$(EPICS_BASE))
EPICS_SITE_VERSION=$(shell $(PERL) -MPOSIX -e 'print strftime "%Y-%m-%d", localtime')
endif
# For GNU compiler, use pipes rather than temporary files for
# communication between the various stages of compilation.

View File

@@ -86,6 +86,23 @@ include $(CONFIG)/RULES_FILE_TYPE
include $(CONFIG)/RULES.Db
#---------------------------------------------------------------
# Do not build anything if current path matches SKIP_BUILD
ifneq (,$(strip $(SKIP_BUILDS)))
CURRENT_MODULE=$(subst $(realpath $(TOP)/..)/,,$(subst $(realpath $(dir $(lastword $(MAKEFILE_LIST)))..)/,,$(realpath ..)))
ifneq ($(filter $(SKIP_BUILDS) $(addsuffix /%,$(SKIP_BUILDS)),$(CURRENT_MODULE)),)
$(info Skipping $(CURRENT_MODULE) for $(T_A))
PROD=
TESTPROD=
LIBRARY=
TESTLIBRARY=
LOADABLE_LIBRARY=
TESTS=
SRC_FILES=
endif
endif
#---------------------------------------------------------------
# Include defines and rules for prod, library and test* targets
@@ -208,9 +225,9 @@ $(LOADABLE_SHRLIBNAME): FINAL_DIR=$(INSTALL_SHRLIB)
$(TESTPRODNAME) $(PRODNAME): $(PRODUCT_OBJS) $(PROD_RESS) $(PROD_DEPLIBS)
$(TESTPRODNAME) $(PRODNAME): %$(EXE): | $(INSTALL_LIB)
$(TESTPRODNAME) $(PRODNAME): %$(EXE):
@$(RM) $@
$(LINK.cpp)
$(DEBUGCMD) $(LINK.cpp)
$(MT_EXE_COMMAND)
%_ctdt$(OBJ): %_ctdt.c
@@ -311,10 +328,6 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
$(LINK.shrlib)
$(MT_DLL_COMMAND)
$(LIBNAME) $(SHRLIBNAME) $(LOADABLE_SHRLIBNAME): | $(INSTALL_LIB)
$(INSTALL_LIB):
@$(MKDIR) $@
#---------------------------------------------------------------
# C++ munching for VxWorks
@@ -490,11 +503,9 @@ $(INSTALL_TCLLIB)/%: ../%
@$(INSTALL) -d -m $(BIN_PERMISSIONS) $< $(INSTALL_TCLLIB)
endif
ifneq ($(TCLINDEX),)
$(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
$(ECHO) "Updating $@"
$(ECHO) eval auto_mkindex $(INSTALL_TCLLIB) "$(TCLLIBNAME)" | tclsh
endif
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing loadable shared library $@"

View File

@@ -50,9 +50,11 @@ realclean:
# Append all our live submodule failure files
FAILURE_FILES = $(addsuffix /$(TEST_FAILURE_FILENAME), $(LIVE_SUBMODULES))
define combine_failure_files
@$(TOUCH) $(FAILURE_FILES)
@$(CAT) $(FAILURE_FILES) >> $(TEST_FAILURE_FILE)
endef
runtests: | $(addsuffix $(DIVIDER)runtests, $(LIVE_SUBMODULES))
@$(TOUCH) $(FAILURE_FILES)
@$(CAT) $(FAILURE_FILES) >> $(TEST_FAILURE_FILE)
$(if $(FAILURE_FILES), $(combine_failure_files))
test-results: | $(addsuffix $(DIVIDER)test-results, $(LIVE_SUBMODULES))
@$(TOUCH) $(FAILURE_FILES)
@$(CAT) $(FAILURE_FILES) >> $(TEST_FAILURE_FILE)
$(if $(FAILURE_FILES), $(combine_failure_files))

View File

@@ -0,0 +1,2 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang

View File

@@ -0,0 +1,6 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86
COMMANDLINE_LIBRARY = READLINE_NCURSES
ARCH_DEP_CFLAGS += -march=i686

View File

@@ -0,0 +1,4 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
COMMANDLINE_LIBRARY = READLINE_NCURSES

View File

@@ -0,0 +1,4 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86
ARCH_DEP_CFLAGS += -march=i686

View File

@@ -0,0 +1,2 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 5.5.1
WIND_BASE = /afs/psi.ch/project/vxworks/Tornado2.2.1
#there is a problem with our ccppc and optimization
# -O0 works, -O and -O1 and higher are buggy
OPT_CFLAGS_YES = -O0
OPT_CXXFLAGS_YES = -O0

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.2

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
VXWORKS_VERSION = 6.3
# Buggy "uninitialized variable" warning produces many false positives
ARCH_DEP_CXXFLAGS += -Wno-uninitialized

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.3
# Buggy "uninitialized variable" warning produces many false positives
ARCH_DEP_CXXFLAGS += -Wno-uninitialized

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
VXWORKS_VERSION = 6.6

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.6

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.7
#needed when including memPartLib.h, e.g. through moduleLib.h or loadLib.h
ARCH_DEP_CFLAGS += -D_VSB_CONFIG_FILE='<../lib/h/config/vsbConfig.h>'

View File

@@ -0,0 +1,22 @@
# DeltaTau PowerPMAC with ELDK 4.2
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
COMMANDLINE_LIBRARY = READLINE_NCURSES
ARCH_CLASS = ppc
ELDK=/opt/eldk-4.2
GNU_TARGET=ppc_4xxFP
GNU_DIR=$(ELDK)/usr
# This cross tool chain is installed in a somehow weired way
# Without the following lines it does not work on RHEL7
# but it worked on SL6
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/powerpc-linux
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/backward
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/lib
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib

View File

@@ -0,0 +1,14 @@
# Virtex FPGA embedded Processor with ELDK 5.1
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.1
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_TARGET = powerpc-4xx-softfloat
GNU_ARCH = ppc405-linux
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)

View File

@@ -0,0 +1,15 @@
# IOxOS IFC1210 with ELDK 5.2
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.2
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_TARGET = powerpc-e500v2
GNU_ARCH = ppce500v2-linux-gnuspe
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
GNU_TARGET_INCLUDE_DIR =

View File

@@ -0,0 +1,21 @@
# DeltaTau PowerPMAC with ELDK 5.3
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.3
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_ARCH = ppc440e-linux
SDKTARGETSYSROOT=$(SDK_DIR)/powerpc-4xx/sysroots
GNU_DIR = $(SDKTARGETSYSROOT)/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
GNU_TARGET_INCLUDE_DIR =
GNU_TARGET=powerpc-linux
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
ARCH_DEP_CPPFLAGS += --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
AS=$(GNU_BIN)/$(GNU_TARGET)-as

View File

@@ -0,0 +1,23 @@
# IOxOS IFC1211 with Freescale QorIQ 2.0 toolchain
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = fslsdk
SDK_DIR = /opt/fsl-qoriq/2.0
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
SDK_TARGET = ppc64e6500-fsl-linux
GNU_TARGET = powerpc64-fsl-linux
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
ARCH_DEP_CFLAGS = -mcpu=e6500 -m64 -mhard-float
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
# warning -O2 and higher are broken!
#OPT_CFLAGS_YES = -O1
#OPT_CXXFLAGS_YES = -O1

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.linuxCommon
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++

View File

@@ -0,0 +1,16 @@
# Moxa DA-66x with SDK 4.2 and ARM7 processor
# Include definitions common to all Linux ARM targets
include $(CONFIG)/os/CONFIG.Common.linux-arm
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/arm-linux-4.4.2-v4
GNU_TARGET=arm
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
COMMANDLINE_LIBRARY = READLINE_NCURSES
# suppress note "the mangling of 'va_list' has changed in GCC 4.4"
ARCH_DEP_CXXFLAGS += -Wno-psabi
ARCH_DEP_CFLAGS += -funwind-tables

View File

@@ -0,0 +1,15 @@
# Moxa DA-66x with Montavista Linux 4.0
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
COMMANDLINE_LIBRARY = READLINE_CURSES
ARCH_CLASS = xscale
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/xscale_be/armv5teb-montavista-linuxeabi
ARCH_DEP_CFLAGS += -funwind-tables
# Cannot build PVA because of missing boost support
SKIP_BUILDS = pv% normativeTypes

View File

@@ -0,0 +1,18 @@
# National Instruments CompactRIO running LabView RT 19.5.1
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm
GNU_TARGET = arm-linux-gnu
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
ARCH_DEP_CPPFLAGS += --sysroot=$(SYSROOT)
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi/
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/
ARCH_DEP_LDFLAGS += --sysroot=$(SYSROOT)
COMMANDLINE_LIBRARY = READLINE_NCURSES

View File

@@ -0,0 +1,41 @@
# RaspberryPi with github.com/raspberrypi/tools toolchain
# Tested on:
# * Raspberry 3B+ Raspbian 9
# * Raspberry 2 Raspbian 7
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
# Using readline:
# Due to missing/messed up libs in the toolchain, readline needs copies of
# libtinfo.so.5.9 and libreadline.so.6.2 from a Raspbian 7 rootfs
# /lib/arm-linux-gnueabihf/ to the toolchain, e.g.
# $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/
# and manually created links libtinfo.so.5 and libreadline.so.
# For gcc-linaro-arm-linux-gnueabihf-raspbian, an existing incompatible
# libtinfo.so.5 is in the way. Remove it.
# (Built with glibc 2.16 like installed on Raspbian 9 but toolchain uses glibc 2.13.)
# Also copy /usr/include/readline/ directory from some readline 6 installation
# to $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/
ARCH_CLASS = arm
SDK_DIR = /opt/raspberrypi/arm-bcm2708
# Available SDK_TARGETs:
# gcc 4.8.3 for 32 bit hosts with GLIBC 2.3 or higher
SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian
# gcc 4.8.3 for 64 bit hosts with GLIBC 2.14 or higher
# SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
# gcc 4.7.1 for 64 bit hosts with GLIBC 2.8 or higher
# SDK_TARGET = arm-linux-gnueabihf
# gcc 4.7.1 for 32 bit hosts with GLIBC 2.4 or higher
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
# SDK_TARGET = arm-bcm2708-linux-gnueabi
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)

View File

@@ -13,7 +13,7 @@ CMPLR_SUFFIX = ppc
ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
ARCH_DEP_CFLAGS = -mcpu=603 -mstrict-align
GNU_TARGET = powerpc-wrs-vxworks

View File

@@ -0,0 +1,18 @@
# XILINX Zynq with Yocto 2.1 / Petalinux toolchain
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm64
SDK = petalinux
SDK_DIR = /opt/petalinux-gfa/2017.2
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
SDK_TARGET = aarch64-xilinx-linux
GNU_TARGET = $(SDK_TARGET)
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,16 @@
# "cross compile" for older Linux version
# Use older compiler and older libraries
# Used packages:
# compat-gcc-44-c++-4.4
# compat-gcc-44-4.4
# compat-glibc-headers-2.12-4
# It was neccessary to install 32 bit compatibility libraries manually
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
TARGET_CPPFLAGS = -isystem /usr/lib/x86_64-redhat-linux6E/include
TARGET_LDFLAGS = -L /usr/lib/x86_64-redhat-linux6E/lib
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo

View File

@@ -0,0 +1,16 @@
# "cross compile" for older Linux version
# Use older compiler and older libraries
# Used packages:
# compat-gcc-44-c++-4.4
# compat-gcc-44-4.4
# compat-glibc-headers-2.12-4
# compat-glibc-2.12-4
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
TARGET_CPPFLAGS = -isystem /usr/lib/x86_64-redhat-linux6E/include
TARGET_LDFLAGS = -L /usr/lib/x86_64-redhat-linux6E/lib64
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x86/

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x64/

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,2 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -14,15 +14,15 @@ OPT_WHOLE_PROGRAM = YES
#-------------------------------------------------------
WINLINK = link
WINLINK = $(MSVC_DIR)link
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
RCCMD = $(MSVC_DIR)rc -l 0x409 $(INCLUDES) -fo $@ $<
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
ARCMD = $(MSVC_DIR)lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
#
# Configure OS vendor C compiler
CC = cl
CC = $(MSVC_DIR)cl
# Override CONFIG.gnuCommon settings for cross builds.
GNU = NO
@@ -75,14 +75,14 @@ STATIC_CFLAGS_YES= -MT$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS)
STATIC_CFLAGS_NO= -MD$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS) -DEPICS_CALL_DLL
# OS vendor c preprocessor
CPP = cl -nologo -C -E
CPP = $(MSVC_DIR)cl -nologo -C -E
# Configure OS vendor C++ compiler
#
# -EHsc - generate code for exceptions
# -GR - generate code for run time type identification
#
CCC = cl -EHsc -GR
CCC = $(MSVC_DIR)cl -EHsc -GR
# Other compiler flags, used for CPP, C and C++
#

View File

@@ -0,0 +1,2 @@
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)

View File

@@ -9,3 +9,6 @@
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
COMMANDLINE_LIBRARY = READLINE
CODE_CPPFLAGS += -fno-strict-aliasing

View File

@@ -2,24 +2,58 @@
#
# Site specific definitions for vxWorks target builds.
# Compiler options can vary with the vxWorks version number, so we
# need to know that. Do not include any third-level digits.
#### Fixes for CONFIG.Common.vxWorksCommon #######
# Note: vxWorks 5.4.x and 5.5.x (Tornado 2.x) are not supported.
# VxWorks 6.0 through 6.5 use older, untested versions of GCC.
# These are needed for vxWorks 6.x; the GNU toolset version number
# is in the path to the compiler tools:
VX_GNU_VERSION_5 = 2.96
VX_GNU_VERSION_6 = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_MAJOR_VERSION))
VX_GNU_MINOR_VERSION = $(basename $(patsubst $(VX_GNU_MAJOR_VERSION).%,%,$(VX_GNU_VERSION)))
#VXWORKS_VERSION = 6.6
#VXWORKS_VERSION = 6.7
#VXWORKS_VERSION = 6.8
VXWORKS_VERSION = 6.9
# gcc version before 3.4 are "old" and need special treatment
VX_OLD_GCC_2 = OLD
VX_OLD_GCC_3.3 = OLD
VX_OLD_GCC_3 = $(VX_OLD_GCC_3.$(VX_GNU_MINOR_VERSION))
VX_OLD_GCC = $(VX_OLD_GCC_$(VX_GNU_MAJOR_VERSION))
# vxWorks directory definitions
VX_DIR_5 = $(WIND_BASE)
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
# Sites may override the following path for a particular host
# architecture by adding it to an appropriate
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h $(VX_DIR)/target/h/wrn/coreip
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
TARGET_CPPFLAGS = -isystem $(VX_DIR)/target/h
# vxWorks GNU directories
GNU_DIR_5 = $(WIND_BASE)/host/$(WIND_HOST_TYPE)
GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
# Operating system flags
OP_SYS_CFLAGS += -fno-strict-aliasing
# For gcc versions before 3.4 we need this g++ compiler flag
# However WindRiver says gcc 3.3 does not need it any more
# which would allow to build vxWorks 6 without this flag.
# Maybe we can live without it at the penalty of larger code.
# See vxWorks 5 docs/gnu2.96+ppc/gcc.html
# chapter 4.5 "Where's the Template?"
CODE_CXXFLAGS_OLD = -fno-implicit-templates
CODE_CXXFLAGS = $(CODE_CXXFLAGS_$(VX_OLD_GCC))
# WIND_BASE is where you installed the Wind River software.
WIND_BASE = /afs/psi.ch/project/vxworks/VxWorks$(VXWORKS_VERSION)
#--------------------------------------------------
# Modules we cannot build with old compiler
PV_MODULES = pv% normativeTypes
SKIP_BUILDS_5 = $(PV_MODULES)
SKIP_BUILDS_OLD = $(PV_MODULES)
SKIP_BUILDS_6 = $(SKIP_BUILDS_$(VX_OLD_GCC))
SKIP_BUILDS = $(SKIP_BUILDS_$(VXWORKS_MAJOR_VERSION))
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)

View File

@@ -0,0 +1,21 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
# Build 32 bit version as a cross architecture
#CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86
# Improved error checking with clang
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
# Build for old SL6 64 bit
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
# Build for old SL6 32 bit
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
# WINE MSVC
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64
# NI Linux Real-Time 7.x
# requires RPM gcc-c++-arm-linux-gnu
CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common

View File

@@ -0,0 +1,3 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
# Build 32 bit version as a cross architecture
CROSS_COMPILER_TARGET_ARCHS += SL5-x86

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common

View File

@@ -0,0 +1,7 @@
# Build 32 bit version as a cross architecture
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
# Improved error checking with clang
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64-clang
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common

View File

@@ -1,9 +1,42 @@
# CONFIG_SITE.linux-x86.Common
#
# Site override definitions for linux-x86 host builds
#-------------------------------------------------------
INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)$(EPICS_PATCH_VSTRING)
# JBA test override values
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
GNU_HOST_ARCH=i686
GNU_HOST_OS=linux
# LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
LD_LIBRARY_PATH=
# vxWorks 5.5 for MVxxxx boards
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
# vxWorks 6.7 for MVxxxx boards
CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
# NI compact RIO
CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
# MOXA montavista linux (No PVA because of missing boost support)
CROSS_COMPILER_TARGET_ARCHS += mvl40-xscale_be
# MOXA SDK 4.2
CROSS_COMPILER_TARGET_ARCHS += moxa42-armv6l
# Virtex embedded PPC
CROSS_COMPILER_TARGET_ARCHS += eldk51-ppc4xxSF
# IOxOS IFC1210
CROSS_COMPILER_TARGET_ARCHS += eldk52-e500v2
# DeltaTau PowerPMAC
CROSS_COMPILER_TARGET_ARCHS += eldk42-ppc4xxFP
CROSS_COMPILER_TARGET_ARCHS += eldk53-ppc4xxFP
# Test other vxWorks versions
#CROSS_COMPILER_TARGET_ARCHS += V66-ppc603
CROSS_COMPILER_TARGET_ARCHS += V66-ppc604
#CROSS_COMPILER_TARGET_ARCHS += V63-ppc604
# (No PVA because of old compiler)
CROSS_COMPILER_TARGET_ARCHS += V62-ppc604
# Raspberry Pi
CROSS_COMPILER_TARGET_ARCHS += raspbian-arm

View File

@@ -1,9 +1,9 @@
# CONFIG_SITE.linux-x86_64.Common
#
# Site override definitions for linux-x86_64 host builds
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
GNU_HOST_ARCH_64=x86_64
# IOxOS IFC1211
CROSS_COMPILER_TARGET_ARCHS += fslqoriq20-e6500_64
# Zynq
CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64

View File

@@ -11,6 +11,13 @@ release.
The PVA submodules each have their own individual sets of release notes which
should also be read to understand what has changed since earlier releases.
**This version of EPICS has not been released yet.**
## Changes made on the 7.0 branch since 7.0.4
<!-- Insert new items immediately below here ... -->
## EPICS Release 7.0.4
### Bug fixes

View File

@@ -147,17 +147,17 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
<td>Tag the module in Git, using these tag conventions:
<ul>
<li>
<tt>R7.0.3.2-pre<i>n</i></tt>
<tt>R7.0.4.1-pre<i>n</i></tt>
&mdash; pre-release tag
</li>
<li>
<tt>R7.0.3.2-rc<i>n</i></tt>
<tt>R7.0.4.1-rc<i>n</i></tt>
&mdash; release candidate tag
</li>
</ul>
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for 7.0.3.2-rc1' R7.0.3.2-rc1
git tag -m 'ANJ: Tagged for 7.0.4.1-rc1' R7.0.4.1-rc1
</tt></blockquote>
Note that submodules must <em>not</em> be tagged with the version used
for the top-level, they each have their own separate version numbers
@@ -171,11 +171,11 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
files and directories that are only used for continuous integration:
<blockquote><tt>
cd base-7.0<br />
./.tools/make-tar.sh R7.0.3.2-rc1 base-7.0.3.2-rc1.tar.gz base-7.0.3.2-rc1/
./.tools/make-tar.sh R7.0.4.1-rc1 base-7.0.4.1-rc1.tar.gz base-7.0.4.1-rc1/
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
gpg --armor --sign --detach-sig base-7.0.3.2-rc1.tar.gz
gpg --armor --sign --detach-sig base-7.0.4.1-rc1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -298,7 +298,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
<li>Tag the module:
<blockquote><tt>
git tag -m 'ANJ: Tag for EPICS 7.0.3.2' &lt;module-version&gt;
git tag -m 'ANJ: Tag for EPICS 7.0.4.1' &lt;module-version&gt;
</tt></blockquote>
</li>
@@ -355,7 +355,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
<td>Tag the epics-base module in Git:
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for 7.0.3.2' R7.0.3.2
git tag -m 'ANJ: Tagged for release' R7.0.4.1
</tt></blockquote>
<p>Don't push these commits or the new tag to the Launchpad repository
yet.</p>
@@ -387,12 +387,12 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
files and directories that are only used for continuous integration:
<blockquote><tt>
cd base-7.0<br />
./.tools/make-tar.sh R7.0.3.2 ../base-7.0.3.2.tar.gz base-7.0.3.2/
./.tools/make-tar.sh R7.0.4.1 ../base-7.0.4.1.tar.gz base-7.0.4.1/
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
cd ..<br />
gpg --armor --sign --detach-sig base-7.0.3.2.tar.gz
gpg --armor --sign --detach-sig base-7.0.4.1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -457,7 +457,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
epics-controls web-server.
<blockquote><tt>
scp base-7.0.3.2.tar.gz base-7.0.3.2.tar.gz.asc epics-controls:download/base<br />
scp base-7.0.4.1.tar.gz base-7.0.4.1.tar.gz.asc epics-controls:download/base<br />
</tt></blockquote>
</td>
</tr>

View File

@@ -37,6 +37,9 @@ pva2pva_DEPEND_DIRS = pvAccess
SUBMODULES += example
example_DEPEND_DIRS = pva2pva pvaClient
SUBMODULES += pcas
pcas_DEPEND_DIRS = ca
# Allow sites to add extra submodules
-include Makefile.local

View File

@@ -78,6 +78,7 @@ LIBSRCS += comQueSend.cpp
LIBSRCS += comBuf.cpp
LIBSRCS += hostNameCache.cpp
LIBSRCS += msgForMultiplyDefinedPV.cpp
LIBSRCS_vxWorks += templateInstances.cpp
API_HEADER = libCaAPI.h
ca_API = libCa

View File

@@ -0,0 +1,66 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
*
*
* L O S A L A M O S
* Los Alamos National Laboratory
* Los Alamos, New Mexico 87545
*
* Copyright, 1986, The Regents of the University of California.
*
*
* Author Jeffrey O. Hill
* johill@lanl.gov
* 505 665 1831
*/
#include "cac.h"
#include "oldAccess.h"
#include "repeaterClient.h"
template class chronIntIdResTable < nciu >;
template class chronIntIdResTable < baseNMIU >;
template class chronIntIdResTable < CASG >;
template class resTable < nciu, chronIntId >;
template class resTable < baseNMIU, chronIntId >;
template class resTable < CASG, chronIntId >;
template class resTable < bhe, inetAddrID >;
template class resTable < tcpiiu, caServerID >;
template class tsFreeList < bhe, 0x100 >;
template class tsFreeList < tcpiiu, 32, epicsMutexNOOP >;
template class tsFreeList < netReadNotifyIO, 1024, epicsMutexNOOP >;
template class tsFreeList < netWriteNotifyIO, 1024, epicsMutexNOOP >;
template class tsFreeList < netSubscription, 1024, epicsMutexNOOP >;
template class tsFreeList < CASG, 128, epicsMutexNOOP >;
template class tsFreeList < syncGroupReadNotify, 128, epicsMutexNOOP >;
template class tsFreeList < syncGroupWriteNotify, 128, epicsMutexNOOP >;
template class tsFreeList < comBuf, 0x20 >;
template class tsFreeList < getCallback, 1024, epicsMutexNOOP >;
template class tsFreeList < getCopy, 1024, epicsMutexNOOP >;
template class tsFreeList < msgForMultiplyDefinedPV, 16 >;
template class tsFreeList < nciu, 1024, epicsMutexNOOP>;
template class tsFreeList < oldChannelNotify, 1024, epicsMutexNOOP >;
template class tsFreeList < oldSubscription, 1024, epicsMutexNOOP >;
template class tsFreeList < putCallback, 1024, epicsMutexNOOP >;
template class tsFreeList < repeaterClient, 0x20 >;
template class epicsSingleton < localHostName >;
template unsigned comBuf :: push ( const double * pValue, unsigned nElem );
template unsigned comBuf :: push ( const float * pValue, unsigned nElem );
template unsigned comBuf :: push ( const int * pValue, unsigned nElem );
template unsigned comBuf :: push ( const short * pValue, unsigned nElem );
template comBuf :: popStatus comBuf :: pop ( unsigned int & returnVal );
template comBuf :: popStatus comBuf :: pop ( unsigned short & returnVal );
template comBuf :: popStatus comBuf :: pop ( unsigned char & returnVal );
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
(epicsGuard < epicsMutex > &, syncGroupWriteNotify & );
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
( epicsGuard < epicsMutex > &, syncGroupReadNotify & );

View File

@@ -42,6 +42,7 @@ INC += dbState.h
INC += db_access_routines.h
INC += db_convert.h
INC += dbUnitTest.h
INC += dbCaPvt.h
# Generate menuGlobal.dbd, not really by concatenation, see RULES
DBDCAT += menuGlobal.dbd
@@ -99,3 +100,4 @@ dbCore_SRCS += chfPlugin.c
dbCore_SRCS += dbState.c
dbCore_SRCS += dbUnitTest.c
dbCore_SRCS += dbServer.c
dbCore_SRCS_vxWorks += templateInstances.cpp

View File

@@ -736,6 +736,8 @@ long dbValueSize(short dbr_type)
sizeof(epicsFloat64), /* DOUBLE */
sizeof(epicsEnum16)}; /* ENUM */
if(dbr_type>=NELEMENTS(size))
return 0;
return(size[dbr_type]);
}
@@ -796,15 +798,12 @@ int dbLoadRecords(const char* file, const char* subs)
static long getLinkValue(DBADDR *paddr, short dbrType,
char *pbuf, long *nRequest)
{
dbCommon *precord = paddr->precord;
dbFldDes *pfldDes = paddr->pfldDes;
/* size of pbuf storage in bytes, including space for trailing nil */
int maxlen;
DBENTRY dbEntry;
long status;
long nReq = nRequest ? *nRequest : 1;
/* dbFindRecord() below will always succeed as we have a
/* below will always succeed as we have a
* valid DBADDR, so no point to check again.
* Request for zero elements always succeeds
*/
@@ -830,10 +829,8 @@ static long getLinkValue(DBADDR *paddr, short dbrType,
return S_db_badDbrtype;
}
dbInitEntry(pdbbase, &dbEntry);
status = dbFindRecord(&dbEntry, precord->name);
if (!status) status = dbFindField(&dbEntry, pfldDes->name);
if (!status) {
dbInitEntryFromAddr(paddr, &dbEntry);
{
const char *rtnString = dbGetString(&dbEntry);
strncpy(pbuf, rtnString, maxlen-1);
@@ -843,7 +840,7 @@ static long getLinkValue(DBADDR *paddr, short dbrType,
if(nRequest) *nRequest = nReq;
}
dbFinishEntry(&dbEntry);
return status;
return 0;
}
static long getAttrValue(DBADDR *paddr, short dbrType,

View File

@@ -52,6 +52,9 @@
#include "recGbl.h"
#include "recSup.h"
/* from dbAccessDefs.h which can't be included here */
#define S_db_badDbrtype (M_dbAccess| 3)
/* defined in dbContext.cpp
* Setup local CA access
*/
@@ -457,6 +460,9 @@ long dbCaPutLinkCallback(struct link *plink,short dbrType,
long status = 0;
short link_action = 0;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
assert(pca);
/* put the new value in */
epicsMutexMustLock(pca->lock);

View File

@@ -382,7 +382,7 @@ The B<DPVT> field is is for private use of the device support modules.
prompt("DSET address")
special(SPC_NOMOD)
interest(4)
extra("unambiguous_dset *dset")
extra("unambiguous_dset *dset")
}
field(DPVT,DBF_NOACCESS) {
prompt("Device Private")
@@ -491,7 +491,7 @@ field which is then used to acquire a timestamp.
prompt("Break Point")
special(SPC_NOMOD)
interest(1)
extra("char bkpt")
extra("epicsUInt8 bkpt")
}
field(UDF,DBF_UCHAR) {
prompt("Undefined")

View File

@@ -159,6 +159,9 @@ long dbPutConvertJSON(const char *json, short dbrType,
size_t jlen = strlen(json);
long status;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
parser->depth = 0;
parser->dbrType = dbrType;
parser->dbrSize = dbValueSize(dbrType);

View File

@@ -0,0 +1,9 @@
#include "dbCAC.h"
#include "dbChannelIO.h"
#include "dbPutNotifyBlocker.h"
template class tsFreeList < dbSubscriptionIO, 256, epicsMutexNOOP >;
template class tsFreeList < dbChannelIO, 256, epicsMutexNOOP >;
template class tsFreeList < dbPutNotifyBlocker, 64, epicsMutexNOOP >;
template class resTable < dbBaseIO, chronIntId >;
template class chronIntIdResTable < dbBaseIO >;

View File

@@ -16,6 +16,7 @@ caserverio_INCLUDES = -I$(SRC)/ca/client
camessage_INCLUDES = -I$(SRC)/ca/client
INC += rsrv.h
INC += server.h
DBD += rsrv.dbd

View File

@@ -553,7 +553,12 @@ static long lnkCalc_getValue(struct link *plink, short dbrType, void *pbuffer,
dbCommon *prec = plink->precord;
int i;
long status;
FASTCONVERT conv = dbFastPutConvertRoutine[DBR_DOUBLE][dbrType];
FASTCONVERT conv;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
conv = dbFastPutConvertRoutine[DBR_DOUBLE][dbrType];
/* Any link errors will trigger a LINK/INVALID alarm in the child link */
for (i = 0; i < clink->nArgs; i++) {
@@ -624,7 +629,12 @@ static long lnkCalc_putValue(struct link *plink, short dbrType,
dbCommon *prec = plink->precord;
int i;
long status;
FASTCONVERT conv = dbFastGetConvertRoutine[dbrType][DBR_DOUBLE];
FASTCONVERT conv;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
conv = dbFastGetConvertRoutine[dbrType][DBR_DOUBLE];
/* Any link errors will trigger a LINK/INVALID alarm in the child link */
for (i = 0; i < clink->nArgs; i++) {

View File

@@ -361,6 +361,9 @@ static long lnkConst_loadScalar(struct link *plink, short dbrType, void *pbuffer
const_link *clink = CONTAINER(plink->value.json.jlink, const_link, jlink);
long status;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
switch (clink->type) {
case si64:
if (clink->jlink.debug)
@@ -451,12 +454,17 @@ static long lnkConst_loadArray(struct link *plink, short dbrType, void *pbuffer,
long *pnReq)
{
const_link *clink = CONTAINER(plink->value.json.jlink, const_link, jlink);
short dbrSize = dbValueSize(dbrType);
short dbrSize;
char *pdest = pbuffer;
int nElems = clink->nElems;
FASTCONVERT conv;
long status;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
dbrSize = dbValueSize(dbrType);
if (nElems > *pnReq)
nElems = *pnReq;

View File

@@ -142,7 +142,12 @@ static long lnkState_getValue(struct link *plink, short dbrType, void *pbuffer,
{
state_link *slink = CONTAINER(plink->value.json.jlink,
struct state_link, jlink);
FASTCONVERT conv = dbFastPutConvertRoutine[DBR_SHORT][dbrType];
FASTCONVERT conv;
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
conv = dbFastPutConvertRoutine[DBR_SHORT][dbrType];
slink->val = slink->invert ^ dbStateGet(slink->state);
return conv(&slink->val, pbuffer, NULL);

View File

@@ -12,6 +12,8 @@ SRC_DIRS += $(STDDIR)/softIoc
PROD_IOC_DEFAULT = softIoc
PROD_IOC_iOS = -nil-
PROD_LDFLAGS_vxWorks = --whole-archive
DBD += base.dbd
DBD += asSub.dbd
DBD += softIoc.dbd

View File

@@ -184,8 +184,8 @@ dbTestHarness_SRCS_RTEMS += rtemsTestHarness.c
PROD_SRCS_RTEMS += rtemsTestData.c
PROD_vxWorks = dbTestHarness
PROD_RTEMS = dbTestHarness
TESTPROD_vxWorks = dbTestHarness
TESTPROD_RTEMS = dbTestHarness
TESTSPEC_vxWorks = dbTestHarness.munch; epicsRunDbTests
TESTSPEC_RTEMS = dbTestHarness.boot; epicsRunDbTests

View File

@@ -113,7 +113,6 @@ static long cvt_dbaddr(DBADDR *paddr)
{
arrRecord *prec = (arrRecord *) paddr->precord;
paddr->pfield = prec->bptr;
paddr->no_elements = prec->nelm;
paddr->field_type = prec->ftvl;
paddr->field_size = dbValueSize(prec->ftvl);
@@ -126,6 +125,7 @@ static long get_array_info(DBADDR *paddr, long *no_elements, long *offset)
{
arrRecord *prec = (arrRecord *) paddr->precord;
paddr->pfield = prec->bptr;
*no_elements = prec->nord;
*offset = prec->off;

View File

@@ -416,7 +416,7 @@ static void testArrayLink(unsigned nsrc, unsigned ntarg)
dbScanLock((dbCommon*)ptarg);
fillArray(buftarg, ptarg->nelm, 1);
ptarg->nord = ptarg->nelm;
db_post_events(ptarg, ptarg->bptr, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
db_post_events(ptarg, &ptarg->val, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
dbScanUnlock((dbCommon*)ptarg);
waitForUpdateN(psrclnk, 2);
@@ -540,7 +540,7 @@ static void testreTargetTypeChange(void)
dbScanLock((dbCommon*)ptarg1);
fillArrayDouble(buftarg1, ptarg1->nelm, 1);
ptarg1->nord = ptarg1->nelm;
db_post_events(ptarg1, ptarg1->bptr, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
db_post_events(ptarg1, &ptarg1->val, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
dbScanUnlock((dbCommon*)ptarg1);
epicsEventMustWait(waitEvent); /* wait for update */

View File

@@ -119,11 +119,26 @@ void testLongField(void)
testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 8, 8, "lnktest");
}
static
void testPutArr(void)
{
epicsUInt32 buf[10];
testDiag("testPutArr()");
testdbGetArrFieldEqual("arr", DBR_LONG, 1, 0, NULL);
buf[0] = 1; buf[1] = 2; buf[2] = 3; buf[3] = 0;
testdbPutArrFieldOk("arr", DBF_ULONG, 3, buf);
buf[3] = 0xdeadbeef;
testdbGetArrFieldEqual("arr", DBR_LONG, 4, 3, buf);
}
void dbTestIoc_registerRecordDeviceDriver(struct dbBase *);
MAIN(dbPutGet)
{
testPlan(41);
testPlan(44);
testdbPrepare();
testdbReadDatabase("dbTestIoc.dbd", NULL, NULL);
@@ -142,6 +157,8 @@ MAIN(dbPutGet)
testLongAttr();
testLongField();
testPutArr();
testIocShutdownOk();
testdbCleanup();

View File

@@ -39,3 +39,8 @@ record(x, "lnktarget") {}
record(x, "lnktest") {
field(INP, "lnktarget NPP NMS")
}
record(arr, "arr") {
field(FTVL, "ULONG")
field(NELM, "10")
}

View File

@@ -117,9 +117,14 @@ long z_putval(struct link *plink, short dbrType,
const void *pbuffer, long nRequest)
{
long ret;
long (*pconv)(epicsInt32 *, const void *, const dbAddr *) = dbFastPutConvertRoutine[DBF_LONG][dbrType];
long (*pconv)(epicsInt32 *, const void *, const dbAddr *);
zpriv *priv = CONTAINER(plink->value.json.jlink, zpriv, base);
if(INVALID_DB_REQ(dbrType))
return S_db_badDbrtype;
pconv = dbFastPutConvertRoutine[DBF_LONG][dbrType];
if(nRequest==0) return 0;
epicsMutexLock(priv->lock);

View File

@@ -13,6 +13,8 @@
* Ralph Lange <Ralph.Lange@bessy.de>
*/
#include <string.h>
#include "dbAccessDefs.h"
#include "recSup.h"
#include "recGbl.h"

View File

@@ -73,8 +73,8 @@ filterTestHarness_SRCS_RTEMS += rtemsTestHarness.c
PROD_SRCS_RTEMS += rtemsTestData.c
PROD_vxWorks = filterTestHarness
PROD_RTEMS = filterTestHarness
TESTPROD_vxWorks = filterTestHarness
TESTPROD_RTEMS = filterTestHarness
TESTSPEC_vxWorks = filterTestHarness.munch; epicsRunFilterTests
TESTSPEC_RTEMS = filterTestHarness.boot; epicsRunFilterTests

View File

@@ -47,8 +47,8 @@ testHarness_SRCS += epicsRunLinkTests.c
linkTestHarness_SRCS += $(testHarness_SRCS)
linkTestHarness_SRCS_RTEMS += rtemsTestHarness.c
PROD_vxWorks = linkTestHarness
PROD_RTEMS = linkTestHarness
TESTPROD_vxWorks = linkTestHarness
TESTPROD_RTEMS = linkTestHarness
TESTSPEC_vxWorks = linkTestHarness.munch; epicsRunLinkTests
TESTSPEC_RTEMS = linkTestHarness.boot; epicsRunLinkTests

View File

@@ -175,8 +175,8 @@ recordTestHarness_SRCS_RTEMS += rtemsTestHarness.c
PROD_SRCS_RTEMS += rtemsTestData.c
PROD_vxWorks = recordTestHarness
PROD_RTEMS = recordTestHarness
TESTPROD_vxWorks = recordTestHarness
TESTPROD_RTEMS = recordTestHarness
TESTSPEC_vxWorks = recordTestHarness.munch; epicsRunRecordTests
TESTSPEC_RTEMS = recordTestHarness.boot; epicsRunRecordTests

View File

@@ -12,14 +12,7 @@
*
* \brief Contains a few templates out of the C++ standard header algorithm
*
* \note The templates are provided here in a much smaller file. Standard algorithm
* contains many templates for sorting and searching through C++ template containers
* which are not used in EPICS. If all you need from there is std::min(),
* std::max() and/or std::swap() your code may compile faster if you include
* epicsAlgorithm.h and use epicsMin(), epicsMax() and epicsSwap() instead.
*
* The C++ standard only requires types to be less-than comparable, so
* the epicsMin and epicsMax templates only use operator <.
* \deprecated Use std::min()/max()/swap() in new code
*/
#ifndef __EPICS_ALGORITHM_H__

View File

@@ -567,6 +567,186 @@ static MAC_ENTRY *create( MAC_HANDLE *handle, const char *name, int special )
return entry;
}
#define SUCCESS 0
#define NOVALUE 1
#define UNTERMINATED 2
#define DIVZERO 3
static int parseExpr( const char** pp, int* v, int level );
/* Value is a number or an expression in () */
static int parseValue( const char** pp, int* v )
{
int status;
int val;
const char *p = *pp;
int neg = 0;
while (isspace((unsigned char)*p)) p++;
if (*p == '+' || *p == '-') neg = *p++ == '-';
while (isspace((unsigned char)*p)) p++;
if (*p == '(')
{
p++;
if ((status = parseExpr(&p, &val, 0)) != SUCCESS) return status;
if (*p++ != ')')
{
printf("macLib: missing ) after '%s'\n", *pp);
return UNTERMINATED;
}
}
else
{
char* e;
val = strtol(p, &e, 0);
if (e == p) return NOVALUE;
p = e;
}
if (neg) val = -val;
*pp = p;
*v = val;
return SUCCESS;
}
/* Expr is a sum or product of Values or a conditional */
static int parseExpr( const char** pp, int* v, int level )
{
const char *p = *pp;
int o = 0;
int val0, val1, val2;
int status = SUCCESS;
int stat1, stat2;
val0 = 0;
/* handle sums and differences */
do {
if ((stat1 = parseValue(&p, &val1)) != SUCCESS)
{
if (o && stat1 == NOVALUE)
printf ("macLib: missing operand after '%c'\n", o);
return stat1;
}
while (isspace((unsigned char)*p)) p++;
o = *p;
/* handle products and quotients */
while (o == '*' || o == '/' || o == '%')
{
p++;
if ((stat2 = parseValue(&p, &val2)) != SUCCESS)
{
if (stat2 == NOVALUE)
printf ("macLib: missing operand after '%c'\n", o);
return stat2;
}
if (o == '*') val1 *= val2;
else if (val2 == 0)
{
status = DIVZERO;
val1 = 1;
}
else if (o == '/') val1 /= val2;
else val1 %= val2;
while (isspace((unsigned char)*p)) p++;
o = *p;
}
val0 += val1;
} while (o == '+' || o == '-');
/* handle comparisons */
o = *p;
if (o == '<' || o == '>')
{
p++;
if ((stat1 = parseExpr(&p, &val1, 1)) != SUCCESS)
{
if (stat1 == NOVALUE)
printf ("macLib: missing expression after '%c'\n", o);
return stat1;
}
if (o == '<')
val0 = (val0 < val1);
else
val0 = (val0 > val1);
}
/* handle conditionals */
if (*p == '?' && level == 0)
{
p++;
while (isspace((unsigned char)*p)) p++;
if (*p != ':')
{
stat1 = parseExpr(&p, &val1, 0);
}
else
{
val1 = val0;
stat1 = status;
}
if (*p != ':')
{
printf("macLib: missing : after '%s'\n", *pp);
return UNTERMINATED;
}
p++;
stat2 = parseExpr(&p, &val2, 0);
status = val0 ? stat1 : stat2;
val0 = val0 ? val1 : val2;
}
*v = val0;
*pp = p;
return status;
}
static MAC_ENTRY *evalExpr( MAC_HANDLE *handle, const char *expr )
{
MAC_ENTRY *entry = NULL;
int status;
const char* p = expr;
int value;
char valuestr[40];
char format[20] = "%d";
while (isspace((unsigned char)*p)) p++;
if (*p == '%')
{
int i = 1;
p++;
while (i < sizeof(format) && strchr(" #-+0", *p))
format[i++] = *p++;
while (i < sizeof(format) && strchr("0123456789", *p))
format[i++] = *p++;
if (i < sizeof(format) && strchr("diouxXc", *p))
{
format[i++] = *p++;
format[i] = 0;
}
else
return NULL;
}
status = parseExpr(&p, &value, 0);
if (status == DIVZERO)
printf ("macLib: division by zero\n");
if (status != SUCCESS)
return NULL;
while (isspace((unsigned char)*p)) p++;
if (*p)
{
printf("macLib: rubbish at end of expression: %s\n", p);
return NULL;
}
sprintf(valuestr, format, value);
entry = create( handle, expr, TRUE );
if ( entry )
{
entry->type = "calculation";
if ( rawval( handle, entry, valuestr ) == NULL )
return NULL;
}
return entry;
}
/*
* Look up macro entry with matching "special" attribute by name
*/
@@ -578,6 +758,10 @@ static MAC_ENTRY *lookup( MAC_HANDLE *handle, const char *name, int special )
printf( "lookup-> level = %d, name = %s, special = %d\n",
handle->level, name, special );
if ( (special == FALSE) ) {
entry = evalExpr( handle, name );
if (entry) return entry;
}
/* search backwards so scoping works */
for ( entry = last( handle ); entry != NULL; entry = previous( entry ) ) {
if ( entry->special != special )
@@ -697,6 +881,7 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
/* return immediately if raw value is NULL */
if ( *rawval == NULL ) return;
/* discard quotes and escapes if level is > 0 (i.e. if these aren't
the user's quotes and escapes) */
discard = ( level > 0 );

View File

@@ -73,9 +73,7 @@
/** \brief Size of a record name without the nil terminator */
#define PVNAME_SZ (PVNAME_STRINGSZ - 1)
/**
* \def PVLINK_STRINGSZ
* \brief Buffer size for the string representation of a DBF_*LINK field
/** \brief Buffer size for the string representation of a DBF_*LINK field
*/
#define PVLINK_STRINGSZ 1024

View File

@@ -35,17 +35,7 @@ extern "C" {
typedef void (*REGISTRAR)(void);
/** \brief Generate a name for an export object.
* \param typ Object's data type.
* \param obj Object's name.
* \return C identifier for the export object.
*/
#define EPICS_EXPORT_POBJ(typ, obj) pvar_ ## typ ## _ ## obj
/** \brief Generate a name for an export function object.
* \param fun Function's name.
* \return C identifier for the export object.
*/
#define EPICS_EXPORT_PFUNC(fun) EPICS_EXPORT_POBJ(func, fun)
/** \brief Declare an object for exporting.
@@ -79,6 +69,8 @@ typedef void (*REGISTRAR)(void);
*
* \param typ Object's data type.
* \param obj Object's name.
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsExportAddress(typ, obj) \
epicsShareExtern typ *EPICS_EXPORT_POBJ(typ,obj); \
@@ -96,6 +88,8 @@ typedef void (*REGISTRAR)(void);
\endcode
*
* \param fun Registrar function's name.
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsExportRegistrar(fun) \
epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun
@@ -111,6 +105,8 @@ typedef void (*REGISTRAR)(void);
\endcode
*
* \param fun Function's name
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsRegisterFunction(fun) \
static void register_func_ ## fun(void) \

View File

@@ -88,14 +88,16 @@
MAIN(iocTest)
{
iocBuildIsolated() || iocRun();
... test code ...
iocShutdown();
dbFreeBase(pdbbase);
registryFree();
pdbbase = NULL;
testPlan(0);
testdbPrepare();
testdbReadDatabase("<dbdname>.dbd", 0, 0);
<dbdname>_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("some.db", 0, 0);
... test code before iocInit(). eg. dbGetString() ...
testIocInitOk();
... test code with IOC running. eg. dbGet()
testIocShutdownOk();
testdbCleanup();
return testDone();
}
\endcode
@@ -235,6 +237,15 @@ LIBCOM_API int testDiag(const char *fmt, ...)
*/
LIBCOM_API int testDone(void);
/** \brief Return non-zero in shared/oversubscribed testing envrionments
*
* May be used to testSkip(), or select longer timeouts, for some cases
* when the test process may be preempted for arbitrarily long times.
* This is common in shared CI environments.
*
* The environment variable $EPICS_TEST_IMPRECISE_TIMING=YES should be
* set in by such testing environments.
*/
LIBCOM_API
int testImpreciseTiming(void);

View File

@@ -24,7 +24,11 @@
# error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
#endif
#define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
#if __GNUC__ > 2
# define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
#else
# define EPICS_ALWAYS_INLINE __inline__
#endif
/* Expands to a 'const char*' which describes the name of the current function scope */
#define EPICS_FUNCTION __PRETTY_FUNCTION__
@@ -41,7 +45,9 @@
/*
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
*/
#define CXX_PLACEMENT_DELETE
#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
# define CXX_PLACEMENT_DELETE
#endif
#endif /* __cplusplus */
@@ -53,7 +59,9 @@
/*
* Deprecation marker
*/
#define EPICS_DEPRECATED __attribute__((deprecated))
#if (__GNUC__ > 2)
# define EPICS_DEPRECATED __attribute__((deprecated))
#endif
/*
* Unused marker

View File

@@ -20,12 +20,12 @@
*
* When creating the consumer thread also create an epicsEvent.
\code
epicsEvent *pevent = new epicsEvent;
epicsEvent event;
\endcode
* The consumer thread has code containing:
\code
while(1) {
pevent->wait();
pevent.wait();
while( {more work} ) {
{process work}
}
@@ -33,7 +33,7 @@
\endcode
* Producers create requests and issue the statement:
\code
pevent->trigger();
pevent.trigger();
\endcode
**/

View File

@@ -19,12 +19,18 @@
*
* The typical C++ use of a mutual exclusion semaphore is:
\code
epicsMutex *plock = new epicsMutex;
epicsMutex lock;
...
...
plock->lock();
// process resources
plock->unlock();
{
epicsMutex::guard_t G(lock); // lock
// process resources
} // unlock
// or for compatiblity
{
epicsGuard<epicsMutex> G(lock); // lock
// process resources
} // unlock
\endcode
*
* \note The implementation:

Some files were not shown because too many files have changed in this diff Show More