Contents ...
udn網路城邦
TI am5718 with IgH etherCAT master with NEXTW_16IO BOARD
2020/09/24 17:25
瀏覽138
迴響0
推薦0
引用0

ubuntu14

./configure --with-linux-dir=/usr/src/linux-headers-4.13.0-36-generic --disable-8139too
make
sudo make install

make modules
sudo make modules_install

//---Get MAC form interface ID

cat /sys/bus/pci/devices/0000\:02\:00.0/net/enp2s0/address
74:d0:2b:c8:32:6e

//---

飛凌am5718

訊成NEXTW_16IO BOARD (Digital 16-Input/16-Output)

下載IgH for linux kernel version 4.x

cross compile 

./bootstrap
./configure --with-linux-dir=/home/gcat/0907/OK5718-SDK-V1.0/OK57xx-linux-kernel --disable-8139too --host=arm-linux-gnueabihf

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules

產出

ec_master.ko

ec_generic.ko

ethercat

手動啟動IgH

insmod ~/ecat/ec_master.ko main-devices=FC:69:47:51:43:F9 backup_devices=

insmod ~/ecat/ec_generic.ko

編寫軟體

igh_nextw_io.c

參考

etherlabmaster-code/examples/user/main.c

ecrt.h

libethercat.a

拷貝到igh_next_io.c同路徑

arm-linux-gnueabihf-gcc -o igh_nextw_io.out igh_next_io.o  libethercat.a

全站分類:不分類 不分類
自訂分類:linux
上一則: Basic tutorial - cross compile
下一則: ubuntu 16 nfs

限會員,要發表迴響,請先登入