《针对libevl的posix和EtherCAT生态构建.pdf》由会员分享,可在线阅读,更多相关《针对libevl的posix和EtherCAT生态构建.pdf(28页珍藏版)》请在三个皮匠报告上搜索。
1、针对evl的posix和ethercat生态构建Building the Ecosystem of POSIX and EtherCAT for libevl1邱奇琛 RROS group 北京邮电大学2024.11.26Agenda2024/11/262POSIX wrapperIntroductionXenomai ImplementationOur worksKey ChallengesEtherCATOverviewIgH Ethercat and XenomaiPorting to EVL Why we need a POSIX wrapper in evl4?2024/11/263
2、 The current EVL API(libevl)is simple,elegant,and well-documented,but Not fully compatible with POSIX API.Some usages may differ for users accustomed to vanilla Linux.e.g:attach_thread,timer,signal,etc.Facilitating the smooth migration of Xenomai3 applications to EVL.Xenomai2&3 already includes a PO
3、SIX wrapper.Some users may want to transport it to EVL newer version of Linux kernel Better SMP support Support native OOB network stack,ebpf,valgrind etcPrevious works Xenomai 2&32024/11/264 Both Xenomai 2&3 have a POSIX wrapper.The wrapper uses the compilers-wrap mechanism to reassign symbols duri
4、ng linking.In Xenomai 2,the POSIX wrapper is based on the native API.In Xenomai 3,libcobalt serves as the native API.Since we already have the libevl,the situation is more similar to Xenomai2Nativeboilerplateposixpsos+vxworksItronrtdmuapiXenomai 2Cobalt(POSIX+extension)alchemypsosvxworksboilerplater
5、tdmuapiXenomai 3Agenda2024/11/265POSIX wrapperIntroductionXenomai ImplementationOur worksKey ChallengesEtherCATOverviewIgH Ethercat and XenomaiPorting to EVL Internal of Xenomai wrapperlinking2024/11/266 The C/C+compiler provides the-wrap option-Wl,/usr/xenomai/lib/cobalt.wrappers It redirects all r
6、eferences to foo to _wrap_foo,while mapping the original foo symbol to _real_foo.By implementing a custom _wrap_foo,users interact with the custom wrapper function instead of the original foo.Xenomai offers specific macros to simplify managing these wrapper functions:Internal of Xenomai wrapperlinki