Open EtherCAT Society——SOEM、SOES

编译项目EtherCAT初体验,编译工具:

Visual Studio V2019

[root@localhost build]# cmake

cmake version 2.8.12.2

 

官网:

http://openethercatsociety.github.io/

 

  1. SOEM (Simle Open EtherCAT Master)
  2. SOES (Simple Open EtherCAT Slave)

 

Github地址:

Simple Open Source EtherCAT Master:

https://github.com/OpenEtherCATsociety/SOEM

 

Simple Open Source EtherCAT Slave

https://github.com/OpenEtherCATsociety/SOES
 

EtherCAT Master using SOEM

  1. Freescale i.MX53
  2. Blackfin 5xx
  3. Blackfin 6xx
  4. Intel
  5. Infineon XMC47/XMC48

 

EtherCAT Slave using SOES

  1. Freescale K10 - using Beckhoff ET1100
  2. Freescale K60 - using Beckhoff ET1100
  3. Xilinx Zynq - using Beckhoff ET1815
  4. Infineon XMC43/XMC48
  5. Microchip LAN9252

 

Supported profiles/features

  1. CANOpen over EtherCAT (CoE)
  2. Vendor over EtherCAT (VoE)
  3. Distributed clocks
  4. SERCOS over EtherCAT (SoE)

 

        1. 安装wpcap(Win Pcap)

参见开发技巧第三节

        1. SOME for Win

编译:

Windows (Visual Studio)

Start a Visual Studio command prompt then:

  1. mkdir build
  2. cd build
  3. cmake .. -G "NMake Makefiles"
  4. nmake

 

Linux & macOS

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make

 

实录Windows下的编译过程:

Open EtherCAT Society——SOEM、SOES_第1张图片

D:\DEV_TEST\SOEM-master>mkdir build

D:\DEV_TEST\SOEM-master>cd build

 

D:\DEV_TEST\SOEM-master\build>cmake .. -G "NMake Makefiles"

-- OS is win32

-- LIB_DIR: lib

-- Configuring done

-- Generating done

-- Build files have been written to: D:/DEV_TEST/SOEM-master/build

 

D:\DEV_TEST\SOEM-master\build>nmake

Microsoft (R) 程序维护实用工具 14.28.29913.0 版

版权所有 (C) Microsoft Corporation。  保留所有权利。

 

Consolidate compiler generated dependencies of target soem

[ 68%] Built target soem

Consolidate compiler generated dependencies of target slaveinfo

[ 78%] Built target slaveinfo

Consolidate compiler generated dependencies of target eepromtool

[ 89%] Built target eepromtool

Consolidate compiler generated dependencies of target simple_test

[100%] Built target simple_test

 

使用,这里可以查找到网卡的名称:

D:\DEV_TEST\SOEM-master\build\test\linux\slaveinfo>slaveinfo.exe

SOEM (Simple Open EtherCAT Master)

Slaveinfo

Usage: slaveinfo ifname [options]

ifname = eth0 for example

Options :

 -sdo : print SDO info

 -map : print mapping

Available adapters

Description : VMware Virtual Ethernet Adapter, Device to use for wpcap: \Device\NPF_{E3E2C91D-F671-447A-A2C9-211ACA26215D}

Description : VMware Virtual Ethernet Adapter, Device to use for wpcap: \Device\NPF_{D9F7C8A7-F48D-4507-A81B-05FED045AC7B}

Description : Intel(R) Ethernet Connection (7) I219-LM, Device to use for wpcap: \Device\NPF_{8722D7C8-003A-4EEE-9DDD-15947AE0BF2F}

Description : Sangfor SSL VPN CS Support System VNIC, Device to use for wpcap: \Device\NPF_{B0955823-2C00-4002-98AA-A7125AE3EF69}

End program

 

D:\DEV_TEST\SOEM-master\build\test\linux\slaveinfo>slaveinfo.exe \Device\NPF_{8722D7C8-003A-4EEE-9DDD-15947AE0BF2F}

SOEM (Simple Open EtherCAT Master)

Slaveinfo

Starting slaveinfo

ec_init on \Device\NPF_{8722D7C8-003A-4EEE-9DDD-15947AE0BF2F} succeeded.

No slaves found!

End slaveinfo, close socket

End program

 

D:\DEV_TEST\SOEM-master\build\test\linux\slaveinfo>cd ..

 

D:\DEV_TEST\SOEM-master\build\test\linux>cd simple_test

 

D:\DEV_TEST\SOEM-master\build\test\linux\simple_test>simple_test.exe \Device\NPF_{8722D7C8-003A-4EEE-9DDD-15947AE0BF2F}

SOEM (Simple Open EtherCAT Master)

Simple test

Starting simple test

ec_init on \Device\NPF_{8722D7C8-003A-4EEE-9DDD-15947AE0BF2F} succeeded.

No slaves found!

End simple test, close socket

End program

 

EEPROM工具:

D:\DEV_TEST\SOEM-master\build\test\linux\eepromtool>eepromtool.exe \Device\NPF_{E3E2C91D-F671-447A-A2C9-211ACA26215D}

SOEM (Simple Open EtherCAT Master)

EEPROM tool

Usage: eepromtool ifname slave OPTION fname|alias

ifname = eth0 for example

slave = slave number in EtherCAT order 1..n

    -i      display EEPROM information

    -walias write slave alias

    -r      read EEPROM, output binary format

    -ri     read EEPROM, output Intel Hex format

    -w      write EEPROM, input binary format

    -wi     write EEPROM, input Intel Hex format

End program

        1. SOES

编译:

D:\DEV_TEST\SOES-master>mkdir build

D:\DEV_TEST\SOES-master>cd build

 

D:\DEV_TEST\SOES-master\build>cmake .. -G "NMake Makefiles"

CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):

  Compatibility with CMake < 2.8.12 will be removed from a future version of

  CMake.

 

  Update the VERSION argument value or use a ... suffix to tell

  CMake that the project does not need compatibility with older versions.

 

 

-- The C compiler identification is MSVC 19.28.29913.0

-- The CXX compiler identification is MSVC 19.28.29913.0

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29910/bin/Hostx86/x86/cl.exe - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29910/bin/Hostx86/x86/cl.exe - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

CMake Error at CMakeLists.txt:29 (add_subdirectory):

  add_subdirectory called with incorrect number of arguments

 

 

-- Building for Windows

-- Configuring incomplete, errors occurred!

See also "D:/DEV_TEST/SOES-master/build/CMakeFiles/CMakeOutput.log"

 

CMakeLists.txt文件第29行不通过,看没什么重要的,注释掉走通这一步。

 

D:\DEV_TEST\SOES-master\build>nmake

 

Microsoft (R) 程序维护实用工具 14.28.29913.0 版

版权所有 (C) Microsoft Corporation。  保留所有权利。

 

[ 14%] Building C object soes/CMakeFiles/soes.dir/esc.c.obj

esc.c

D:\DEV_TEST\SOES-master\soes\esc.c(6): fatal error C1083: 无法打开包括文件: “cc.h”: No such file or directory

NMAKE : fatal error U1077: “"C:\Program Files\CMake\bin\cmake.exe"”: 返回代码“0x2”

Stop.

NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\nmake.exe"”: 返回代码“0x2”

Stop.

NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\nmake.exe"”: 返回代码“0x2”

Stop.

 

太多的报错,编译没有通过。

缺少cc.h、endian.h等包含文件

 

转移到CentOS上操作。

Github这几天都没好用:

[root@localhost ~]# git clone https://github.com/OpenEtherCATsociety/SOES.git

正克隆到 'SOES'...

fatal: unable to access 'https://github.com/OpenEtherCATsociety/SOES.git/': Empty reply from server

 

将SOES文件拷贝到CentOS中:

[root@localhost ~]# unzip SOES-master.zip

Archive:  SOES-master.zip

f244ea522dc8900770ae20525dcff0ca07c26cb2

   creating: SOES-master/

  inflating: SOES-master/.gitattributes 

   creating: SOES-master/.github/

  inflating: SOES-master/.github/CONTRIBUTING.md 

 extracting: SOES-master/.github/PULL_REQUEST_TEMPLATE.md 

   creating: SOES-master/.github/workflows/

  inflating: SOES-master/.github/workflows/build.yml 

  inflating: SOES-master/.gitignore 

  inflating: SOES-master/CMakeLists.txt 

  inflating: SOES-master/LICENSE    

  inflating: SOES-master/README.md  

   creating: SOES-master/applications/

   creating: SOES-master/applications/linux_lan9252demo/

  inflating: SOES-master/applications/linux_lan9252demo/CMakeLists.txt 

  inflating: SOES-master/applications/linux_lan9252demo/ecat_options.h 

  inflating: SOES-master/applications/linux_lan9252demo/main.c 

  inflating: SOES-master/applications/linux_lan9252demo/slave.bin 

  inflating: SOES-master/applications/linux_lan9252demo/slave.esx 

  inflating: SOES-master/applications/linux_lan9252demo/slave.xml 

  inflating: SOES-master/applications/linux_lan9252demo/slave_objectlist.c 

  inflating: SOES-master/applications/linux_lan9252demo/utypes.h 

   creating: SOES-master/applications/rtl_lwip_eoe/

  inflating: SOES-master/applications/rtl_lwip_eoe/ecat_options.h 

  inflating: SOES-master/applications/rtl_lwip_eoe/main.c 

  inflating: SOES-master/applications/rtl_lwip_eoe/slave30.bin 

  inflating: SOES-master/applications/rtl_lwip_eoe/slave30.c 

  inflating: SOES-master/applications/rtl_lwip_eoe/slave30.esx 

  inflating: SOES-master/applications/rtl_lwip_eoe/slave30.xml 

  inflating: SOES-master/applications/rtl_lwip_eoe/slave30_objectlist.c 

  inflating: SOES-master/applications/rtl_lwip_eoe/utypes.h 

   creating: SOES-master/applications/rtl_slavedemo/

   creating: SOES-master/applications/rtl_slavedemo/.settings/

  inflating: SOES-master/applications/rtl_slavedemo/.settings/org.eclipse.cdt.codan.core.prefs 

  inflating: SOES-master/applications/rtl_slavedemo/.settings/org.eclipse.cdt.core.prefs 

  inflating: SOES-master/applications/rtl_slavedemo/CMakeLists.txt 

  inflating: SOES-master/applications/rtl_slavedemo/RTL_ATO.xml 

  inflating: SOES-master/applications/rtl_slavedemo/RTL_ATO_SPI_SLAVE.bin 

  inflating: SOES-master/applications/rtl_slavedemo/bootstrap.c 

  inflating: SOES-master/applications/rtl_slavedemo/bootstrap.h 

  inflating: SOES-master/applications/rtl_slavedemo/ecat_options.h 

  inflating: SOES-master/applications/rtl_slavedemo/eeprom.bin 

  inflating: SOES-master/applications/rtl_slavedemo/led_handler.c 

  inflating: SOES-master/applications/rtl_slavedemo/main.c 

  inflating: SOES-master/applications/rtl_slavedemo/objectlist.c 

  inflating: SOES-master/applications/rtl_slavedemo/utypes.h 

   creating: SOES-master/applications/rtl_xmc4_dynpdo/

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/CMakeLists.txt 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/ecat_options.h 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/main.c 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/sii_eeprom.bin 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/slave.esx 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/slave.xml 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/slave_objectlist.c 

  inflating: SOES-master/applications/rtl_xmc4_dynpdo/utypes.h 

   creating: SOES-master/applications/tiesc_am335x/

  inflating: SOES-master/applications/tiesc_am335x/am335xice.bin 

  inflating: SOES-master/applications/tiesc_am335x/am335xice.esx 

  inflating: SOES-master/applications/tiesc_am335x/am335xice.xml 

  inflating: SOES-master/applications/tiesc_am335x/am335xice_objectlist.c 

  inflating: SOES-master/applications/tiesc_am335x/ecat_options.h 

  inflating: SOES-master/applications/tiesc_am335x/main.c 

  inflating: SOES-master/applications/tiesc_am335x/utypes.h 

   creating: SOES-master/applications/tiesc_k2gice/

  inflating: SOES-master/applications/tiesc_k2gice/ecat_options.h 

  inflating: SOES-master/applications/tiesc_k2gice/k2gice.bin 

  inflating: SOES-master/applications/tiesc_k2gice/k2gice.esx 

  inflating: SOES-master/applications/tiesc_k2gice/k2gice.xml 

  inflating: SOES-master/applications/tiesc_k2gice/k2gice_objectlist.c 

  inflating: SOES-master/applications/tiesc_k2gice/main.c 

  inflating: SOES-master/applications/tiesc_k2gice/utypes.h 

   creating: SOES-master/applications/xmc4300_slavedemo/

  inflating: SOES-master/applications/xmc4300_slavedemo/Makefile 

   creating: SOES-master/applications/xmc4300_slavedemo/XMC_Peripheral_Library/

  inflating: SOES-master/applications/xmc4300_slavedemo/XMC_Peripheral_Library/README.download 

  inflating: SOES-master/applications/xmc4300_slavedemo/ecat_options.h 

  inflating: SOES-master/applications/xmc4300_slavedemo/esi.xml 

  inflating: SOES-master/applications/xmc4300_slavedemo/main.c 

  inflating: SOES-master/applications/xmc4300_slavedemo/objectlist.c 

  inflating: SOES-master/applications/xmc4300_slavedemo/sii_eeprom.bin 

  inflating: SOES-master/applications/xmc4300_slavedemo/utypes.h 

   creating: SOES-master/cmake/

  inflating: SOES-master/cmake/Linux.cmake 

   creating: SOES-master/cmake/Platform/

  inflating: SOES-master/cmake/Platform/rt-kernel.cmake 

   creating: SOES-master/cmake/toolchain/

  inflating: SOES-master/cmake/toolchain/rt-kernel-twrk60.cmake 

  inflating: SOES-master/cmake/toolchain/rt-kernel-xmc4.cmake 

   creating: SOES-master/drivers/

   creating: SOES-master/drivers/linux/

   creating: SOES-master/drivers/linux/lan9252/

  inflating: SOES-master/drivers/linux/lan9252/Kconfig 

  inflating: SOES-master/drivers/linux/lan9252/Makefile 

  inflating: SOES-master/drivers/linux/lan9252/lan9252.c 

  inflating: SOES-master/drivers/linux/lan9252/microchip,lan9252.txt 

   creating: SOES-master/soes/

  inflating: SOES-master/soes/CMakeLists.txt 

  inflating: SOES-master/soes/Doxyfile 

   creating: SOES-master/soes/doc/

   creating: SOES-master/soes/doc/images/

  inflating: SOES-master/soes/doc/images/esi_pdo.png 

  inflating: SOES-master/soes/doc/images/sii_pdo.png 

  inflating: SOES-master/soes/doc/soes.dox 

  inflating: SOES-master/soes/doc/tutorial.txt 

  inflating: SOES-master/soes/ecat_slv.c 

  inflating: SOES-master/soes/ecat_slv.h 

  inflating: SOES-master/soes/esc.c 

  inflating: SOES-master/soes/esc.h 

  inflating: SOES-master/soes/esc_coe.c 

  inflating: SOES-master/soes/esc_coe.h 

  inflating: SOES-master/soes/esc_eep.c 

  inflating: SOES-master/soes/esc_eep.h 

  inflating: SOES-master/soes/esc_eoe.c 

  inflating: SOES-master/soes/esc_eoe.h 

  inflating: SOES-master/soes/esc_foe.c 

  inflating: SOES-master/soes/esc_foe.h 

   creating: SOES-master/soes/hal/

   creating: SOES-master/soes/hal/linux-lan9252/

  inflating: SOES-master/soes/hal/linux-lan9252/esc_hw.c 

   creating: SOES-master/soes/hal/rt-kernel-lan9252/

  inflating: SOES-master/soes/hal/rt-kernel-lan9252/esc_hw.c 

   creating: SOES-master/soes/hal/rt-kernel-twrk60/

  inflating: SOES-master/soes/hal/rt-kernel-twrk60/esc_hw.c 

   creating: SOES-master/soes/hal/rt-kernel-xmc4/

  inflating: SOES-master/soes/hal/rt-kernel-xmc4/esc_hw.c 

  inflating: SOES-master/soes/hal/rt-kernel-xmc4/esc_hw.h 

  inflating: SOES-master/soes/hal/rt-kernel-xmc4/esc_hw_eep.c 

  inflating: SOES-master/soes/hal/rt-kernel-xmc4/esc_hw_eep.h 

   creating: SOES-master/soes/hal/tiesc/

  inflating: SOES-master/soes/hal/tiesc/applInterface.h 

  inflating: SOES-master/soes/hal/tiesc/ecat_def.h 

  inflating: SOES-master/soes/hal/tiesc/ecatslv.h 

  inflating: SOES-master/soes/hal/tiesc/esc_hw.c 

  inflating: SOES-master/soes/hal/tiesc/esc_hw.h 

  inflating: SOES-master/soes/hal/tiesc/esc_hw_eep.c 

  inflating: SOES-master/soes/hal/tiesc/esc_hw_eep.h 

   creating: SOES-master/soes/hal/xmc4/

  inflating: SOES-master/soes/hal/xmc4/esc_hw.c 

  inflating: SOES-master/soes/hal/xmc4/esc_hw.h 

  inflating: SOES-master/soes/hal/xmc4/esc_hw_eep.c 

  inflating: SOES-master/soes/hal/xmc4/esc_hw_eep.h 

   creating: SOES-master/soes/include/

   creating: SOES-master/soes/include/sys/

   creating: SOES-master/soes/include/sys/gcc/

  inflating: SOES-master/soes/include/sys/gcc/cc.h 

  inflating: SOES-master/soes/options.h 

  inflating: SOES-master/version.h.in 

[root@localhost ~]# ls -l

总用量 334612

-rw-------. 1 root root      1626 3月  25 2020 anaconda-ks.cfg

-rw-r--r--  1 root root  64246045 1月  14 22:47 apache-activemq-5.16.1-bin.tar.gz

-rw-r--r--  1 root root  57010216 2月  12 03:51 apache-artemis-2.17.0-bin.tar.gz

-rw-r--r--  1 root root     29680 3月  23 00:42 closer.cgi?filename=%2Factivemq%2F5.16.1%2Fapache-activemq-5.16.1-bin.tar.gz

-rw-r--r--  1 root root  64098280 1月  28 19:14 influxdb-1.8.4.x86_64.rpm

-rw-r--r--. 1 root root      1654 3月  25 2020 initial-setup-ks.cfg

drwxr-xr-x  4 root root        75 3月  23 00:59 json-data-generator-1.4.2-SNAPSHOT

-rwxrw-rw-  1 root root 116070400 3月  22 13:56 json-data-generator-1.4.2-SNAPSHOT-bin.tar

-rwxrw-rw-  1 root root  15836855 3月  30 09:30 rabbitmq-server-3.8.14-1.el8.noarch.rpm

drwxr-xr-x  7 root root       195 2月  17 23:45 SOES-master

-rwxrw-rw-  1 root root    272266 3月  31 01:29 SOES-master.zip

-rw-r--r--  1 root root  25054315 3月  18 05:58 telegraf-1.18.0-1.x86_64.rpm

 

[root@localhost ~]# cd SOES-master/

[root@localhost SOES-master]# ls

applications  CMakeLists.txt  LICENSE    soes

cmake         drivers         README.md  version.h.in

[root@localhost SOES-master]# mkdir build

[root@localhost SOES-master]# cd build

[root@localhost build]# cmake ..

bash: cmake: 未找到命令...

相似命令是: 'make'

 

[root@localhost build]# yum install cmake

已加载插件:fastestmirror, langpacks

base                                                     | 3.6 kB     00:00    

extras                                                   | 2.9 kB     00:00    

rabbitmq_erlang/x86_64/signature                         |  833 B     00:00    

rabbitmq_erlang/x86_64/signature                         | 1.0 kB     00:00 !!!

rabbitmq_erlang-source/signature                         |  819 B     00:00    

rabbitmq_erlang-source/signature                         |  951 B     00:00 !!!

updates                                                  | 2.9 kB     00:00    

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * extras: mirrors.163.com

 * updates: mirrors.163.com

正在解决依赖关系

--> 正在检查事务

---> 软件包 cmake.x86_64.0.2.8.12.2-2.el7 将被 安装

--> 解决依赖关系完成

 

依赖关系解决

 

================================================================================

 Package         架构             版本                     源              大小

================================================================================

正在安装:

 cmake           x86_64           2.8.12.2-2.el7           base           7.1 M

 

事务概要

================================================================================

安装  1 软件包

 

总下载量:7.1 M

安装大小:27 M

Is this ok [y/d/N]: y

Downloading packages:

cmake-2.8.12.2-2.el7.x86_64.rpm                            | 7.1 MB   00:00    

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  正在安装    : cmake-2.8.12.2-2.el7.x86_64                                 1/1

  验证中      : cmake-2.8.12.2-2.el7.x86_64                                 1/1

 

已安装:

  cmake.x86_64 0:2.8.12.2-2.el7                                                

 

完毕!

 

[root@localhost build]# cmake ..

-- The C compiler identification is GNU 4.8.5

-- The CXX compiler identification is GNU 4.8.5

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Building for Linux

-- Configuring done

-- Generating done

-- Build files have been written to: /root/SOES-master/build

 

[root@localhost build]# make

Scanning dependencies of target soes

[ 11%] Building C object soes/CMakeFiles/soes.dir/esc.c.o

[ 22%] Building C object soes/CMakeFiles/soes.dir/esc_coe.c.o

[ 33%] Building C object soes/CMakeFiles/soes.dir/esc_foe.c.o

[ 44%] Building C object soes/CMakeFiles/soes.dir/esc_eoe.c.o

[ 55%] Building C object soes/CMakeFiles/soes.dir/esc_eep.c.o

[ 66%] Building C object soes/CMakeFiles/soes.dir/ecat_slv.c.o

[ 77%] Building C object soes/CMakeFiles/soes.dir/hal/linux-lan9252/esc_hw.c.o

Linking C static library libsoes.a

[ 77%] Built target soes

Scanning dependencies of target demo

[ 88%] Building C object applications/linux_lan9252demo/CMakeFiles/demo.dir/main.c.o

[100%] Building C object applications/linux_lan9252demo/CMakeFiles/demo.dir/slave_objectlist.c.o

Linking C executable demo

[100%] Built target demo

[root@localhost build]#

 

[root@localhost linux_lan9252demo]# pwd

/root/SOES-master/build/applications/linux_lan9252demo

[root@localhost linux_lan9252demo]# ./demo

Hello Main

Hello Main

光标闪烁,从站准备好了。

        1. SOME for CentOS

在Windows 10上启动主站simple_test.exe,没有找到从站。

D:\DEV_TEST\SOEM-master\build\test\linux\simple_test>simple_test.exe \Device\NPF_{E3E2C91D-F671-447A-A2C9-211ACA26215D}

SOEM (Simple Open EtherCAT Master)

Simple test

Starting simple test

ec_init on \Device\NPF_{E3E2C91D-F671-447A-A2C9-211ACA26215D} succeeded.

No slaves found!

End simple test, close socket

End program

 

主站在Windows 10,从站在Windows 10的虚拟机的CentOS中,没有建立EtherCAT通讯。将主站也在CentOS中编译。

 

[root@localhost ~]# unzip SOEM-master.zip

Archive:  SOEM-master.zip

b5f58d2130b7e78d3506d76e5364d13d2530cf23

   creating: SOEM-master/

  inflating: SOEM-master/.gitattributes 

   creating: SOEM-master/.github/

   creating: SOEM-master/.github/workflows/

  inflating: SOEM-master/.github/workflows/build.yml 

  inflating: SOEM-master/.gitignore 

  inflating: SOEM-master/CMakeLists.txt 

  inflating: SOEM-master/ChangeLog  

  inflating: SOEM-master/Doxyfile   

  inflating: SOEM-master/LICENSE    

  inflating: SOEM-master/README.md  

   creating: SOEM-master/cmake/

   creating: SOEM-master/cmake/Modules/

   creating: SOEM-master/cmake/Modules/Platform/

  inflating: SOEM-master/cmake/Modules/Platform/rt-kernel-C.cmake 

  inflating: SOEM-master/cmake/Modules/Platform/rt-kernel-gcc-bfin.cmake 

  inflating: SOEM-master/cmake/Modules/Platform/rt-kernel-gcc-kinetis.cmake 

  inflating: SOEM-master/cmake/Modules/Platform/rt-kernel-gcc.cmake 

  inflating: SOEM-master/cmake/Modules/Platform/rt-kernel.cmake 

  inflating: SOEM-master/cmake/Modules/Platform/rtems.cmake 

   creating: SOEM-master/cmake/Toolchains/

  inflating: SOEM-master/cmake/Toolchains/rt-kernel-bfin.cmake 

  inflating: SOEM-master/cmake/Toolchains/rt-kernel-kinetis.cmake 

   creating: SOEM-master/doc/

   creating: SOEM-master/doc/images/

  inflating: SOEM-master/doc/images/legacy_iomap.png 

  inflating: SOEM-master/doc/images/memory_layout.png 

  inflating: SOEM-master/doc/images/overlapping_iomap.png 

  inflating: SOEM-master/doc/soem.dox 

  inflating: SOEM-master/doc/tutorial.txt 

  inflating: SOEM-master/drvcomment.txt 

   creating: SOEM-master/osal/

   creating: SOEM-master/osal/erika/

  inflating: SOEM-master/osal/erika/osal.c 

  inflating: SOEM-master/osal/erika/osal_defs.h 

   creating: SOEM-master/osal/intime/

  inflating: SOEM-master/osal/intime/osal.c 

  inflating: SOEM-master/osal/intime/osal_defs.h 

   creating: SOEM-master/osal/linux/

  inflating: SOEM-master/osal/linux/osal.c 

  inflating: SOEM-master/osal/linux/osal_defs.h 

   creating: SOEM-master/osal/macosx/

  inflating: SOEM-master/osal/macosx/osal.c 

  inflating: SOEM-master/osal/macosx/osal_defs.h 

  inflating: SOEM-master/osal/osal.h 

   creating: SOEM-master/osal/rtems/

  inflating: SOEM-master/osal/rtems/osal.c 

  inflating: SOEM-master/osal/rtems/osal_defs.h 

   creating: SOEM-master/osal/rtk/

  inflating: SOEM-master/osal/rtk/osal.c 

  inflating: SOEM-master/osal/rtk/osal_defs.h 

   creating: SOEM-master/osal/vxworks/

  inflating: SOEM-master/osal/vxworks/osal.c 

  inflating: SOEM-master/osal/vxworks/osal_defs.h 

   creating: SOEM-master/osal/win32/

  inflating: SOEM-master/osal/win32/inttypes.h 

  inflating: SOEM-master/osal/win32/osal.c 

  inflating: SOEM-master/osal/win32/osal_defs.h 

  inflating: SOEM-master/osal/win32/osal_win32.h 

  inflating: SOEM-master/osal/win32/stdint.h 

   creating: SOEM-master/oshw/

   creating: SOEM-master/oshw/erika/

  inflating: SOEM-master/oshw/erika/nicdrv.c 

  inflating: SOEM-master/oshw/erika/nicdrv.h 

  inflating: SOEM-master/oshw/erika/oshw.c 

  inflating: SOEM-master/oshw/erika/oshw.h 

   creating: SOEM-master/oshw/intime/

  inflating: SOEM-master/oshw/intime/nicdrv.c 

  inflating: SOEM-master/oshw/intime/nicdrv.h 

  inflating: SOEM-master/oshw/intime/oshw.c 

  inflating: SOEM-master/oshw/intime/oshw.h  

   creating: SOEM-master/oshw/linux/

  inflating: SOEM-master/oshw/linux/nicdrv.c 

  inflating: SOEM-master/oshw/linux/nicdrv.h 

  inflating: SOEM-master/oshw/linux/oshw.c 

  inflating: SOEM-master/oshw/linux/oshw.h 

   creating: SOEM-master/oshw/macosx/

  inflating: SOEM-master/oshw/macosx/nicdrv.c 

  inflating: SOEM-master/oshw/macosx/nicdrv.h 

  inflating: SOEM-master/oshw/macosx/oshw.c 

  inflating: SOEM-master/oshw/macosx/oshw.h 

   creating: SOEM-master/oshw/rtems/

  inflating: SOEM-master/oshw/rtems/nicdrv.c 

  inflating: SOEM-master/oshw/rtems/nicdrv.h 

  inflating: SOEM-master/oshw/rtems/oshw.c 

  inflating: SOEM-master/oshw/rtems/oshw.h 

   creating: SOEM-master/oshw/rtk/

   creating: SOEM-master/oshw/rtk/fec/

  inflating: SOEM-master/oshw/rtk/fec/fec_ecat.c 

  inflating: SOEM-master/oshw/rtk/fec/fec_ecat.h 

   creating: SOEM-master/oshw/rtk/lw_mac/

  inflating: SOEM-master/oshw/rtk/lw_mac/lw_emac.c 

  inflating: SOEM-master/oshw/rtk/lw_mac/lw_emac.h 

  inflating: SOEM-master/oshw/rtk/nicdrv.c 

  inflating: SOEM-master/oshw/rtk/nicdrv.h 

  inflating: SOEM-master/oshw/rtk/oshw.c 

  inflating: SOEM-master/oshw/rtk/oshw.h 

   creating: SOEM-master/oshw/vxworks/

  inflating: SOEM-master/oshw/vxworks/nicdrv.c 

  inflating: SOEM-master/oshw/vxworks/nicdrv.h 

  inflating: SOEM-master/oshw/vxworks/oshw.c 

  inflating: SOEM-master/oshw/vxworks/oshw.h 

   creating: SOEM-master/oshw/win32/

  inflating: SOEM-master/oshw/win32/nicdrv.c 

  inflating: SOEM-master/oshw/win32/nicdrv.h 

  inflating: SOEM-master/oshw/win32/oshw.c 

  inflating: SOEM-master/oshw/win32/oshw.h 

   creating: SOEM-master/oshw/win32/wpcap/

   creating: SOEM-master/oshw/win32/wpcap/Include/

  inflating: SOEM-master/oshw/win32/wpcap/Include/Packet32.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/Win32-Extensions.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/bittypes.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/ip6_misc.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap-bpf.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap-namedb.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap-stdinc.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap.h 

   creating: SOEM-master/oshw/win32/wpcap/Include/pcap/

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/bluetooth.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/bpf.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/namedb.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/pcap.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/sll.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/usb.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/pcap/vlan.h 

  inflating: SOEM-master/oshw/win32/wpcap/Include/remote-ext.h 

   creating: SOEM-master/oshw/win32/wpcap/Lib/

  inflating: SOEM-master/oshw/win32/wpcap/Lib/Packet.lib 

  inflating: SOEM-master/oshw/win32/wpcap/Lib/libpacket.a 

  inflating: SOEM-master/oshw/win32/wpcap/Lib/libwpcap.a 

  inflating: SOEM-master/oshw/win32/wpcap/Lib/wpcap.lib 

   creating: SOEM-master/oshw/win32/wpcap/Lib/x64/

  inflating: SOEM-master/oshw/win32/wpcap/Lib/x64/Packet.lib 

  inflating: SOEM-master/oshw/win32/wpcap/Lib/x64/wpcap.lib 

   creating: SOEM-master/soem/

  inflating: SOEM-master/soem/ethercat.h 

  inflating: SOEM-master/soem/ethercatbase.c 

  inflating: SOEM-master/soem/ethercatbase.h 

  inflating: SOEM-master/soem/ethercatcoe.c 

  inflating: SOEM-master/soem/ethercatcoe.h 

  inflating: SOEM-master/soem/ethercatconfig.c 

  inflating: SOEM-master/soem/ethercatconfig.h 

  inflating: SOEM-master/soem/ethercatconfiglist.h 

  inflating: SOEM-master/soem/ethercatdc.c 

  inflating: SOEM-master/soem/ethercatdc.h 

  inflating: SOEM-master/soem/ethercateoe.c 

  inflating: SOEM-master/soem/ethercateoe.h 

  inflating: SOEM-master/soem/ethercatfoe.c 

  inflating: SOEM-master/soem/ethercatfoe.h 

  inflating: SOEM-master/soem/ethercatmain.c 

  inflating: SOEM-master/soem/ethercatmain.h 

  inflating: SOEM-master/soem/ethercatprint.c 

  inflating: SOEM-master/soem/ethercatprint.h 

  inflating: SOEM-master/soem/ethercatsoe.c 

  inflating: SOEM-master/soem/ethercatsoe.h 

  inflating: SOEM-master/soem/ethercattype.h 

   creating: SOEM-master/test/

   creating: SOEM-master/test/intime/

   creating: SOEM-master/test/intime/ec_master/

  inflating: SOEM-master/test/intime/ec_master/ec_master.c 

   creating: SOEM-master/test/linux/

  inflating: SOEM-master/test/linux/aliastool.c 

   creating: SOEM-master/test/linux/ebox/

  inflating: SOEM-master/test/linux/ebox/ebox.c 

   creating: SOEM-master/test/linux/eepromtool/

  inflating: SOEM-master/test/linux/eepromtool/CMakeLists.txt 

  inflating: SOEM-master/test/linux/eepromtool/eepromtool.c 

   creating: SOEM-master/test/linux/eoe_test/

  inflating: SOEM-master/test/linux/eoe_test/eoe_test.c 

   creating: SOEM-master/test/linux/firm_update/

  inflating: SOEM-master/test/linux/firm_update/firm_update.c 

   creating: SOEM-master/test/linux/red_test/

  inflating: SOEM-master/test/linux/red_test/red_test.c 

   creating: SOEM-master/test/linux/simple_test/

  inflating: SOEM-master/test/linux/simple_test/CMakeLists.txt 

  inflating: SOEM-master/test/linux/simple_test/simple_test.c 

   creating: SOEM-master/test/linux/slaveinfo/

  inflating: SOEM-master/test/linux/slaveinfo/CMakeLists.txt 

  inflating: SOEM-master/test/linux/slaveinfo/slaveinfo.c 

   creating: SOEM-master/test/rtk/

  inflating: SOEM-master/test/rtk/main.c 

  inflating: SOEM-master/test/rtk/schedule.tt 

   creating: SOEM-master/test/win32/

   creating: SOEM-master/test/win32/ebox/

  inflating: SOEM-master/test/win32/ebox/ebox.c 

   creating: SOEM-master/test/win32/eepromtool/

  inflating: SOEM-master/test/win32/eepromtool/eepromtool.c 

   creating: SOEM-master/test/win32/firm_update/

  inflating: SOEM-master/test/win32/firm_update/firm_update.c 

   creating: SOEM-master/test/win32/red_test/

  inflating: SOEM-master/test/win32/red_test/red_test.c 

   creating: SOEM-master/test/win32/simple_test/

  inflating: SOEM-master/test/win32/simple_test/simple_test.c 

   creating: SOEM-master/test/win32/slaveinfo/

  inflating: SOEM-master/test/win32/slaveinfo/slaveinfo.c 

[root@localhost ~]# cd SOEM-master/

[root@localhost SOEM-master]# mkdir build

[root@localhost SOEM-master]# cd build

[root@localhost build]# make ..

make: 对“..”无需做任何事。

[root@localhost build]# cmake ..

CMake Error at CMakeLists.txt:3 (cmake_policy):

  Policy "CMP0048" is not known to this version of CMake.

 

 

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_DESCRIPTION_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_DESCRIPTION_COMPILER

CMake Error: Could not find cmake module file: /root/SOEM-master/build/CMakeFiles/2.8.12.2/CMakeDESCRIPTIONCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_Simple Open EtherCAT Master_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_Simple Open EtherCAT Master_COMPILER

CMake Error: Could not find cmake module file: /root/SOEM-master/build/CMakeFiles/2.8.12.2/CMakeSimple Open EtherCAT MasterCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_VERSION_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_VERSION_COMPILER

CMake Error: Could not find cmake module file: /root/SOEM-master/build/CMakeFiles/2.8.12.2/CMakeVERSIONCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_1.4.0_COMPILER_ENV_VAR

 

编译出现问题,查到:

CMP0048

The project() command manages VERSION variables.

 

CMake version 3.0 introduced the VERSION option of the project() command to specify a project version as well as the name. In order to keep PROJECT_VERSION and related variables consistent with variable PROJECT_NAME it is necessary to set the VERSION variables to the empty string when no VERSION is given to project(). However, this can change behavior for existing projects that set VERSION variables themselves since project() may now clear them. This policy controls the behavior for compatibility with such projects.

 

The OLD behavior for this policy is to leave VERSION variables untouched. The NEW behavior for this policy is to set VERSION as documented by the project() command.

 

This policy was introduced in CMake version 3.0. CMake version 3.0.2 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.

 

可见cmake的版本不只是脚本文件中提到的2.8.12。至少需要3.0以上的版本。确认在Windows下编译的cmake版本是3.20.0。说明文档及脚本文件没有更新。

 

拟从官网上下载安装cmake 3.20.0,先删除老版本,再安装新版本:

[root@localhost build]# yum remove cmake

已加载插件:fastestmirror, langpacks

正在解决依赖关系

--> 正在检查事务

---> 软件包 cmake.x86_64.0.2.8.12.2-2.el7 将被 删除

--> 解决依赖关系完成

rabbitmq_erlang/x86_64/signature                         |  833 B     00:00    

rabbitmq_erlang/x86_64/signature                         | 1.0 kB     00:00 !!!

rabbitmq_erlang-source/signature                         |  819 B     00:00    

rabbitmq_erlang-source/signature                         |  951 B     00:00 !!!

 

依赖关系解决

 

================================================================================

 Package        架构            版本                       源              大小

================================================================================

正在删除:

 cmake          x86_64          2.8.12.2-2.el7             @base           27 M

 

事务概要

================================================================================

移除  1 软件包

 

安装大小:27 M

是否继续?[y/N]:y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  正在删除    : cmake-2.8.12.2-2.el7.x86_64                                 1/1

  验证中      : cmake-2.8.12.2-2.el7.x86_64                                 1/1

 

删除:

  cmake.x86_64 0:2.8.12.2-2.el7                                                 

 

完毕!

[root@localhost build]# wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-x86_64.sh

--2021-03-31 22:02:48--  https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-x86_64.sh

正在解析主机 github.com (github.com)... 13.250.177.223

正在连接 github.com (github.com)|13.250.177.223|:443... 已连接。

已发出 HTTP 请求,正在等待回应... 302 Found

位置:https://github-releases.githubusercontent.com/537699/174bb880-8bd7-11eb-8627-928a55f649fa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210331%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210331T140250Z&X-Amz-Expires=300&X-Amz-Signature=1fecefc276d0b31de6a790a8766a6da3c0a3a89ba51714c0e354a42a928266e2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=537699&response-content-disposition=attachment%3B%20filename%3Dcmake-3.20.0-linux-x86_64.sh&response-content-type=application%2Foctet-stream [跟随至新的 URL]

--2021-03-31 22:02:55--  https://github-releases.githubusercontent.com/537699/174bb880-8bd7-11eb-8627-928a55f649fa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210331%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210331T140250Z&X-Amz-Expires=300&X-Amz-Signature=1fecefc276d0b31de6a790a8766a6da3c0a3a89ba51714c0e354a42a928266e2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=537699&response-content-disposition=attachment%3B%20filename%3Dcmake-3.20.0-linux-x86_64.sh&response-content-type=application%2Foctet-stream

正在解析主机 github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.110.154, 185.199.108.154, 185.199.111.154, ...

正在连接 github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.110.154|:443... 已连接。

已发出 HTTP 请求,正在等待回应... 200 OK

长度:43851261 (42M) [application/octet-stream]

正在保存至: “cmake-3.20.0-linux-x86_64.sh”

 

 7% [=>                                     ] 3,240,224   11.2KB/s 剩余 49m 11s^

 

下载速度太慢,从外部下载好之后,拷贝到CentOS

[root@localhost build]# cd ~

[root@localhost ~]# ./cmake-3.20.0-linux-x86_64.sh

CMake Installer Version: 3.20.0, Copyright (c) Kitware

This is a self-extracting archive.

The archive will be extracted to: /root

 

If you want to stop extracting, please press .

CMake - Cross Platform Makefile Generator

Copyright 2000-2021 Kitware, Inc. and Contributors

All rights reserved.

 

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions

are met:

 

* Redistributions of source code must retain the above copyright

  notice, this list of conditions and the following disclaimer.

 

* Redistributions in binary form must reproduce the above copyright

  notice, this list of conditions and the following disclaimer in the

  documentation and/or other materials provided with the distribution.

 

* Neither the name of Kitware, Inc. nor the names of Contributors

  may be used to endorse or promote products derived from this

  software without specific prior written permission.

 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 

------------------------------------------------------------------------------

 

The following individuals and institutions are among the Contributors:

 

* Aaron C. Meadows

* Adriaan de Groot

* Aleksey Avdeev

* Alexander Neundorf

* Alexander Smorkalov

* Alexey Sokolov

* Alex Merry

* Alex Turbov

* Andreas Pakulat

* Andreas Schneider

* André Rigland Brodtkorb

* Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf

* Benjamin Eikel

* Bjoern Ricks

* Brad Hards

* Christopher Harvey

* Christoph Grüninger

* Clement Creusot

* Daniel Blezek

* Daniel Pfeifer

* Enrico Scholz

* Eran Ifrah

* Esben Mose Hansen, Ange Optimization ApS

* Geoffrey Viola

* Google Inc

* Gregor Jasny

* Helio Chissini de Castro

* Ilya Lavrenov

* Insight Software Consortium

* Jan Woetzel

* Julien Schueller

* Kelly Thompson

* Konstantin Podsvirov

* Laurent Montel

* Mario Bensi

* Martin Gräßlin

* Mathieu Malaterre

* Matthaeus G. Chajdas

* Matthias Kretz

* Matthias Maennich

* Michael Hirsch, Ph.D.

* Michael Stürmer

* Miguel A. Figueroa-Villanueva

* Mike Jackson

* Mike McQuaid

* Nicolas Bock

* Nicolas Despres

* Nikita Krupen'ko

* NVIDIA Corporation

* OpenGamma Ltd.

* Patrick Stotko

* Per Øyvind Karlsen

* Peter Collingbourne

* Petr Gotthard

* Philip Lowman

* Philippe Proulx

* Raffi Enficiaud, Max Planck Society

* Raumfeld

* Roger Leigh

* Rolf Eike Beer

* Roman Donchenko

* Roman Kharitonov

* Ruslan Baratov

* Sebastian Holtermann

* Stephen Kelly

* Sylvain Joubert

* The Qt Company Ltd.

* Thomas Sondergaard

* Tobias Hunger

* Todd Gamblin

* Tristan Carel

* University of Dundee

* Vadim Zhukov

* Will Dicharry

 

See version control history for details of individual contributions.

 

The above copyright and license notice applies to distributions of

CMake in source and binary form.  Third-party software packages supplied

with CMake under compatible licenses provide their own copyright notices

documented in corresponding subdirectories or source files.

 

------------------------------------------------------------------------------

 

CMake was initially developed by Kitware with the following sponsorship:

 

 * National Library of Medicine at the National Institutes of Health

   as part of the Insight Segmentation and Registration Toolkit (ITK).

 

 * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel

   Visualization Initiative.

 

 * National Alliance for Medical Image Computing (NAMIC) is funded by the

   National Institutes of Health through the NIH Roadmap for Medical Research,

   Grant U54 EB005149.

 

 * Kitware, Inc.

 

 

Do you accept the license? [yn]:

y

By default the CMake will be installed in:

  "/root/cmake-3.20.0-linux-x86_64"

Do you want to include the subdirectory cmake-3.20.0-linux-x86_64?

Saying no will install in: "/root" [Yn]:

y

 

Using target directory: /root/cmake-3.20.0-linux-x86_64

Extracting, please wait...

 

Unpacking finished successfully

[root@localhost ~]# cmake

bash: /usr/bin/cmake: 没有那个文件或目录

[root@localhost ~]# ls cmake*

cmake-3.20.0-linux-x86_64.sh

 

cmake-3.20.0-linux-x86_64:

bin  doc  man  share

[root@localhost ~]# cd SOEM-master/

[root@localhost SOEM-master]# cd build

[root@localhost build]# /root/cmake-3.20.0-linux-x86_64/bin/cmake ..

-- The C compiler identification is GNU 4.8.5

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /usr/bin/cc - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- OS is linux

-- LIB_DIR: lib

-- Configuring done

-- Generating done

-- Build files have been written to: /root/SOEM-master/build

[root@localhost build]# make

[  5%] Building C object CMakeFiles/soem.dir/soem/ethercatbase.c.o

[ 10%] Building C object CMakeFiles/soem.dir/soem/ethercatcoe.c.o

[ 15%] Building C object CMakeFiles/soem.dir/soem/ethercatconfig.c.o

[ 21%] Building C object CMakeFiles/soem.dir/soem/ethercatdc.c.o

[ 26%] Building C object CMakeFiles/soem.dir/soem/ethercateoe.c.o

[ 31%] Building C object CMakeFiles/soem.dir/soem/ethercatfoe.c.o

[ 36%] Building C object CMakeFiles/soem.dir/soem/ethercatmain.c.o

[ 42%] Building C object CMakeFiles/soem.dir/soem/ethercatprint.c.o

[ 47%] Building C object CMakeFiles/soem.dir/soem/ethercatsoe.c.o

[ 52%] Building C object CMakeFiles/soem.dir/osal/linux/osal.c.o

[ 57%] Building C object CMakeFiles/soem.dir/oshw/linux/nicdrv.c.o

[ 63%] Building C object CMakeFiles/soem.dir/oshw/linux/oshw.c.o

[ 68%] Linking C static library libsoem.a

[ 68%] Built target soem

[ 73%] Building C object test/linux/slaveinfo/CMakeFiles/slaveinfo.dir/slaveinfo.c.o

[ 78%] Linking C executable slaveinfo

[ 78%] Built target slaveinfo

[ 84%] Building C object test/linux/eepromtool/CMakeFiles/eepromtool.dir/eepromtool.c.o

[ 89%] Linking C executable eepromtool

[ 89%] Built target eepromtool

[ 94%] Building C object test/linux/simple_test/CMakeFiles/simple_test.dir/simple_test.c.o

[100%] Linking C executable simple_test

[100%] Built target simple_test

[root@localhost build]#

编译成功

 

揭晓LAN9252:

Open EtherCAT Society——SOEM、SOES_第2张图片

 

Open EtherCAT Society——SOEM、SOES_第3张图片

 

 

Open EtherCAT Society——SOEM、SOES_第4张图片

 

 

你可能感兴趣的:(IoT)