Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2015-12-23 11:35:03 +0000
committerJuergen Haug2016-02-28 17:01:11 +0000
commit81750c5e633ad14e7ab25b016564af20fec0a1cc (patch)
tree951ca972625f09ffee924496591e97d927a74f0d /runtime/org.eclipse.etrice.runtime.c
parentdc98de4bb145d8d3789909e32c11765596165fbb (diff)
downloadorg.eclipse.etrice-81750c5e633ad14e7ab25b016564af20fec0a1cc.tar.gz
org.eclipse.etrice-81750c5e633ad14e7ab25b016564af20fec0a1cc.tar.xz
org.eclipse.etrice-81750c5e633ad14e7ab25b016564af20fec0a1cc.zip
[generators] added cpp generator draft
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/.cproject22
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/.gitignore2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile5
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile.mk10
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/buildTools/defaults.mk2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/etStdDatatypes.h13
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h6
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etMutex.h7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSema.h7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTcpSockets.h7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etThread.h8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTime.h8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTimer.h8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h8
16 files changed, 111 insertions, 17 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/.cproject b/runtime/org.eclipse.etrice.runtime.c/.cproject
index 4b64a3634..e08c4b926 100644
--- a/runtime/org.eclipse.etrice.runtime.c/.cproject
+++ b/runtime/org.eclipse.etrice.runtime.c/.cproject
@@ -15,13 +15,13 @@
</externalSetting>
</externalSettings>
<extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919" name="WindowsMinGW" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
+ <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919" name="WindowsMinGW" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.592670815" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.801787195" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
@@ -43,6 +43,8 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/util}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/MT_WIN_MinGW}&quot;"/>
</option>
+ <option id="gnu.c.compiler.option.dialect.std.1095860550" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.warnings.pedantic.1900907598" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.316560634" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.2104156208" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
@@ -70,11 +72,11 @@
</externalSetting>
</externalSettings>
<extensions>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -97,6 +99,8 @@
</option>
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1123878180" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.878097472" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.dialect.std.706501680" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.c99" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.warnings.pedantic.1531135222" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2145340965" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.148289955" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
@@ -129,15 +133,15 @@
</externalSetting>
</externalSettings>
<extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919.18376023" name="ExternalMakefile" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
+ <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919.18376023" name="ExternalMakefile" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.1978608919.18376023." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.1317763190" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.1009481846" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
@@ -178,17 +182,17 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="WindowsMinGW"/>
- <configuration configurationName="LinuxPosix"/>
- <configuration configurationName="MinGWDebug">
+ <configuration configurationName="ExternalMakefile">
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.c"/>
</configuration>
- <configuration configurationName="ExternalMakefile">
+ <configuration configurationName="MinGWDebug">
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.c"/>
</configuration>
+ <configuration configurationName="WindowsMinGW"/>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.c"/>
</configuration>
+ <configuration configurationName="LinuxPosix"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
diff --git a/runtime/org.eclipse.etrice.runtime.c/.gitignore b/runtime/org.eclipse.etrice.runtime.c/.gitignore
index 811cd3775..d81a69793 100644
--- a/runtime/org.eclipse.etrice.runtime.c/.gitignore
+++ b/runtime/org.eclipse.etrice.runtime.c/.gitignore
@@ -2,5 +2,3 @@ bin
src-gen-info
WindowsMinGW
LinuxPosix
-/MinGWDebug/
-/PosixDebug/
diff --git a/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile b/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile
index 1c3586189..69efa78f5 100644
--- a/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile
+++ b/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile
@@ -1,9 +1,12 @@
+## Example Makefile
+
# environment variables: RUNTIME_ROOTDIR, MODELLIB_ROOTDIR, TARGET_PLATFORM, TARGET_BUILD_DIR, ECLIPSE_MODE
# default is windows mingw
-# CDT Environment:
+# examples CDT Environment:
# RUNTIME_ROOTDIR: ${workspace_loc:org.eclipse.etrice.runtime.c}
# MODELLIB_ROOTDIR: ${workspace_loc:org.eclipse.etrice.modellib.c}
+# ECLIPSE_MODE (no value)
ifeq ($(strip ${RUNTIME_ROOTDIR}),)
RUNTIME_ROOTDIR := ../org.eclipse.etrice.runtime.c
diff --git a/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile.mk b/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile.mk
index fa93315de..4c06f5e56 100644
--- a/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile.mk
+++ b/runtime/org.eclipse.etrice.runtime.c/buildTools/Makefile.mk
@@ -15,7 +15,9 @@
# IN_LDLIBS
# IN_PREREQS
-# Note: Variables set from environment or make parameter are unmodifiable.
+# Note: avoid trailing spaces !
+
+# Note: Variables from environment or cmd are unmodifiable.
# E.g. use additional variables:
# IN_SRCDIRS_REC += ${APP_SRCDIRS_REC}
# IN_SRCDIRS_REC += ...
@@ -50,6 +52,7 @@ endef
ifeq ($(strip ${IN_BUILD_DIR}),)
+# TODO: TARGET_BUILD_DIR should not be here
IN_BUILD_DIR := ${TARGET_BUILD_DIR}
endif
@@ -73,6 +76,7 @@ M_OBJS :=
M_SOURCES := $(call CANONICAL_PATH, ${M_SOURCES})
M_SOURCES += $(call CANONICAL_PATH,$(foreach DIR,${IN_SRCDIRS_REC},$(call REC_FILE_SEARCH,${DIR}/,*.c)))
+M_SOURCES += $(call CANONICAL_PATH,$(foreach DIR,${IN_SRCDIRS_REC},$(call REC_FILE_SEARCH,${DIR}/,*.cpp)))
M_OBJS += $(addprefix ${M_BUILD_DIR}/,$(addsuffix .o,$(basename ${M_SOURCES})))
M_DEFS := $(addprefix -D,${M_DEFS})
@@ -85,6 +89,10 @@ ${M_BUILD_DIR}/%.o: %.c
$(strip ${CC} -o $@ -c ${M_CFLAGS} ${M_SRC_CFLAGS} ${M_INCDIRS} \
${M_SRC_INCDIRS} ${M_SRC_DEFS} ${M_DEFS} $<)
+${M_BUILD_DIR}/%.o: %.cpp
+ @mkdir -p $(dir $@)
+ $(strip ${CXX} -o $@ -c ${M_CFLAGS} ${M_SRC_CFLAGS} ${M_INCDIRS} \
+ ${M_SRC_INCDIRS} ${M_SRC_DEFS} ${M_DEFS} $<)
.PHONY: build clean-all
diff --git a/runtime/org.eclipse.etrice.runtime.c/buildTools/defaults.mk b/runtime/org.eclipse.etrice.runtime.c/buildTools/defaults.mk
index a8543042d..4692d3c8b 100644
--- a/runtime/org.eclipse.etrice.runtime.c/buildTools/defaults.mk
+++ b/runtime/org.eclipse.etrice.runtime.c/buildTools/defaults.mk
@@ -3,7 +3,7 @@
# MODELLIB_ROOTDIR e.g. ${workspace_loc:org.eclipse.etrice.modellib.c} default: ../org.eclipse.etrice.modellib.c
# TARGET_PLATFORM MT_WIN_MinGW|MT_POSIX_GENERIC_GCC default MT_WIN_MinGW
# TARGET_BUILD_DIR automatically derived from TARGET_PLATFORM
-# ECLIPSE_MODE if set, makefile won't build modellib and runtime (let eclipse handle this)
+# ECLIPSE_MODE if present, makefile won't build modellib and runtime (let eclipse handle this)
#ifeq ($(strip ${RUNTIME_ROOTDIR}),)
# RUNTIME_ROOTDIR := ../org.eclipse.etrice.runtime.c
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h
index 2c9c386bf..a4bb8c0c2 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etLogger.h
@@ -17,6 +17,9 @@
*
* \author: tschuetz
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETLOGGER_H_
#define _ETLOGGER_H_
@@ -93,3 +96,7 @@ void etLogger_logInfoF(const char* format, ... );
void etLogger_fprintf(etFileHandle file, const char* format, ... );
#endif /* _ETLOGGER_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/etStdDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/common/etStdDatatypes.h
index 294068261..90f583d60 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/etStdDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/etStdDatatypes.h
@@ -13,6 +13,9 @@
/*
* Generic version for most platforms based on std.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETSTDDATATYPES_H_
#define _ETSTDDATATYPES_H_
@@ -30,7 +33,7 @@
/* --- Data types for room.basic.types */
-// bool already defined
+/* bool already defined */
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
@@ -58,11 +61,11 @@ typedef char* charPtr;
/*--- Cross language support (e.g. Java,C/C++) */
#define null NULL
-// typedef x boolean
+/* typedef x boolean */
/*-----------------------------------------------------------*/
-//--- Required types of runtime
+/*--- Required types of runtime */
typedef bool etBool;
#define ET_TRUE true
#define ET_FALSE false
@@ -115,3 +118,7 @@ typedef etInt16 etAddressId;
/*-----------------------------------------------------------*/
#endif /* _ETSTDDATATYPES_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h
index 99c5bb3e0..ff1902cac 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/etUnit/etUnit.h
@@ -19,6 +19,9 @@
*
* \author Thomas Schuetz
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETUNIT_H_
#define _ETUNIT_H_
@@ -387,4 +390,7 @@ void expectOrderEnd(etInt16 id, const char* msg, etInt16 identifier, const char*
#endif /* _ETUNIT_H_ */
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etMutex.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etMutex.h
index 27d0c1118..ec7ae3634 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etMutex.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etMutex.h
@@ -18,6 +18,9 @@
*
* \author Thomas Schuetz, Thomas Jung
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETMUTEX_H_
#define _ETMUTEX_H_
@@ -56,3 +59,7 @@ void etMutex_enter(etMutex* self);
void etMutex_leave(etMutex* self);
#endif /* _ETMUTEX_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSema.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSema.h
index 6642f69a3..8c2fefb3b 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSema.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etSema.h
@@ -9,6 +9,9 @@
* Thomas Schuetz (initial contribution)
*
*******************************************************************************/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETSEMA_H_
#define _ETSEMA_H_
@@ -57,3 +60,7 @@ void etSema_waitForWakeup(etSema* self);
#endif /* _ETSEMA_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTcpSockets.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTcpSockets.h
index 310ecc76a..a50017b55 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTcpSockets.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTcpSockets.h
@@ -17,6 +17,9 @@
*
* \author Henrik Rentz-Reichert
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _ETTCPSOCKETS_H_
#define _ETTCPSOCKETS_H_
@@ -173,3 +176,7 @@ etSocketError etWriteSocket(etSocketConnectionData* self, int size, const int8*
etSocketError etCloseSocket(etSocketConnectionData* self);
#endif /* _ETTCPSOCKETS_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etThread.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etThread.h
index a176f9d6a..980ccc476 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etThread.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etThread.h
@@ -18,6 +18,10 @@
* \author Thomas Schuetz, Thomas Jung
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _ETTHREAD_H_
#define _ETTHREAD_H_
@@ -97,3 +101,7 @@ etOSThreadId etThread_self_id(void);
#endif /* _ETTHREAD_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTime.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTime.h
index fa51d50ed..75dab0edd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTime.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTime.h
@@ -18,6 +18,10 @@
* \author Thomas Schuetz
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _ETTIME_H_
#define _ETTIME_H_
@@ -43,3 +47,7 @@ typedef struct etTime {
void getTimeFromTarget(etTime *t);
#endif /* _ETTIME_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTimer.h b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTimer.h
index 827c2a025..da9bdd228 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTimer.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/osal/etTimer.h
@@ -17,6 +17,10 @@
*
* \author Thomas Jung
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _ETTIMER_H_
#define _ETTIMER_H_
@@ -70,3 +74,7 @@ void etTimer_destruct(etTimer* self);
#endif /* __ETTIMER_H__ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h b/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
index a2bc7901e..d5b23e25c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/runtime/etRuntime.h
@@ -10,6 +10,10 @@
*
*******************************************************************************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _ETRUNTIME_H_
#define _ETRUNTIME_H_
@@ -31,3 +35,7 @@
etSema* etRuntime_getTerminateSemaphore();
#endif /* _ETRUNTIME_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h
index 8adfcda08..057d23a06 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h
@@ -10,6 +10,10 @@
*
*******************************************************************************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _ETDATATYPES_H_
#define _ETDATATYPES_H_
@@ -50,3 +54,7 @@ typedef DWORD etOSTimerId;
/*-----------------------------------------------------------*/
#endif /* _DATATYPES_H_ */
+
+#ifdef __cplusplus
+}
+#endif

Back to the top