# HG changeset patch # User Florian Pose # Date 1159179884 0 # Node ID 9028b20e3c123a67b52b2ef0ebbdb7f047edfa1e # Parent 58588a3a1562f2cee88d46f4cbc2685af5d1ebd3 EtherCAT master with Autotools. diff -r 58588a3a1562 -r 9028b20e3c12 Makefile --- a/Makefile Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Mon Sep 25 10:24:44 2006 +0000 @@ -0,0 +1,91 @@ +#------------------------------------------------------------------------------ +# +# 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) + +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 58588a3a1562 -r 9028b20e3c12 devices/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devices/Kbuild Mon Sep 25 10:24:44 2006 +0000 @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------ +# +# 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 svnversion $(src) 2>/dev/null || echo "unknown") + +EXTRA_CFLAGS = -DEC_REV=$(REV) -DEC_USER=$(USER) + +#------------------------------------------------------------------------------ diff -r 58588a3a1562 -r 9028b20e3c12 devices/Makefile --- a/devices/Makefile Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 devices/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devices/Makefile.am Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 ethercat.conf.tmpl --- a/ethercat.conf.tmpl Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/mini/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/mini/Kbuild Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/mini/Makefile --- a/examples/mini/Makefile Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/mini/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/mini/Makefile.am Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/mini/kernel.conf.tmpl --- a/examples/mini/kernel.conf.tmpl Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/msr/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/msr/Kbuild Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/msr/Makefile --- a/examples/msr/Makefile Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/msr/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/msr/Makefile.am Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/msr/install.sh --- a/examples/msr/install.sh Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/msr/kernel.conf.tmpl --- a/examples/msr/kernel.conf.tmpl Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/rtai/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rtai/Kbuild Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/rtai/Makefile --- a/examples/rtai/Makefile Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 examples/rtai/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rtai/Makefile.am Mon Sep 25 10:24: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 58588a3a1562 -r 9028b20e3c12 examples/rtai/kernel.conf.tmpl --- a/examples/rtai/kernel.conf.tmpl Sat Sep 23 10:56:02 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 58588a3a1562 -r 9028b20e3c12 master/Kbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/master/Kbuild Mon Sep 25 10:24:44 2006 +0000 @@ -0,0 +1,47 @@ +#------------------------------------------------------------------------------ +# +# 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 svnversion $(src) 2>/dev/null || echo "unknown") + +EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER) + +#------------------------------------------------------------------------------ diff -r 58588a3a1562 -r 9028b20e3c12 master/Makefile --- a/master/Makefile Sat Sep 23 10:56:02 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 xmldev.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 58588a3a1562 -r 9028b20e3c12 master/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/master/Makefile.am Mon Sep 25 10:24: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 + +#------------------------------------------------------------------------------