[etherlab-users] Cross compilation of EtherCAT master for Xenomai

Asier Tamayo asier.tamayo at onaedm.com
Thu Nov 14 13:31:44 CET 2013


Hello all,

First of all, I must thank the whole IgH team for their great work on the EtherCAT master. I've cross compiled it for Xenomai. It's running smoothly and with very good latency times. I'm using the e100 driver.

However, I've found some problems during its compilation and the execution of the Xenomai test:

export host_alias=$ELINOS_BIN_PREFIX
cd /users/aplicaci/elinos52/xenomai/src/ethercat-1.5.2
./configure --build=i486-pc-linux-gnu --host=x86-linux --enable-generic=no --enable-8139too=no --enable-e100 --with-e100-kernel=2.6.34 --enable-rtdm --with-xenomai-dir=/users/aplicaci/elinos52/xenomai/xenomai-2.6.34/xenomai-build/usr/realtime --with-linux-dir=/users/aplicaci/elinos52/xenomai/linux
make
make modules

This doesn't create the Xenomai examples. How can I cross compile them? Finally, I've created a Makefile and compiled it, but I'd like to know how to do it from the original sources.

Besides, at first, the Xenomai test gave a System state exception when executing ecrt_domain_state(). The problem was that copy_to_user() and copy_from_user() in ec_ioctl_domain_state() were being called in primary mode. After changing all the copy_*_user(...) to rtdm_copy_*_user(NULL,...) in rtdm-ioctl.c (and adding #include <rtdm.h>), the Xenomai demo now runs without context switching.

However, there are still some calls to __copy_to_user() which I don't dare to change. Can they be substituted with rtdm_copy_to_user()?

Best regards,

Asier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20131114/9e9ccd23/attachment-0002.htm>


More information about the Etherlab-users mailing list