Platform dSPACE

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Platform dSPACE

Robin Verschueren
Dear CMake,

We are trying to build our application for the dSPACE embedded system
(www.dspace.com), more specifically their MicroAutobox-II. This makes
use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).

I was following the instructions on this wiki page, when I got the following warning, 
when trying to use a custom 'Toolchain' file:

System is unknown to cmake, create:

Platform/dSPACE to use this system, please send your config file to 

[hidden email] so it can be added to cmake


We would be glad to send it to you when it is finished, but in the meantime,
we cannot debug our toolchain file because of above warning.

Is there a way of including it without having to include it in the official CMake
distribution? I tried setting CMAKE_MODULE_PATH but that did not help..


Best regards,
Robin

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Martin Weber-2
Am Freitag, 23. Juni 2017, 19:47:32 CEST schrieb Robin Verschueren:

> Dear CMake,
>
> We are trying to build our application for the dSPACE embedded system
> (www.dspace.com), more specifically their MicroAutobox-II. This makes
> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>
> I was following the instructions on this wiki page
> <https://cmake.org/Wiki/CMake_Cross_Compiling>, when I got the following
> warning,
> when trying to use a custom 'Toolchain' file:

Sounds like you will have to create a custom toolchain file.
Maybe this will help:
<https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#id10>

Martin
--
Cd wrttn wtht vwls s mch trsr.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Robin Verschueren
Dear Martin,

That's exactly what I'm doing. The trouble is that I want to use
set(CMAKE_SYSTEM_NAME dSPACE)
or something similar. But then I get this warning that `dSPACE.cmake'
is not found in the `Platform' folder. My question was how to circumvent
this.

Best regards,
Robin

On Fri, 23 Jun 2017 at 12:56 Martin Weber <[hidden email]> wrote:
Am Freitag, 23. Juni 2017, 19:47:32 CEST schrieb Robin Verschueren:
> Dear CMake,
>
> We are trying to build our application for the dSPACE embedded system
> (www.dspace.com), more specifically their MicroAutobox-II. This makes
> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>
> I was following the instructions on this wiki page
> <https://cmake.org/Wiki/CMake_Cross_Compiling>, when I got the following
> warning,
> when trying to use a custom 'Toolchain' file:

Sounds like you will have to create a custom toolchain file.
Maybe this will help:
<https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#id10>

Martin
--
Cd wrttn wtht vwls s mch trsr.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Michael Ellery
In reply to this post by Robin Verschueren

> On Jun 23, 2017, at 12:47 PM, Robin Verschueren <[hidden email]> wrote:
>
> Dear CMake,
>
> We are trying to build our application for the dSPACE embedded system
> (www.dspace.com), more specifically their MicroAutobox-II. This makes
> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>
> I was following the instructions on this wiki page, when I got the following warning,
> when trying to use a custom 'Toolchain' file:
>
> System is unknown to cmake, create:
> Platform/dSPACE to use this system, please send your config file to
> [hidden email] so it can be added to cmake
>
> We would be glad to send it to you when it is finished, but in the meantime,
> we cannot debug our toolchain file because of above warning.
>
> Is there a way of including it without having to include it in the official CMake
> distribution? I tried setting CMAKE_MODULE_PATH but that did not help..
>
>
> Best regards,
> Robin
> --

what happens if you set    -DCMAKE_TOOLCHAIN_FILE=path/to/your/toolchain.cmake  when running cmake…does that give any different result?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Robin Verschueren
That's exactly what I did :) 

On Fri, 23 Jun 2017 at 13:01 Michael Ellery <[hidden email]> wrote:

> On Jun 23, 2017, at 12:47 PM, Robin Verschueren <[hidden email]> wrote:
>
> Dear CMake,
>
> We are trying to build our application for the dSPACE embedded system
> (www.dspace.com), more specifically their MicroAutobox-II. This makes
> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>
> I was following the instructions on this wiki page, when I got the following warning,
> when trying to use a custom 'Toolchain' file:
>
> System is unknown to cmake, create:
> Platform/dSPACE to use this system, please send your config file to
> [hidden email] so it can be added to cmake
>
> We would be glad to send it to you when it is finished, but in the meantime,
> we cannot debug our toolchain file because of above warning.
>
> Is there a way of including it without having to include it in the official CMake
> distribution? I tried setting CMAKE_MODULE_PATH but that did not help..
>
>
> Best regards,
> Robin
> --

what happens if you set    -DCMAKE_TOOLCHAIN_FILE=path/to/your/toolchain.cmake  when running cmake…does that give any different result?


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Michael Ellery
In reply to this post by Michael Ellery

> On Jun 23, 2017, at 1:01 PM, Michael Ellery <[hidden email]> wrote:
>
>
>> On Jun 23, 2017, at 12:47 PM, Robin Verschueren <[hidden email]> wrote:
>>
>> Dear CMake,
>>
>> We are trying to build our application for the dSPACE embedded system
>> (www.dspace.com), more specifically their MicroAutobox-II. This makes
>> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>>
>> I was following the instructions on this wiki page, when I got the following warning,
>> when trying to use a custom 'Toolchain' file:
>>
>> System is unknown to cmake, create:
>> Platform/dSPACE to use this system, please send your config file to
>> [hidden email] so it can be added to cmake
>>
>> We would be glad to send it to you when it is finished, but in the meantime,
>> we cannot debug our toolchain file because of above warning.
>>
>> Is there a way of including it without having to include it in the official CMake
>> distribution? I tried setting CMAKE_MODULE_PATH but that did not help..
>>
>>
>> Best regards,
>> Robin
>> --
>
> what happens if you set    -DCMAKE_TOOLCHAIN_FILE=path/to/your/toolchain.cmake  when running cmake…does that give any different result?
>

sorry - I misunderstood the nature of your error. I think this might be relevant:

    "If your target is an embedded system without OS set CMAKE_SYSTEM_NAME to "Generic”.   “


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Robin Verschueren
Thank you, that makes sense.

If I do that, how can I set specific settings for this Platform only? It seems that e.g.

set(CMAKE_INCLUDE_FLAG_C "-J")

in the Toolchain file is overwritten by CMake after processing the Toolchain file
(more specifically, in CMakeGenericSystem.cmake).

Or should I set this variable somewhere else?

Best,
Robin


On Fri, 23 Jun 2017 at 13:03 Michael Ellery <[hidden email]> wrote:

> On Jun 23, 2017, at 1:01 PM, Michael Ellery <[hidden email]> wrote:
>
>
>> On Jun 23, 2017, at 12:47 PM, Robin Verschueren <[hidden email]> wrote:
>>
>> Dear CMake,
>>
>> We are trying to build our application for the dSPACE embedded system
>> (www.dspace.com), more specifically their MicroAutobox-II. This makes
>> use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).
>>
>> I was following the instructions on this wiki page, when I got the following warning,
>> when trying to use a custom 'Toolchain' file:
>>
>> System is unknown to cmake, create:
>> Platform/dSPACE to use this system, please send your config file to
>> [hidden email] so it can be added to cmake
>>
>> We would be glad to send it to you when it is finished, but in the meantime,
>> we cannot debug our toolchain file because of above warning.
>>
>> Is there a way of including it without having to include it in the official CMake
>> distribution? I tried setting CMAKE_MODULE_PATH but that did not help..
>>
>>
>> Best regards,
>> Robin
>> --
>
> what happens if you set    -DCMAKE_TOOLCHAIN_FILE=path/to/your/toolchain.cmake  when running cmake…does that give any different result?
>

sorry - I misunderstood the nature of your error. I think this might be relevant:

    "If your target is an embedded system without OS set CMAKE_SYSTEM_NAME to "Generic”.   “



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Michael Ellery

> On Jun 23, 2017, at 1:11 PM, Robin Verschueren <[hidden email]> wrote:
>
> Thank you, that makes sense.
>
> If I do that, how can I set specific settings for this Platform only? It seems that e.g.
>
> set(CMAKE_INCLUDE_FLAG_C "-J")
>
> in the Toolchain file is overwritten by CMake after processing the Toolchain file
> (more specifically, in CMakeGenericSystem.cmake).
>
> Or should I set this variable somewhere else?
>
> Best,
> Robin

I think you use the toolchain file to declare the basics (what compiler to use) and then you can add specific flags and other settings in your other CMAKE files *after* the project() declaration (which usually clobbers a bunch of settings…). If you want to have your compiler flags/settings in a reusable file, you can just use the basic include() support to import a separate file, but it still needs to come after project() most likely.



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Robin Verschueren
Okay, that sounds reasonable. It's a pity, because that clutters the CMakeLists of 
potentially a lot of subfolders, e.g.:

if(EMBEDDED_SYSTEM1)
    include(SYSTEM1_SPECIAL_FLAGS)
elseif(EMBEDDED_SYSTEM2)
    include(
etc.

It would be nicer to just specify that from the command line:

cmake -D CMAKE_TOOLCHAIN_FILE=<EMBEDDED_SYSTEM1> ..

Thanks for the help!
Robin

On Fri, 23 Jun 2017 at 13:17 Michael Ellery <[hidden email]> wrote:

> On Jun 23, 2017, at 1:11 PM, Robin Verschueren <[hidden email]> wrote:
>
> Thank you, that makes sense.
>
> If I do that, how can I set specific settings for this Platform only? It seems that e.g.
>
> set(CMAKE_INCLUDE_FLAG_C "-J")
>
> in the Toolchain file is overwritten by CMake after processing the Toolchain file
> (more specifically, in CMakeGenericSystem.cmake).
>
> Or should I set this variable somewhere else?
>
> Best,
> Robin

I think you use the toolchain file to declare the basics (what compiler to use) and then you can add specific flags and other settings in your other CMAKE files *after* the project() declaration (which usually clobbers a bunch of settings…). If you want to have your compiler flags/settings in a reusable file, you can just use the basic include() support to import a separate file, but it still needs to come after project() most likely.




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Nils Gladitz-2
In reply to this post by Robin Verschueren
On 23.06.2017 21:47, Robin Verschueren wrote:
Dear CMake,

We are trying to build our application for the dSPACE embedded system
(www.dspace.com), more specifically their MicroAutobox-II. This makes
use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).

I was following the instructions on this wiki page, when I got the following warning, 
when trying to use a custom 'Toolchain' file:

System is unknown to cmake, create:

Platform/dSPACE to use this system, please send your config file to 

[hidden email] so it can be added to cmake


We would be glad to send it to you when it is finished, but in the meantime,
we cannot debug our toolchain file because of above warning.

Is there a way of including it without having to include it in the official CMake
distribution? I tried setting CMAKE_MODULE_PATH but that did not help..

In the Toolchain file:
    set(CMAKE_SYSTEM_NAME dSPACE)

    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

    ...

Then having Platform/dSPACE.cmake next to your toolchain file should work (works for me).

Nils


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Platform dSPACE

Robin Verschueren
Dear Nils,

Perfect! This was exactly what I was looking for.
It works, and the CMAKE_INCLUDE_FLAG_C 
is not overwritten.

Thanks,
Robin

On Fri, 23 Jun 2017 at 13:29 Nils Gladitz <[hidden email]> wrote:
On 23.06.2017 21:47, Robin Verschueren wrote:
Dear CMake,

We are trying to build our application for the dSPACE embedded system
(www.dspace.com), more specifically their MicroAutobox-II. This makes
use of a specific compiler called mccppc (Microtec C/C++ PowerPC compiler).

I was following the instructions on this wiki page, when I got the following warning, 
when trying to use a custom 'Toolchain' file:

System is unknown to cmake, create:

Platform/dSPACE to use this system, please send your config file to 

[hidden email] so it can be added to cmake


We would be glad to send it to you when it is finished, but in the meantime,
we cannot debug our toolchain file because of above warning.

Is there a way of including it without having to include it in the official CMake
distribution? I tried setting CMAKE_MODULE_PATH but that did not help..

In the Toolchain file:
    set(CMAKE_SYSTEM_NAME dSPACE)

    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

    ...

Then having Platform/dSPACE.cmake next to your toolchain file should work (works for me).


Nils


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...