ANSI C Based OPC UA Client/Server SDK
1.8.0.369
|
The following sections demonstrate how to cross compile the SDK for Linux on an ARM platform as example.
Although these instructions can be in principle applied to other target systems, there may be some differences. Please refer to CMake Cross Compiling (link to CMake Wiki) for more information.
You’ll need the following software:
CMake needs to know the target system and where the tools from the cross compiling toolchain can be found. The information can be put together in a so-called toolchain file (link to CMake Wiki). In our case, it has the following content:
Once we have a toolchain file, cross compiling the SDK is not very different as described at Recompiling the SDK and Examples (Linux). We have to specify the toolchain file when starting ccmake:
Press “c” to configure, then change the settings to your liking, e.g. set CMAKE_INSTALL_PREFIX to “Release” and specify a different CMAKE_INSTALL_PREFIX (see screenshot).
Now press “c” to configure again, followed by “g” to generate makefiles. When finished, we are able to compile the SDK and install it to the directory specified by CMAKE_INSTALL_PREFIX:
Creating makefiles for the SDK works in a similar way. Create a new folder inside the SDK installation directory, e.g. “bldexamples”, change to the folder and start ccmake, specifying the directory “examples” as source directory.
Press “c” to configure, set CMAKE_INSTALL_PREFIX to “Release”, specify the same CMAKE_INSTALL_PREFIX as above.
When finished, press “c” to configure again, followed by “g” to generate makefiles. Now you can compile and install the examples: