Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
5d4af5c4
Commit
5d4af5c4
authored
Jan 29, 2018
by
Hanadeev Alexandr
Committed by
Vinogradov Aleksei
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build): config build for arm
parent
c8e01bfe
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
5 deletions
+53
-5
mbslave.cc
Utilities/MBTester/mbslave.cc
+6
-0
libuniset2.spec
conf/libuniset2.spec
+2
-1
release_helper.sh
conf/release_helper.sh
+4
-3
release_helper_arm.sh
conf/release_helper_arm.sh
+3
-0
configure.ac
configure.ac
+26
-1
ComPort485F.h
include/ComPort485F.h
+2
-0
ComPort485F.cc
src/Communications/ComPort485F.cc
+2
-0
ModbusRTUMaster.cc
src/Communications/Modbus/ModbusRTUMaster.cc
+4
-0
ModbusRTUSlave.cc
src/Communications/Modbus/ModbusRTUSlave.cc
+4
-0
No files found.
Utilities/MBTester/mbslave.cc
View file @
5d4af5c4
...
...
@@ -110,6 +110,8 @@ int main( int argc, char** argv )
if
(
f485
)
{
#ifndef DISABLE_COMPORT_485F
ComPort485F
*
cp
;
if
(
dev
==
"/dev/ttyS2"
)
...
...
@@ -126,6 +128,10 @@ int main( int argc, char** argv )
mbs
.
setLog
(
dlog
);
mbs
.
setVerbose
(
verb
);
mbs
.
execute
();
#else
cerr
<<
"DISABLE_COMPORT_485F"
<<
endl
;
return
1
;
#endif // #ifndef DISABLE_COMPORT_485F
}
else
{
...
...
conf/libuniset2.spec
View file @
5d4af5c4
...
...
@@ -12,6 +12,7 @@
%def_disable netdata
%def_enable api
%def_enable logdb
%def_enable com485f
%define oname uniset2
...
...
@@ -326,7 +327,7 @@ SharedMemoryPlus extension ('all in one') for libuniset
%build
%autoreconf
%configure %{subst_enable docs} %{subst_enable mysql} %{subst_enable sqlite} %{subst_enable pgsql} %{subst_enable python} %{subst_enable rrd} %{subst_enable io} %{subst_enable logicproc} %{subst_enable tests} %{subst_enable mqtt} %{subst_enable api} %{subst_enable netdata} %{subst_enable logdb}
%configure %{subst_enable docs} %{subst_enable mysql} %{subst_enable sqlite} %{subst_enable pgsql} %{subst_enable python} %{subst_enable rrd} %{subst_enable io} %{subst_enable logicproc} %{subst_enable tests} %{subst_enable mqtt} %{subst_enable api} %{subst_enable netdata} %{subst_enable logdb}
%{subst_enable com485f}
%make_build
# fix for ALTLinux build (noarch)
...
...
conf/release_helper.sh
View file @
5d4af5c4
...
...
@@ -7,6 +7,7 @@ load_mod spec
REL
=
eter
MAILDOMAIN
=
server
OPTS
=
$*
[
-z
"
$TOPDIR
"
]
&&
TOPDIR
=
/var/ftp/pub/Ourside
...
...
@@ -16,10 +17,10 @@ SPECNAME=libuniset2.spec
if
[
-z
"
$PLATFORM
"
]
;
then
PLATFORM
=
i586
[[
`
uname
-m
`
==
"x86_64"
]]
&&
PLATFORM
=
x86_64
[[
`
uname
-m
`
==
"aarch64"
]]
&&
PLATFORM
=
aarch64
fi
PROJECT
=
$1
test
-n
"
$PROJECT
"
||
PROJECT
=
$PKGNAME
PROJECT
=
$PKGNAME
[
-z
"
$GEN
"
]
&&
GEN
=
/var/ftp/pub/Ourside/
$PLATFORM
/genb.sh
[
-a
"
$GEN
"
]
||
GEN
=
"genbasedir --create --progress --topdir=
$TOPDIR
$PLATFORM
$PROJECT
"
...
...
@@ -89,7 +90,7 @@ else
add_changelog_helper
"- new build"
$SPECNAME
fi
rpmbb
${
UNISET_BUILD_ADDON_OPTIONS
}
$SPECNAME
||
fatal
"Can't build"
rpmbb
${
UNISET_BUILD_ADDON_OPTIONS
}
$
{
OPTS
}
$
SPECNAME
||
fatal
"Can't build"
cp2ftp
...
...
conf/release_helper_arm.sh
0 → 100755
View file @
5d4af5c4
#!/bin/sh
./release_helper.sh
--disable
=
com485f
--disable
=
mqtt
--disable
=
docs
configure.ac
View file @
5d4af5c4
...
...
@@ -199,6 +199,31 @@ fi
AM_CONDITIONAL(DISABLE_IO, test ${buildio} = false)
AM_CONDITIONAL(ENABLE_IO, test ${buildio} = true)
#check sys/io.h support
AC_MSG_CHECKING([sys/io.h support])
buildcom485f=true
#AC_CHECK_HEADERS
AC_ARG_ENABLE(com485f, AC_HELP_STRING([--disable-com485f], [disable sys/io.h support]),
[ if test $enableval = yes; then buildcom485f=true; else buildcom485f=false; fi],[ buildcom485f=true; ])
COMPORT_485F_CFLAGS=
COMPORT_485F_CLIBS=
DISABLE_COMPORT_485F=
if test ${buildcom485f} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
COMPORT_485F_CFLAGS="-DDISABLE_COMPORT_485F"
DISABLE_COMPORT_485F=1
fi
AM_CONDITIONAL(DISABLE_COMPORT_485F, test ${buildcom485f} = false)
AC_SUBST(DISABLE_COMPORT_485F)
AC_SUBST(COMPORT_485F_CFLAGS)
#AC_SUBST(COMPORT_485F_CLIBS)
#check logicproc build
AC_MSG_CHECKING([build logic processor extension])
buildlproc=true
...
...
@@ -415,7 +440,7 @@ CXX_EXTRA_FLAGS="-Wnon-virtual-dtor -Woverloaded-virtual -Woverflow -D_GLIBCXX_U
# export
LDFLAGS="$LDFLAGS ${OMNI_LIBS} ${XML_LIBS} ${SIGC_LIBS} ${COV_LIBS} ${POCO_LIBS} ${EV_LIBS}"
# all developer liked options add to autogen.sh, please
CXXFLAGS="-I\$(top_builddir)/include $CXXFLAGS -funsigned-char -std=c++11 -g -DCATCH_VERSION_MAJOR=${CATCH_VERSION_MAJOR} -D_GNU_SOURCE ${REST_API_CFLAGS} ${OMNI_CFLAGS} ${XML_CFLAGS} ${SIGC_CFLAGS} ${COV_CFLAGS} ${POCO_CFLAGS} ${EV_CFLAGS} $CXX_EXTRA_FLAGS"
CXXFLAGS="-I\$(top_builddir)/include $CXXFLAGS -funsigned-char -std=c++11 -g -DCATCH_VERSION_MAJOR=${CATCH_VERSION_MAJOR} -D_GNU_SOURCE ${REST_API_CFLAGS} ${
COMPORT_485F_CFLAGS} ${
OMNI_CFLAGS} ${XML_CFLAGS} ${SIGC_CFLAGS} ${COV_CFLAGS} ${POCO_CFLAGS} ${EV_CFLAGS} $CXX_EXTRA_FLAGS"
AC_SUBST(LDFLAGS)
AC_SUBST(CXXFLAGS)
...
...
include/ComPort485F.h
View file @
5d4af5c4
#ifndef DISABLE_COMPORT_485F
/*
* Copyright (c) 2015 Pavel Vainerman.
*
...
...
@@ -71,3 +72,4 @@ namespace uniset
// --------------------------------------------------------------------------
#endif // COMPORT_485F_H_
// --------------------------------------------------------------------------
#endif // #ifndef DISABLE_COMPORT_485F
src/Communications/ComPort485F.cc
View file @
5d4af5c4
#ifndef DISABLE_COMPORT_485F
/*
* Copyright (c) 2015 Pavel Vainerman.
*
...
...
@@ -334,3 +335,4 @@ void ComPort485F::reopen()
ComPort
::
reopen
();
}
// --------------------------------------------------------------------------------
#endif // #ifndef DISABLE_COMPORT_485F
src/Communications/Modbus/ModbusRTUMaster.cc
View file @
5d4af5c4
...
...
@@ -36,6 +36,7 @@ namespace uniset
{
if
(
use485
)
{
#ifndef DISABLE_COMPORT_485F
ComPort485F
*
cp
;
if
(
dev
==
"/dev/ttyS2"
)
...
...
@@ -46,6 +47,9 @@ namespace uniset
throw
Exception
(
"Open ComPort FAILED! dev must be /dev/ttyS2 or /dev/tytS3"
);
port
=
cp
;
#else
throw
Exception
(
"Open ComPort485F FAILED! DISABLE_COMPORT_485F"
);
#endif // #ifndef DISABLE_COMPORT_485F
}
else
port
=
new
ComPort
(
dev
);
...
...
src/Communications/Modbus/ModbusRTUSlave.cc
View file @
5d4af5c4
...
...
@@ -36,6 +36,7 @@ namespace uniset
{
if
(
use485
)
{
#ifndef DISABLE_COMPORT_485F
ComPort485F
*
cp
;
if
(
dev
==
"/dev/ttyS2"
)
...
...
@@ -46,6 +47,9 @@ namespace uniset
throw
Exception
(
"Open ComPort FAILED! dev must be /dev/ttyS2 or /dev/tytS3"
);
port
=
cp
;
#else
throw
Exception
(
"Open ComPort485F FAILED! DISABLE_COMPORT_485F"
);
#endif // #ifndef DISABLE_COMPORT_485F
}
else
port
=
new
ComPort
(
dev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment