<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="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 class="">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/<wbr>ticket/3120</a><br>
</span>> <<a href="https://devel.rtems.org/ticket/3120" rel="noreferrer" target="_blank">https://devel.rtems.org/<wbr>ticket/3120</a>>)<br>
<br>
Thank you for creating the ticket.<br>
<span class=""><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 class=""><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 class=""><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/<wbr>pipermail/devel/2016-March/<wbr>013800.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 class=""><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-<wbr>source-builder/tree/rtems/<wbr>config/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-<wbr>source-builder/tree/rtems/<wbr>config/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-<wbr>source-builder/tree/rtems/<wbr>config/rtems-bsp.cfg#n81</a><br>
</blockquote></div><br></div>