在终端中进入该路径,安装一下Cmake: 添加编译工具: 新建文件build_mp135输入cmake.. 然后输入make: Scanning dependencies of target soem [ 4%] Building C object CMakeFiles/soem.dir/soem/ethercatbase.c.o [ 9%] Building C object CMakeFiles/soem.dir/soem/ethercatcoe.c.o [ 14%] Building C objectCMakeFiles/soem.dir/soem/ethercatconfig.c.o [ 19%] Building C objectCMakeFiles/soem.dir/soem/ethercatdc.c.o [ 23%] Building C object CMakeFiles/soem.dir/soem/ethercateoe.c.o [ 28%] Building C objectCMakeFiles/soem.dir/soem/ethercatfoe.c.o [ 33%] Building C objectCMakeFiles/soem.dir/soem/ethercatmain.c.o [ 38%] Building C objectCMakeFiles/soem.dir/soem/ethercatprint.c.o [ 42%] Building C object CMakeFiles/soem.dir/soem/ethercatsoe.c.o [ 47%] Building C objectCMakeFiles/soem.dir/osal/linux/osal.c.o [ 52%] Building C objectCMakeFiles/soem.dir/oshw/linux/nicdrv.c.o [ 57%] Building C objectCMakeFiles/soem.dir/oshw/linux/oshw.c.o [ 61%] Linking C static library libsoem.a [ 61%] Built target soem Scanning dependencies of target simple_ng [ 66%] Building C objecttest/simple_ng/CMakeFiles/simple_ng.dir/simple_ng.c.o [ 71%] Linking C executable simple_ng [ 71%] Built target simple_ng Scanning dependencies of target slaveinfo [ 76%] Building C objecttest/linux/slaveinfo/CMakeFiles/slaveinfo.dir/slaveinfo.c.o [ 80%] Linking C executable slaveinfo [ 80%] Built target slaveinfo Scanning dependencies of target eepromtool [ 85%] Building C objecttest/linux/eepromtool/CMakeFiles/eepromtool.dir/eepromtool.c.o [ 90%] Linking C executable eepromtool [ 90%] Built target eepromtool Scanning dependencies of target simple_test [ 95%] Building C objecttest/linux/simple_test/CMakeFiles/simple_test.dir/simple_test.c.o [100%] Linking C executable simple_test [100%] Built target simple_test 打开MobaXterm,通过SSH连接到开发板,手动设置: SSH与开发连接: 将编译的文件放到开发板的/mnt/d路径下,如下所示: 添加运行权限: 运行:
|