diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bd7ff8f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.c text +*.cpp text +*.h text +*.S text +*.txt text +*.md text + +# Declare files that will always have LF line endings on checkout. +*.sh text eol=lf + +# Denote all files that are truly binary and should not be modified. +*.lib binary diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE index 9a3c841..01aed50 100644 --- a/LICENSE +++ b/LICENSE @@ -1,34 +1,34 @@ -Simple Open EtherCAT Master Library - -Copyright (C) 2005-2017 Speciaal Machinefabriek Ketels v.o.f. -Copyright (C) 2005-2017 Arthur Ketels -Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven -Copyright (C) 2009-2017 rt-labs AB, Sweden - -SOEM is free software; you can redistribute it and/or modify it under the terms -of the GNU General Public License version 2 as published by the Free Software -Foundation. - -SOEM 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. - -As a special exception, if other files instantiate templates or use macros or -inline functions from this file, or you compile this file and link it with other -works to produce a work based on this file, this file does not by itself cause -the resulting work to be covered by the GNU General Public License. However the -source code for this file must still be made available in accordance with -section (3) of the GNU General Public License. - -This exception does not invalidate any other reasons why a work based on this -file might be covered by the GNU General Public License. - -The EtherCAT Technology, the trade name and logo "EtherCAT" are the intellectual -property of, and protected by Beckhoff Automation GmbH. You can use SOEM for the -sole purpose of creating, using and/or selling or otherwise distributing an -EtherCAT network master provided that an EtherCAT Master License is obtained -from Beckhoff Automation GmbH. - -In case you did not receive a copy of the EtherCAT Master License along with -SOEM write to Beckhoff Automation GmbH, Eiserstrasse 5, D-33415 Verl, Germany -(www.beckhoff.com). +Simple Open EtherCAT Master Library + +Copyright (C) 2005-2017 Speciaal Machinefabriek Ketels v.o.f. +Copyright (C) 2005-2017 Arthur Ketels +Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven +Copyright (C) 2009-2017 rt-labs AB, Sweden + +SOEM is free software; you can redistribute it and/or modify it under the terms +of the GNU General Public License version 2 as published by the Free Software +Foundation. + +SOEM 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. + +As a special exception, if other files instantiate templates or use macros or +inline functions from this file, or you compile this file and link it with other +works to produce a work based on this file, this file does not by itself cause +the resulting work to be covered by the GNU General Public License. However the +source code for this file must still be made available in accordance with +section (3) of the GNU General Public License. + +This exception does not invalidate any other reasons why a work based on this +file might be covered by the GNU General Public License. + +The EtherCAT Technology, the trade name and logo "EtherCAT" are the intellectual +property of, and protected by Beckhoff Automation GmbH. You can use SOEM for the +sole purpose of creating, using and/or selling or otherwise distributing an +EtherCAT network master provided that an EtherCAT Master License is obtained +from Beckhoff Automation GmbH. + +In case you did not receive a copy of the EtherCAT Master License along with +SOEM write to Beckhoff Automation GmbH, Eiserstrasse 5, D-33415 Verl, Germany +(www.beckhoff.com). diff --git a/cmake/Modules/Platform/rt-kernel-C.cmake b/cmake/Modules/Platform/rt-kernel-C.cmake index 246bcba..93ed942 100644 --- a/cmake/Modules/Platform/rt-kernel-C.cmake +++ b/cmake/Modules/Platform/rt-kernel-C.cmake @@ -1,13 +1,13 @@ - -message("rt-kernel-C.cmake") - -# Determine toolchain -include(CMakeForceCompiler) - -if(${ARCH} MATCHES "kinetis") - cmake_force_c_compiler(arm-eabi-gcc GNU) - cmake_force_cxx_compiler(arm-eabi-g++ GNU) -elseif(${ARCH} MATCHES "bfin") - cmake_force_c_compiler(bfin-elf-gcc GNU) - cmake_force_cxx_compiler(bfin-elf-g++ GNU) -endif() + +message("rt-kernel-C.cmake") + +# Determine toolchain +include(CMakeForceCompiler) + +if(${ARCH} MATCHES "kinetis") + cmake_force_c_compiler(arm-eabi-gcc GNU) + cmake_force_cxx_compiler(arm-eabi-g++ GNU) +elseif(${ARCH} MATCHES "bfin") + cmake_force_c_compiler(bfin-elf-gcc GNU) + cmake_force_cxx_compiler(bfin-elf-g++ GNU) +endif() diff --git a/cmake/Modules/Platform/rt-kernel-gcc-bfin.cmake b/cmake/Modules/Platform/rt-kernel-gcc-bfin.cmake index a6a50a4..3dcb499 100644 --- a/cmake/Modules/Platform/rt-kernel-gcc-bfin.cmake +++ b/cmake/Modules/Platform/rt-kernel-gcc-bfin.cmake @@ -1,3 +1,3 @@ - -set(MACHINE "-mcpu=bf537") -set(LDFLAGS "-T${RT_KERNEL_PATH}/bsp/${BSP}/${BSP}.ld") + +set(MACHINE "-mcpu=bf537") +set(LDFLAGS "-T${RT_KERNEL_PATH}/bsp/${BSP}/${BSP}.ld") diff --git a/cmake/Modules/Platform/rt-kernel-gcc-kinetis.cmake b/cmake/Modules/Platform/rt-kernel-gcc-kinetis.cmake index 4eafe8c..0dca49c 100644 --- a/cmake/Modules/Platform/rt-kernel-gcc-kinetis.cmake +++ b/cmake/Modules/Platform/rt-kernel-gcc-kinetis.cmake @@ -1,7 +1,7 @@ - -message("rt-kernel-gcc-kinetis.cmake") - -#SET_PROPERTY(GLOBAL PROPERTY ARCH kinetis) -#SET_PROPERTY(GLOBAL PROPERTY BSP twrk60) - -set(MACHINE "-mfpu=vfp -mcpu=cortex-m3 -mthumb") + +message("rt-kernel-gcc-kinetis.cmake") + +#SET_PROPERTY(GLOBAL PROPERTY ARCH kinetis) +#SET_PROPERTY(GLOBAL PROPERTY BSP twrk60) + +set(MACHINE "-mfpu=vfp -mcpu=cortex-m3 -mthumb") diff --git a/cmake/Modules/Platform/rt-kernel-gcc.cmake b/cmake/Modules/Platform/rt-kernel-gcc.cmake index 0bc5f51..3be3d18 100644 --- a/cmake/Modules/Platform/rt-kernel-gcc.cmake +++ b/cmake/Modules/Platform/rt-kernel-gcc.cmake @@ -1,19 +1,19 @@ - -message("rt-kernel-gcc.cmake") - -set(CMAKE_C_OUTPUT_EXTENSION .o) -set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) - -set(CFLAGS "${CFLAGS} -Wall -Wextra -Wno-unused-parameter -Werror") -set(CFLAGS "${CFLAGS} -fomit-frame-pointer -fno-strict-aliasing -fshort-wchar") -#set(CFLAGS" ${CFLAGS} -B$(GCC_PATH)/libexec/gcc") - -set(CXXFLAGS "${CXXFLAGS} -fno-rtti -fno-exceptions") - -set(LDFLAGS "${LDFLAGS} -nostartfiles") - -set(CMAKE_C_FLAGS "${CFLAGS} ${MACHINE}" CACHE STRING "") -set(CMAKE_EXE_LINKER_FLAGS "${MACHINE} ${LDFLAGS}" CACHE STRING "") - - - + +message("rt-kernel-gcc.cmake") + +set(CMAKE_C_OUTPUT_EXTENSION .o) +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +set(CFLAGS "${CFLAGS} -Wall -Wextra -Wno-unused-parameter -Werror") +set(CFLAGS "${CFLAGS} -fomit-frame-pointer -fno-strict-aliasing -fshort-wchar") +#set(CFLAGS" ${CFLAGS} -B$(GCC_PATH)/libexec/gcc") + +set(CXXFLAGS "${CXXFLAGS} -fno-rtti -fno-exceptions") + +set(LDFLAGS "${LDFLAGS} -nostartfiles") + +set(CMAKE_C_FLAGS "${CFLAGS} ${MACHINE}" CACHE STRING "") +set(CMAKE_EXE_LINKER_FLAGS "${MACHINE} ${LDFLAGS}" CACHE STRING "") + + + diff --git a/cmake/Modules/Platform/rt-kernel.cmake b/cmake/Modules/Platform/rt-kernel.cmake index 4bc5441..c272fd4 100644 --- a/cmake/Modules/Platform/rt-kernel.cmake +++ b/cmake/Modules/Platform/rt-kernel.cmake @@ -1,20 +1,20 @@ -if(__RTK_CMAKE_INCLUDED) - return() -endif() -set(__RTK_CMAKE_INCLUDED TRUE) -message("rt-kernel.cmake") - -include_directories( - ${RT_KERNEL_PATH}/include - ${RT_KERNEL_PATH}/include/kern - ${RT_KERNEL_PATH}/kern - ${RT_KERNEL_PATH}/include/drivers - ${RT_KERNEL_PATH}/include/arch/${ARCH} - ${RT_KERNEL_PATH}/bsp/${BSP}/include - ${RT_KERNEL_PATH}/lwip/src/include - ${RT_KERNEL_PATH}/lwip/src/include/ipv4 -) - -link_directories( - ${RT_KERNEL_PATH}/lib/${ARCH} -) +if(__RTK_CMAKE_INCLUDED) + return() +endif() +set(__RTK_CMAKE_INCLUDED TRUE) +message("rt-kernel.cmake") + +include_directories( + ${RT_KERNEL_PATH}/include + ${RT_KERNEL_PATH}/include/kern + ${RT_KERNEL_PATH}/kern + ${RT_KERNEL_PATH}/include/drivers + ${RT_KERNEL_PATH}/include/arch/${ARCH} + ${RT_KERNEL_PATH}/bsp/${BSP}/include + ${RT_KERNEL_PATH}/lwip/src/include + ${RT_KERNEL_PATH}/lwip/src/include/ipv4 +) + +link_directories( + ${RT_KERNEL_PATH}/lib/${ARCH} +) diff --git a/cmake/Toolchains/rt-kernel-bfin.cmake b/cmake/Toolchains/rt-kernel-bfin.cmake index c572a2d..7a7d91e 100644 --- a/cmake/Toolchains/rt-kernel-bfin.cmake +++ b/cmake/Toolchains/rt-kernel-bfin.cmake @@ -1,9 +1,9 @@ - -message("rt-kernel-kinetis.cmake") - -set(CMAKE_SYSTEM_NAME rt-kernel) -set(CMAKE_SYSTEM_VERSION 1) -set(CMAKE_SYSTEM_PROCESSOR bfin) - -set(ARCH bfin CACHE STRING "Architecture") -set(BSP stamp537 CACHE STRING "Board") + +message("rt-kernel-kinetis.cmake") + +set(CMAKE_SYSTEM_NAME rt-kernel) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR bfin) + +set(ARCH bfin CACHE STRING "Architecture") +set(BSP stamp537 CACHE STRING "Board") diff --git a/cmake/Toolchains/rt-kernel-kinetis.cmake b/cmake/Toolchains/rt-kernel-kinetis.cmake index 5c542cd..345cc5a 100644 --- a/cmake/Toolchains/rt-kernel-kinetis.cmake +++ b/cmake/Toolchains/rt-kernel-kinetis.cmake @@ -1,9 +1,9 @@ - -message("rt-kernel-kinetis.cmake") - -set(CMAKE_SYSTEM_NAME rt-kernel) -set(CMAKE_SYSTEM_VERSION 1) -set(CMAKE_SYSTEM_PROCESSOR kinetis) - -set(ARCH kinetis CACHE STRING "Architecture") -set(BSP twrk60 CACHE STRING "Board") + +message("rt-kernel-kinetis.cmake") + +set(CMAKE_SYSTEM_NAME rt-kernel) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR kinetis) + +set(ARCH kinetis CACHE STRING "Architecture") +set(BSP twrk60 CACHE STRING "Board") diff --git a/osal/linux/osal.c b/osal/linux/osal.c old mode 100755 new mode 100644 diff --git a/soem/ethercatmain.h b/soem/ethercatmain.h old mode 100755 new mode 100644 diff --git a/test/linux/slaveinfo/CMakeLists.txt b/test/linux/slaveinfo/CMakeLists.txt old mode 100755 new mode 100644