Skip to content

Commit 8d8688d

Browse files
committed
Merge branch 'master' of rmc-github.robotic.dlr.de:common/libosal
2 parents 67b0af3 + 324f639 commit 8d8688d

9 files changed

Lines changed: 51 additions & 20 deletions

File tree

Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ pkgconfigdir=$(libdir)/pkgconfig
66
SUBDIRS=src
77

88
if LIBOSAL_BUILD_POSIX
9+
if !LIBOSAL_BUILD_RTEMS
910
SUBDIRS += tests
1011
if !LIBOSAL_BUILD_MINGW32
1112
SUBDIRS += src/tools/logger
1213
SUBDIRS += src/tools/shmtest
1314
endif
1415
endif
16+
endif
1517

1618
pkgconfig_DATA = libosal.pc
1719

Makefile.doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SOURCEDIR = ./
77
BUILDDIR = $(SOURCEDIR)/docs
88
GH_PAGES_DIR_NAME = gh-pages
99
BRANCH_DIR_NAME = $(subst /,_,$(BRANCH_NAME))
10-
BUILDCMD = cissy run -c $(SOURCEDIR) -p doxygen/[~=1.8]@3rdparty/stable doxygen
10+
BUILDCMD = cissy run -c $(SOURCEDIR) -p doxygen/1.10.0@3rdparty/stable doxygen
1111
DOCS = "$(GH_PAGES_DIR_NAME)/$(BRANCH_DIR_NAME)"
1212

1313
.PHONY: Makefile.doc gh-pages

RMC-Jenkinsfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('rmc-jenkins-libraries-v2-no-changelog') _
1+
@Library('rmc-jenkins-libraries-v3') _
22
env.CONAN_V2_MODE=1
33
rmcBuild.auto()
44

@@ -8,8 +8,11 @@ node('default') {
88
context.getGitRepo().checkout()
99
sshagent(credentials: [context.getConfig().gitCredentialsId]) {
1010
lock("gh-pages-${context.getGitRepo().getOrganization()}-${context.getGitRepo().getName()}") {
11-
sh """
12-
export CONAN_USER_HOME=${pwd()}/conan_home
11+
sh """#!/bin/bash
12+
set +x
13+
source /opt/rmc-build-tools/sourceme-devel.sh --cissy /opt/rmc-build-tools/any/cissy2/
14+
set -x
15+
export CONAN_HOME=${pwd()}/conan_home
1316
cd repo_dir
1417
make -f Makefile.doc gh-pages
1518
"""

config.sub

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,8 +1497,11 @@ case $os in
14971497
dicos*)
14981498
os=dicos
14991499
;;
1500+
rtems*)
1501+
os=rtems
1502+
;;
15001503
pikeos*)
1501-
os=pikeos
1504+
os=pikeos
15021505
;;
15031506
*)
15041507
# No normalization, but not necessarily accepted, that comes below.
@@ -1707,8 +1710,10 @@ case $os in
17071710
# Likewise for "kernel-abi"
17081711
eabi* | gnueabi*)
17091712
;;
1710-
pikeos*)
1711-
;;
1713+
rtems*)
1714+
;;
1715+
pikeos*)
1716+
;;
17121717
# VxWorks passes extra cpu info in the 4th filed.
17131718
simlinux | simwindows | spe)
17141719
;;

configure.ac.in

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,36 @@ AC_INIT([libosal], [PACKAGE_VERSION], [Robert Burger <robert.burger@dlr.de>])
66

77
AC_CANONICAL_TARGET
88

9+
AS_IF([echo "$host" | grep -q 'rtems'], [
10+
AC_MSG_NOTICE([RTEMS detected: skipping compiler test])
11+
AC_SUBST(CC, arm-rtems6-gcc)
12+
AC_SUBST(CXX, arm-rtems6-g++)
13+
ac_cv_prog_cc_works=yes
14+
ac_cv_prog_cc_cross=yes
15+
ac_cv_exeext=
16+
], [
17+
# Checks for programs.
18+
AC_PROG_CC
19+
20+
# we test the posix API with gtest, which requires C++
21+
AC_PROG_CXX
22+
])
23+
924
# Automake initialization
10-
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
11-
#AM_INIT_AUTOMAKE([-Wall -Werror foreign silent-rules subdir-objects])
12-
#m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
25+
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
1326
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
1427

15-
1628
AC_CONFIG_SRCDIR([src])
1729
AC_CONFIG_HEADERS([config.h include/libosal/osal.h])
1830
AC_CONFIG_MACRO_DIR([m4])
1931
AX_PREFIX_CONFIG_H(include/libosal/config.h) # prep mylib/_config.h from it..
2032

21-
# Checks for programs.
22-
AC_PROG_CC
23-
# we test the posix API with gtest, which requires C++
24-
AC_PROG_CXX
2533
AC_PROG_LIBTOOL
2634

2735
LT_INIT
2836

2937
LIBOSAL_BUILD_POSIX=false
38+
LIBOSAL_BUILD_RTEMS=false
3039
LIBOSAL_BUILD_MINGW32=false
3140
LIBOSAL_BUILD_VXWORKS=false
3241
LIBOSAL_BUILD_PIKEOS=false
@@ -44,6 +53,12 @@ case $target_os in
4453
LIBOSAL_BUILD_POSIX=true
4554
AC_DEFINE([LIBOSAL_BUILD_POSIX], [true], [Use POSIX build on linux])
4655
;;
56+
rtems*)
57+
LIBOSAL_BUILD_POSIX=true
58+
LIBOSAL_BUILD_RTEMS=true
59+
AC_DEFINE([LIBOSAL_BUILD_POSIX], [true], [Use POSIX build on RTEMS])
60+
AC_DEFINE([LIBOSAL_BUILD_RTEMS], [true], [Use POSIX build on RTEMS])
61+
;;
4762
vxworks*)
4863
LIBOSAL_BUILD_VXWORKS=true
4964
AC_DEFINE([LIBOSAL_BUILD_VXWORKS], [true], [Use VxWorks build])
@@ -105,6 +120,7 @@ AC_CHECK_LIB(m, sqrt, MATH_LIBS="-lm")
105120
AC_SUBST(MATH_LIBS)
106121

107122
AM_CONDITIONAL([LIBOSAL_BUILD_POSIX], [ test x$LIBOSAL_BUILD_POSIX = xtrue])
123+
AM_CONDITIONAL([LIBOSAL_BUILD_RTEMS], [ test x$LIBOSAL_BUILD_RTEMS = xtrue])
108124
AM_CONDITIONAL([LIBOSAL_BUILD_MINGW32], [ test x$LIBOSAL_BUILD_MINGW32 = xtrue])
109125
AM_CONDITIONAL([LIBOSAL_BUILD_VXWORKS], [ test x$LIBOSAL_BUILD_VXWORKS = xtrue])
110126
AM_CONDITIONAL([LIBOSAL_BUILD_PIKEOS], [ test x$LIBOSAL_BUILD_PIKEOS = xtrue])
@@ -113,6 +129,7 @@ AM_CONDITIONAL([LIBOSAL_BUILD_WIN32], [ test x$LIBOSAL_BUILD_WIN32 = xtrue])
113129
# Checks for libraries.
114130

115131
# Checks for header files.
132+
AC_CHECK_HEADERS([string.h])
116133
AC_CHECK_HEADERS([stdint.h])
117134
AC_CHECK_HEADERS([math.h])
118135
AC_CHECK_HEADERS([sys/mman.h], HAVE_SYS_MMAN_H=true, HAVE_SYS_MMAN_H=false)

rmc-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ builds:
44
- any:
55
coverage: False
66
- imports:
7-
- linux_defaults_build_profile
8-
- debian11-x86_64
9-
- build_profile:osl154-x86_64 pikeos4.2-armv7hf-gcc5:
7+
- linux_defaults
8+
- build_profile:osl155-x86_64 pikeos4.2-armv7hf-gcc5:
9+
- build_profile:osl155-x86_64 rtems6.1_zedboard-armv7le-gcc13

src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ libosal_la_SOURCES += win32/semaphore.c
112112

113113
endif
114114

115-
libosal_la_CFLAGS = -std=gnu99 -Wall -Werror $(ADD_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
116-
libosal_la_LDFLAGS = -Wall -Werror $(AM_LDFLAGS) $(ADD_LIBS)
115+
libosal_la_CFLAGS = -std=gnu99 -Wall $(ADD_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
116+
libosal_la_LDFLAGS = -Wall $(AM_LDFLAGS) $(ADD_LIBS)
117117
libosal_la_LIBS = -lm $(ADD_LIBS)
118118

119119
install-exec-hook:

src/pikeos/task.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ osal_retval_t osal_task_create(osal_task_t *hdl, const osal_task_attr_t *attr,
8989
p4ext_thr_attr_t *ptattr = NULL;
9090
p4ext_thr_attr_init(&tattr);
9191
tattr.context_flags = P4_THREAD_ARG_FPU | P4_THREAD_ARG_DEBUG;
92+
tattr.stacksize = (8 * P4_PAGESIZE);
9293
ptattr = &tattr;
9394

9495
if ((attr != NULL) && (attr->priority > 0)) {

src/trace.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343

4444
#if LIBOSAL_HAVE_STRING_H == 1
4545
#include <string.h>
46+
#else
47+
// forward decl
48+
void *memset(void *s, int c, size_t n);
4649
#endif
4750

4851
//! \brief Allocate trace struct.

0 commit comments

Comments
 (0)