<div dir="ltr">Hi Chris,<div><br></div><div>minor update on the progress.</div><div><br></div><div>I managed to start the compilation correctly on Friday. Of course it fails as the source needs to be modified.</div><div><br></div><div>On that front I haven't heard back from people responsible for the ethernet driver and if libbsd is in their scope.</div><div><br></div><div>In general which are the options? Libbsd and standard RTEMS networking stack? I will try to evaluate both and have something compiling by Friday hopefully, so I can test and create the patches.</div><div><br></div><div>Cheers,</div><div>Niko</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 5:40 PM, Nicolas Tsiogkas <span dir="ltr"><<a href="mailto:lou.nick@gmail.com" target="_blank">lou.nick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Chris for your input.<div><br></div><div>I think I've used a cmake gui once in 2008 or 2009 and never did that to myself again. :P</div><div><br></div><div>I started creating the required cmake extensions for SOEM. I hope to have something trying to compile by monday sometime. I'll keep you posted.</div><div><br></div><div>Cheers,</div><div>Niko</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 3:57 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 06/09/2017 19:56, Nicolas Tsiogkas wrote:<br>
> I'm trying to integrate SOEM with RTEMS (<a href="https://devel.rtems.org/ticket/3120" rel="noreferrer" target="_blank">https://devel.rtems.org/ticke<wbr>t/3120</a><br>
</span>> <<a href="https://devel.rtems.org/ticket/3120" rel="noreferrer" target="_blank">https://devel.rtems.org/ticke<wbr>t/3120</a>>)<br>
<br>
Thank you for creating the ticket.<br>
<span><br>
> As I am trying to create the appropriate bset and cfg files I noticed that all<br>
> the packages built are based on autoconf to be built.<br>
<br>
</span>This reflects the nature of the packages we currently support and nothing more.<br>
<span><br>
> SOEM on the other hand is only providing CMake as a build tool.<br>
<br>
</span>This should be fine if the implementation in SOEM is ok.<br>
<span><br>
> I have found instructions on using CMake with RTEMS<br>
> (<a href="https://lists.rtems.org/pipermail/devel/2016-March/013800.html" rel="noreferrer" target="_blank">https://lists.rtems.org/piper<wbr>mail/devel/2016-March/013800.<wbr>html</a>)<br>
><br>
> The question is if it would be more sensible to create a build environment for<br>
> SOEM based on autotools or try to use CMake somehow?<br>
<br>
</span>I do not think there is a need. The upstream project has selected cmake and we<br>
should respect that.<br>
<span><br>
> I doubt that changing the build system will be easily accepted upstream.<br>
<br>
</span>Agreed.<br>
<br>
The RSB scripts will invoke cmake so this bit is easy. The part you need to work<br>
with the upstream project is getting a cross-complier build to work. How well<br>
this works depends on how the cmake build scripts in the project are<br>
implemented. Carefully constructed cmake build scripts and the judicious use of<br>
the command line `-D` options can be used to configure and/or build the package.<br>
<br>
I should warn you, use the cmake gui and tui tool at your own risk, if you step<br>
in there you may never return as the same person.<br>
<br>
The key file in the RSB is rtems-bsp.cfg [1]. It wraps a private package config<br>
implementation that parses an installed BSP's build configuration [2] and<br>
updates the internal RSB data [3].<br>
<br>
I suggest you get the package to build from the command line for a BSP. This<br>
will be the compiler name and cflags. What you end up with will be available in<br>
the macros in rtems-bsp.cfg.<br>
<br>
Have a look in the BSP installed .pc file for the flags to use, ie do a `find .<br>
-name \*.pc` from the RTEMS installed prefix path.<br>
<br>
My (publicly denied) cmake experience with RTEMS is configure header tests can<br>
be fragile if there is cmake nesting.<br>
<br>
Chris<br>
<br>
[1] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg</a><br>
[2] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg#n64" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg#n64</a><br>
[3] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg#n81" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg#n81</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>