# HG changeset patch # User Florian Pose # Date 1159186844 0 # Node ID 07c82e520ddd52ac41611c42b9017d7fa89fa72d # Parent 492767ba685a1a9d852ca34e8290df55ccb8ab62 MERGE trunk -r546:550 -> branches/stable-1.1 (Bugfix, Autotools, still w/o XML) diff -r 492767ba685a -r 07c82e520ddd Makefile --- a/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Makefile -# -# IgH EtherCAT master -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# kbuild section - -ifneq ($(KERNELRELEASE),) - -obj-m := master/ devices/ - -#------------------------------------------------------------------------------ -# default section - -else - -ifneq ($(wildcard ethercat.conf),) -include ethercat.conf -else -KERNEL := $(shell uname -r) -endif - -KERNEL_DIR := /lib/modules/$(KERNEL)/build -CURRENT_DIR := $(shell pwd) -INSTALL_MOD_DIR := ethercat - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules - -install: modules_install - @script/install.sh $(KERNEL) - -modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install - -clean: cleandoc - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - @rm -f Modules.symvers - -doc: - doxygen Doxyfile - -cleandoc: - @rm -rf doc - -#------------------------------------------------------------------------------ - -endif diff -r 492767ba685a -r 07c82e520ddd Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,96 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +SUBDIRS = master/ devices/ + +initdir = $(sysconfdir)/init.d +sysdir = $(sysconfdir)/sysconfig + +include_HEADERS = include/ecdb.h include/ecrt.h +noinst_SCRIPTS = script/lsec.pl script/ethercat.sh script/sysconfig + +MINI_FILES = \ + examples/mini/Kbuild \ + examples/mini/Makefile.am \ + examples/mini/Makefile.in \ + examples/mini/mini.c + +RTAI_FILES = \ + examples/rtai/Kbuild \ + examples/rtai/Makefile.am \ + examples/rtai/Makefile.in \ + examples/rtai/rtai_sample.c + +MSR_FILES = \ + examples/msr/Kbuild \ + examples/msr/libm.o_shipped \ + examples/msr/Makefile.am \ + examples/msr/Makefile.in \ + examples/msr/msr_load \ + examples/msr/msr_param.h \ + examples/msr/msr_sample.c \ + examples/msr/msrserv.pl \ + examples/msr/msr_unload + +EXTRA_DIST = $(noinst_SCRIPTS) $(MINI_FILES) $(RTAI_FILES) $(MSR_FILES) + +dist-hook: + if which svnversion >/dev/null 2>&1; then \ + svnversion $(srcdir) 2>/dev/null >$(distdir)/svnrevision; \ + fi + +install-data-local: + $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(initdir) + $(mkinstalldirs) $(sysdir) + $(INSTALL_SCRIPT) $(srcdir)/script/lsec.pl $(bindir)/lsec + $(INSTALL_SCRIPT) $(srcdir)/script/ethercat.sh $(initdir)/ethercat + $(INSTALL_DATA) $(srcdir)/script/sysconfig $(sysdir)/ethercat + +uninstall-local: + rm -rf $(LINUX_MODULES_DIR)/ethercat + rm $(bindir)/lsec + rm $(initdir)/ethercat + rm $(sysdir)/ethercat + +doc: + doxygen Doxyfile + +cleandoc: + @rm -rf documentation + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd configure.ac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure.ac Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,43 @@ +#------------------------------------------------------------------------------ +# $Id$ +#------------------------------------------------------------------------------ + +AC_INIT([ethercat],[1.1],[fp@igh-essen.com]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2]) +AC_PREFIX_DEFAULT([/opt/etherlab]) +AC_CONFIG_FILES([Makefile master/Makefile devices/Makefile \ + examples/mini/Makefile \ + examples/rtai/Makefile \ + examples/msr/Makefile]) + +#------------------------------------------------------------------------------ +# Linux sources +#------------------------------------------------------------------------------ + +AC_ARG_WITH([linux-dir], + AC_HELP_STRING( + [--with-linux-dir=], + [Linux source directory @<:@/lib/modules//build@:>@]), + [ ], + [ + modulesdir=/lib/modules/`uname -r` + withval=${modulesdir}/build + ]) + +AC_MSG_CHECKING([for Linux source tree]) + +if test \! -r ${withval}/Makefile; then + echo + AC_MSG_ERROR([No Linux kernel tree in $withval]) +fi + +AC_SUBST(LINUX_DIR,[$withval]) +AC_SUBST(LINUX_MODULES_DIR,[$modulesdir]) + +AC_MSG_RESULT($LINUX_DIR) + +#------------------------------------------------------------------------------ + +AC_OUTPUT + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd devices/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devices/Kbuild Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,50 @@ +#------------------------------------------------------------------------------ +# +# Kbuild +# +# IgH EtherCAT master device modules +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +obj-m := ec_8139too.o + +ec_8139too-objs := 8139too.o + +REV := $(shell if test -s $(src)/../svnrevision; then \ + cat $(src)/../svnrevision; \ + else \ + svnversion $(src) 2>/dev/null || echo "unknown"; \ + fi) + +EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER) + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd devices/Makefile --- a/devices/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Makefile -# -# IgH EtherCAT master device modules -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# kbuild section - -ifneq ($(KERNELRELEASE),) - -obj-m := ec_8139too.o - -ec_8139too-objs := 8139too.o - -REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") - -EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER) - -#------------------------------------------------------------------------------ -# default section - -else - -ifneq ($(wildcard ../ethercat.conf),) -include ../ethercat.conf -else -KERNEL := $(shell uname -r) -endif - -KERNEL_DIR := /lib/modules/$(KERNEL)/build -CURRENT_DIR := $(shell pwd) -INSTALL_MOD_DIR := ethercat/devices - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules - -install: modules_install - -modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install - -clean: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - @rm -f Modules.symvers - -#------------------------------------------------------------------------------ - -endif diff -r 492767ba685a -r 07c82e520ddd devices/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devices/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,56 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master module +# +# $Id: Makefile 545 2006-09-19 13:28:40Z fp $ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +EXTRA_DIST = \ + Kbuild \ + ecdev.h \ + 8139too.c \ + original_8139too.c + +ABSSRCDIR = `cd $(srcdir) && pwd -P` + +all: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules + +clean-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean + +install-data-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \ + INSTALL_MOD_DIR="ethercat" modules_install + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd ethercat.conf.tmpl --- a/ethercat.conf.tmpl Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -#------------------------------------------------------------------------------ -# -# EtherCAT configuration file -# -# $Id$ -# -# This file is a versioned template configuration. Copy it to "ethercat.conf" -# (which is ignored by Subversion) and adjust it to your needs. -# -#------------------------------------------------------------------------------ - -# -# The kernel to compile the EtherCAT sources against -# -KERNEL := $(shell uname -r) - -#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/mini/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/mini/Kbuild Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,40 @@ +#------------------------------------------------------------------------------ +# +# Kbuild +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +obj-m := ec_mini.o + +ec_mini-objs := mini.o + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/mini/Makefile --- a/examples/mini/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -#---------------------------------------------------------------- -# -# Makefile -# -# Minimal EtherCAT module. -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#---------------------------------------------------------------- - -ifneq ($(KERNELRELEASE),) - -#---------------------------------------------------------------- -# kbuild section -#---------------------------------------------------------------- - -obj-m := ec_mini.o - -ec_mini-objs := mini.o - -#---------------------------------------------------------------- - -else - -#---------------------------------------------------------------- -# default section -#---------------------------------------------------------------- - -ifneq ($(wildcard kernel.conf),) -include kernel.conf -else -KERNEL_DIR := /lib/modules/$(shell uname -r)/build -endif - -CURRENT_DIR := $(shell pwd) - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) - -clean: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - -#---------------------------------------------------------------- - -endif diff -r 492767ba685a -r 07c82e520ddd examples/mini/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/mini/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,50 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master module +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +ABSSRCDIR = `cd $(srcdir) && pwd -P` + +all: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules + +clean-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean + +install-data-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \ + INSTALL_MOD_DIR="ethercat" modules_install + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/mini/kernel.conf.tmpl --- a/examples/mini/kernel.conf.tmpl Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Kernel configuration file for EtherCAT mini sample -# -# $Id$ -# -# This file is a versioned template configuration. Copy it to "kernel.conf" -# (which is ignored by Subversion) and adjust it to your needs. -# -#------------------------------------------------------------------------------ - -KERNELDIR := /lib/modules/$(shell uname -r)/build diff -r 492767ba685a -r 07c82e520ddd examples/msr/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/msr/Kbuild Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,58 @@ +#------------------------------------------------------------------------------ +# +# Kbuild +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +MODULE := ec_msr_sample + +obj-m := $(MODULE).o + +$(MODULE)-objs := msr_sample.o \ + rt_lib/msr-core/msr_lists.o \ + rt_lib/msr-core/msr_main.o \ + rt_lib/msr-core/msr_charbuf.o \ + rt_lib/msr-core/msr_reg.o \ + rt_lib/msr-core/msr_interpreter.o \ + rt_lib/msr-core/msr_messages.o \ + rt_lib/msr-core/msr_proc.o \ + rt_lib/msr-core/msr_error_reg.o \ + rt_lib/msr-utils/msr_utils.o \ + rt_lib/msr-utils/msr_time.o \ + rt_lib/msr-math/msr_base64.o \ + rt_lib/msr-math/msr_hex_bin.o \ + libm.o + +EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \ + -D_SIMULATION -mhard-float + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/msr/Makefile --- a/examples/msr/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Makefile -# -# Sample module for use with IgH MSR library. -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -MODULE := ec_msr_sample - -#------------------------------------------------------------------------------ -# kbuild section -#------------------------------------------------------------------------------ - -ifneq ($(KERNELRELEASE),) - -obj-m := $(MODULE).o - -$(MODULE)-objs := msr_sample.o \ - rt_lib/msr-core/msr_lists.o \ - rt_lib/msr-core/msr_main.o \ - rt_lib/msr-core/msr_charbuf.o \ - rt_lib/msr-core/msr_reg.o \ - rt_lib/msr-core/msr_interpreter.o \ - rt_lib/msr-core/msr_messages.o \ - rt_lib/msr-core/msr_proc.o \ - rt_lib/msr-core/msr_error_reg.o \ - rt_lib/msr-utils/msr_utils.o \ - rt_lib/msr-utils/msr_time.o \ - rt_lib/msr-math/msr_base64.o \ - rt_lib/msr-math/msr_hex_bin.o \ - libm.o - -EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \ - -D_SIMULATION -mhard-float - -#------------------------------------------------------------------------------ -# default section -#------------------------------------------------------------------------------ - -else - -ifneq ($(wildcard kernel.conf),) -include kernel.conf -else -KERNEL := $(shell uname -r) -endif - -KERNEL_DIR := /lib/modules/$(KERNEL)/build -CURRENT_DIR := $(shell pwd) - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) - -clean: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - -install: - @./install.sh $(MODULE) $(KERNEL) - -endif - -#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/msr/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/msr/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,57 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master module +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +EXTRA_DIST = \ + Kbuild \ + msr_sample.c msr_param.h \ + libm.o_shipped \ + msr_load msr_unload \ + msrserv.pl + +ABSSRCDIR = `cd $(srcdir) && pwd -P` + +all: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules + +clean-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean + +install-data-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \ + INSTALL_MOD_DIR="ethercat" modules_install + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/msr/install.sh --- a/examples/msr/install.sh Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -#!/bin/sh - -#------------------------------------------------------------------------------ -# -# Realtime module install script -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -# Fetch parameters - -if [ $# -ne 2 ]; then - echo "Usage: $0 " - exit 1 -fi - -MODULENAME=$1 -KERNEL=$2 - -MODULESDIR=/lib/modules/$KERNEL/kernel/drivers/rt - -echo "Realtime installer" -echo " target: $MODULENAME" -echo " kernel: $KERNEL" - -# Create target directory - -if [ ! -d $MODULESDIR ]; then - echo " creating $MODULESDIR..." - mkdir $MODULESDIR || exit 1 -fi - -# Install files - -echo " installing $MODULENAME..." -if ! cp $MODULENAME.ko $MODULESDIR/$MODULENAME.ko; then exit 1; fi - -# Calculate dependencies - -echo " building module dependencies..." -depmod - -# Finish - -echo "done." -exit 0 - -#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/msr/kernel.conf.tmpl --- a/examples/msr/kernel.conf.tmpl Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Configuration file for MSR realtime modules -# -# $Id$ -# -# This file is a versioned template configuration. Copy it to "kernel.conf" -# (which is ignored by Subversion) and adjust it to your needs. -# -#------------------------------------------------------------------------------ - -# Kernel sources for module compilation -KERNEL := $(shell uname -r) - -#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/rtai/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rtai/Kbuild Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,40 @@ +#------------------------------------------------------------------------------ +# +# Kbuild +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +obj-m := ec_rtai_sample.o + +ec_rtai_sample-objs := rtai_sample.o + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/rtai/Makefile --- a/examples/rtai/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Makefile -# -# RTAI sample module for the IgH EtherCAT master. -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -ifneq ($(KERNELRELEASE),) - -#------------------------------------------------------------------------------ -# kbuild section -#------------------------------------------------------------------------------ - -obj-m := ec_rtai_sample.o - -ec_rtai_sample-objs := rtai_sample.o - -EXTRA_CFLAGS := -I/usr/realtime/include -mhard-float - -#------------------------------------------------------------------------------ - -else - -#------------------------------------------------------------------------------ -# default section -#------------------------------------------------------------------------------ - -ifneq ($(wildcard kernel.conf),) -include kernel.conf -else -KERNEL_DIR := /lib/modules/$(shell uname -r)/build -endif - -CURRENT_DIR := $(shell pwd) - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) - -clean: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - -#------------------------------------------------------------------------------ - -endif diff -r 492767ba685a -r 07c82e520ddd examples/rtai/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rtai/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,52 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master module +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +EXTRA_DIST = Kbuild rtai_sample.c + +ABSSRCDIR = `cd $(srcdir) && pwd -P` + +all: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules + +clean-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean + +install-data-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \ + INSTALL_MOD_DIR="ethercat" modules_install + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd examples/rtai/kernel.conf.tmpl --- a/examples/rtai/kernel.conf.tmpl Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Kernel configuration file for RTAI sample. -# -# $Id$ -# -# This file is a versioned template configuration. Copy it to "kernel.conf" -# (which is ignored by Subversion) and adjust it to your needs. -# -#------------------------------------------------------------------------------ - -KERNELDIR := /lib/modules/$(shell uname -r)/build diff -r 492767ba685a -r 07c82e520ddd master/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/master/Kbuild Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,52 @@ +#------------------------------------------------------------------------------ +# +# Kbuild +# +# IgH EtherCAT master module +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +obj-m := ec_master.o + +ec_master-objs := module.o master.o device.o slave.o datagram.o \ + domain.o mailbox.o ethernet.o debug.o fsm.o +# xmldev.o + +REV := $(shell if test -s $(src)/../svnrevision; then \ + cat $(src)/../svnrevision; \ + else \ + svnversion $(src) 2>/dev/null || echo "unknown"; \ + fi) + +EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER) + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd master/Makefile --- a/master/Makefile Mon Sep 25 12:15:36 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Makefile -# -# IgH EtherCAT master module -# -# $Id$ -# -# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH -# -# This file is part of the IgH EtherCAT Master. -# -# The IgH EtherCAT Master is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# The IgH EtherCAT Master is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the IgH EtherCAT Master; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# The right to use EtherCAT Technology is granted and comes free of -# charge under condition of compatibility of product made by -# Licensee. People intending to distribute/sell products based on the -# code, have to sign an agreement to guarantee that products using -# software based on IgH EtherCAT master stay compatible with the actual -# EtherCAT specification (which are released themselves as an open -# standard) as the (only) precondition to have the right to use EtherCAT -# Technology, IP and trade marks. -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# kbuild section - -ifneq ($(KERNELRELEASE),) - -obj-m := ec_master.o - -ec_master-objs := module.o master.o device.o slave.o datagram.o \ - domain.o mailbox.o ethernet.o debug.o fsm.o - -REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") - -EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER) - -#------------------------------------------------------------------------------ -# default section - -else - -ifneq ($(wildcard ../ethercat.conf),) -include ../ethercat.conf -else -KERNEL := $(shell uname -r) -endif - -KERNEL_DIR := /lib/modules/$(KERNEL)/build -CURRENT_DIR := $(shell pwd) -INSTALL_MOD_DIR := ethercat/master - -modules: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules - -install: modules_install - -modules_install: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install - -clean: - $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean - @rm -f Modules.symvers - -#------------------------------------------------------------------------------ - -endif diff -r 492767ba685a -r 07c82e520ddd master/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/master/Makefile.am Mon Sep 25 12:20:44 2006 +0000 @@ -0,0 +1,66 @@ +#------------------------------------------------------------------------------ +# +# Makefile.am +# +# IgH EtherCAT master module +# +# $Id: Makefile 545 2006-09-19 13:28:40Z fp $ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +EXTRA_DIST = \ + Kbuild \ + datagram.c datagram.h \ + debug.c debug.h \ + device.c device.h \ + domain.c domain.h \ + doxygen.c \ + ethernet.c ethernet.h \ + fsm.c fsm.h \ + globals.h \ + mailbox.c mailbox.h \ + master.c master.h \ + module.c \ + slave.c slave.h +# xmldev.c xmldev.h + +ABSSRCDIR = `cd $(srcdir) && pwd -P` + +all: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" modules + +clean-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" clean + +install-data-local: + $(MAKE) -C "$(LINUX_DIR)" M="$(ABSSRCDIR)" \ + INSTALL_MOD_DIR="ethercat" modules_install + +#------------------------------------------------------------------------------ diff -r 492767ba685a -r 07c82e520ddd master/domain.c --- a/master/domain.c Mon Sep 25 12:15:36 2006 +0000 +++ b/master/domain.c Mon Sep 25 12:20:44 2006 +0000 @@ -515,10 +515,14 @@ ec_datagram_t *datagram; working_counter_sum = 0; + domain->state = 0; list_for_each_entry(datagram, &domain->datagrams, list) { if (datagram->state == EC_DATAGRAM_RECEIVED) { working_counter_sum += datagram->working_counter; } + else { + domain->state = -1; + } } if (working_counter_sum != domain->response_count) { @@ -554,13 +558,7 @@ int ecrt_domain_state(const ec_domain_t *domain /**< EtherCAT domain */) { - ec_datagram_t *datagram; - - list_for_each_entry(datagram, &domain->datagrams, list) { - if (datagram->state != EC_DATAGRAM_RECEIVED) return -1; - } - - return 0; + return domain->state; } /*****************************************************************************/ diff -r 492767ba685a -r 07c82e520ddd master/domain.h --- a/master/domain.h Mon Sep 25 12:15:36 2006 +0000 +++ b/master/domain.h Mon Sep 25 12:20:44 2006 +0000 @@ -66,6 +66,7 @@ struct list_head datagrams; /**< process data datagrams */ uint32_t base_address; /**< logical offset address of the process data */ unsigned int response_count; /**< number of responding slaves */ + unsigned int state; /**< domain error state */ struct list_head data_regs; /**< PDO data registrations */ unsigned int working_counter_changes; /**< working counter changes since last notification */