Hi, the RTEMS integration has been merged upstream so the final patch for 4.11 is attached.
It has been tested using qemu v2.10 using the xilinx_zynq_a9_qemu bsp and some beckhoff slaves (EK1100, EL1004, EL2004). In the following days I will post the code to run the slaveinfo example on RTEMS (simple program that queries the slaves for their properties that is originally provided by SOEM) along with step to step instructions on how to achieve that result. Unfortunately for testing real hardware is required. Cheers, Niko
diff --git a/rtems/config/4.11/net/soem.bset b/rtems/config/4.11/net/soem.bset new file mode 100644 index 0000000..6934991 --- /dev/null +++ b/rtems/config/4.11/net/soem.bset @@ -0,0 +1,20 @@ +# +# Build set for EtherCAT SOEM +# + +%define release 1 + +# +# RTEMS Version +# +%define rtems_version 4.11 + +# +# The RTEMS URL paths. +# +%include rtems-urls.bset + +# +# Build SOEM. +# +net/soem diff --git a/rtems/config/net/soem.cfg b/rtems/config/net/soem.cfg new file mode 100644 index 0000000..e1b5b1e --- /dev/null +++ b/rtems/config/net/soem.cfg @@ -0,0 +1,22 @@ +# +# SOEM +# + +%if %{release} == %{nil} + %define release 1 +%endif + +%include %{_configdir}/rtems-bsp.cfg + +# +# SOEM Version +# + +# +# Patch for RTEMS support. +# + +# +# SOEM Build configuration +# +%include %{_configdir}/soem.cfg diff --git a/source-builder/config/soem.cfg b/source-builder/config/soem.cfg new file mode 100644 index 0000000..d524341 --- /dev/null +++ b/source-builder/config/soem.cfg @@ -0,0 +1,70 @@ +# +# SOEM Version 1. +# +# This configuration file configures, makes and installs SOEM. +# + +%if %{release} == %{nil} +%define release 1 +%endif + +Name: soem-%{_host}-%{release} +Summary: SOEM is a Simple Open EtherCAT Master implementation. +Version: Master +Release: %{release} +URL: https://openethercatsociety.github.io/ +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) + +# +# SOEM +# +%source set soem git://github.com/OpenEtherCATsociety/SOEM.git?branch=master + +# +# Prepare the source code. +# +%prep + build_top=$(pwd) + + source_dir_soem="soem" + %source setup soem -q -n soem + + cd ${build_top} + echo ${build_top} + +%build + build_top=$(pwd) + + %{build_directory} + + mkdir -p ${build_dir} + cd ${build_dir} + + %{host_build_flags} + + cmake \ + -DRTEMS_TOOLS_PATH=%{with_tools} \ + -DCMAKE_INSTALL_PREFIX=%{_libdir} \ + -DCMAKE_SYSTEM_NAME=rtems \ + -DHOST=%{_host} \ + -DRTEMS_BSP=%{rtems_bsp} \ + -DINCLUDE_DIR=%{_includedir} \ + -DLIB_DIR=%{_libdir} \ + -DHOST_C_FLAGS=%{host_cflags} \ + -DHOST_CXX_FLAGS=%{host_cxxflags} \ + -DHOST_LIBS=%{host_libs} \ + ../${source_dir_soem} + + # SOEM does not build on sync.rtems.org with jobs + %{__make} %{?_smp_mflags} all + + cd ${build_top} + +%install + build_top=$(pwd) + + %{__rmdir} $SB_BUILD_ROOT + + cd ${build_dir} + %{__make} DESTDIR=$SB_BUILD_ROOT install + cd ${build_top}
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel