Search code examples
eclipsecmakevxworksopc-ua

Building OPCUA for vxworks using cmake


I am building OPCUA for vxworks 6.6. I got a information in

http://forum.unified-automation.com/post2724.html#p2724

It is mentioned as below "create a new CMake project for "Eclipse CDT4 - Unix Makefiles" with the vxWorks CMake toolchainfile."

Here what does author mean by "vxWorks CMake toolchainfile."?

I am also looking for steps in building in generate project for vxworks workbench from CMake, like what are prequestie software to be avialable (I have CMake 3.2.2 installed on windows 7 machine). It would be good if steps are explained with simple Helloworld application how do we generate vxworks workbench project from windows CMake3.2.2.

thanks


Solution

  • Here what does author mean by "vxWorks CMake toolchainfile."?

    A toolchain file is a file with informations about the toolchain used for a target platform. It contains compiler to use, include paths, libraries etc.

    The problem: CMake doesn't support VxWorks.


    What you can do:

    1. Does OPCUA already contain one (or other kind of cmake support)?
      • If so, you are on the lucky side ...
    2. Write your own toolchain file
      • It's not that difficult
      • Recommendation: Write a toolchain file and platformfiles describing your target platform (Some info: here (useful!), here and here)
    3. Search if you can find one in the internet
    4. Use the basic Cross-compile features of CMake
      • (in the CMake GUI: Use "Specify options for cross-compiling")
      • In some cases this is enough; set compilers and include paths
      • This is more or less what the toolchain file does

    I am also looking for steps in building in generate project for vxworks workbench from CMake

    As VxWorks, the Workbench is not an official supported IDE. Therefore you can't generate Workbench project directly. But since the WB is Eclipse based, you may use the usual Eclipse project files. Disadvantage: Not all WB features are available (but you can achieve most of these with CMake).


    like what are prequestie software to be avialable

    Just CMake, the Workbench and the usual VxWorks platform (Compiler, libraries, BSP, ...).


    It would be good if steps are explained with simple Helloworld application how do we generate vxworks workbench project from windows CMake3.2.2.

    As you have seen: this is not that easy. But the basic steps:

    1. Write a toolchain file (if you don't have one) and maybe platform files (depending on how many platforms / compiler you want to support). You get some help from the link above
    2. Check if your toolchain file leads to successful compilation
    3. Generate Eclipse project files (infos: CMake:Eclipse UNIX Tutorial and Eclipse CDT4 Generator)