<img height="1" width="1" src="https://www.facebook.com/tr?id=1357777224302944&amp;ev=PageView &amp;noscript=1">

Compiling RTI Connext DDS Micro For The Raspberry Pi IoT Device

April 27, 2016 by
|

RTI Connext DDS Micro is RTI's product targeting small footprint devices, and it was also the basis for RTI Connext DDS Cert, a product for small footprint, safety critical use cases. While Connext DDS Micro is distributed with binaries for a few common architectures, it is also distributed with the full source-code since we anticipate that the majority of our users will compile, and even port, to their specific platform.

The Raspberry Pi is a popular IoT device with numerous sensors and add-ons available, and is a great device to run Connext DDS Micro on. In this blogpost, I'll cover how to easily compile Connext DDS Micro for the Raspberry Pi. Please note that porting Connext DDS Micro to a new OS/platform is not covered in this blogpost!

Compiling Raspberry Pi IoT Device
The author's Raspberry Pi (bottom) with the Gertboard I/O board (top).

CMake is the preferred tool to build Connext DDS Micro because it simplifies configuring the Connext DDS Micro build options. Note that CMake itself does not compile anything. CMake is used to generate build files for a number of environments, such as make, Eclipse CDT, Xcode and Visual Studio. Once you have your build file, any of the tools I mentioned can then be used to build Connext DDS Micro. This system makes it easier to supporting building Connext DDS Micro with different tools. CMake is easy to install with prebuilt binaries and has no dependencies on external tools. If you have not yet installed CMake, please do so now.

We'll assume a Linux development host for the remainder of this blogpost. Start the CMake GUI from a terminal window, preferably in the top-level Connext DDS Micro source directory. Note that there are two directories under source: Unix and Windows. The only difference between these two is that the source in the Unix directory has Unix style line-endings, and the source in the Windows directory has Windows style line-endings.

> cmake-gui .

(Note the period after cmake-gui!)

Make sure the path to the source and binaries is the location of the Connext DDS Micro source-code.

  1. Press "Configure".
  2. Select a generator (I typically use Eclipse CDT Unix Makefiles).
  3. Select "Specify options for cross-compiling"
  4. Type "Linux" as Operating System
  5. Type in a Linux version number
  6. Type arm for Processor
  7. Select the C and C++ compiler you want to use (full path to the executables).
  8. Select the compiler root as the Target Root. RTI Connext Micro does not rely on any libraries other than libc and libc++
  9. Press "Done"
  10. Press "Configure"
  11. Check "Grouped"
  12. Expand RTI Connext Micro and select your build options.
  13. Type a target name for RTIMICRO_BUILD_TARGET_NAME, for example armv6Linux3gcc4. The target name is sent as part of the participant discovery but is not used by RTI Connext Micro.
  14. Press "Configure". All red lines should disappear.
  15. Press "Generate".
  16. Exit the GUI.

In the terminal window:

> make VERBOSE=1

The libraries will be placed in:

./lib/<target name>/

When the libraries are built "RTI Style" the libraries will have the same names as the ones RTI distributes. The libraries are:

  • rtime is the core library, including the DDS C API
  • discdpde is the Dynamic Participant Dynamic Endpoint plugin
  • discdpse is Dynamic Participant Static Endpoint plugin
  • rhsm is Reader History plugin
  • whsm is Writer History plugin
  • cpp is the C++ API

The following conventions are used for library naming:

  • Static libraries have a z suffix, shared libraries does not have an additional suffix
  • Debug libraries have a d suffix, release libraries does not have an additional suffix

You can also build a single library if that is easier to work with. For more advanced build configurations, such as compiler and linker options, run cmake-gui again, and this time check the "Advanced" checkbox. Next, expand CMAKE to see available build options.

This blogpost only described recompiling Connext DDS Micro for a supported platform (Linux and GCC). The next step is to port Connext DDS Micro to a new OS, or use an unsupported system or compiler.

We would love your feedback about RTI Connext DDS Micro! Please check out the RTI Connext Micro forum, located on the RTI Developer Community site, community.rti.com.

Let Us Know What You Thought of the Article.

Leave a Comment Below.

FREE ON-DEMAND WEBINAR

Accelerate Distributed Systems Development using Connext Tools

Connext DDS Tools Tutorial Video
Watch Now

Subscribe to Email Updates