IBM Support

How to speed up the Raspberry Pi development process with IBM Rational Rhapsody C/C++

Technote (FAQ)


How do you automate the IBM Rational Rhapsody cross-compiler toolchain for your Raspberry Pi?


Creating and building a project for the Raspberry Pi target using Rhapsody is quick and simple. This profile demonstrates that using IBM Rational Rhapsody enables a faster workflow than the existing cross-platform configuration. This means a radically reduced setup time; Allowing you to spend more time building IBM Rational Rhapsody solutions with your Raspberry Pi!

Typically a micro controller has limited resources with no operating system. In this situation you must compile the project on the local windows host using a cross-compiler configuration and then upload the executable to the target device. However, setting up a cross-compiler configuration is time-consuming and complex. This is a block to productivity.

However, the Raspberry Pi has more memory and a more powerful CPU than most micro controllers. It even has it's own built-in Linux based operating system. So why not capitalize on this by leveraging it with the powerful modeling capabilities of IBM Rational Rhapsody?

Traditionally you would build the Rhapsody project locally and upload the binary file to the target device:


Now you can upload the Rhapsody generated source code to the remote target and build it remotely on the Raspberry Pi from IBM Rational Rhapsody:

So how does it work? The process of building, running and animating IBM Rational Rhapsody models has been automated so that it is now possible to do so using remote Secure Shell (SSH) scripting. All from the comfort of the out-of-box IBM Rational Rhapsody user interface:

  • Automated upload and build of Rhapsody model code on the remote target.
  • Automated execution of Rhapsody model application on remote target.
  • Automated animation of Rhapsody model application on remote target.
  • Automated rebuild of Rhapsody framework on the remote target.
Please download the profile found at the end of this document and make sure that you follow and complete ALL prerequisite, installation and configuration steps.


  1. This profile makes extensive use of Putty as an SSH client. You must have plink.exe and pscp.exe copied to the c:\ folder (you can reconfigure this default location at a later point by editing BuildOxfRedirect.bat/ExeRedirect.bat/MakeRedirect.bat).
    You may also want to download the main SSH client, putty.exe (see step 2).
    Please visit the Putty site to download all three SSH client tools.


    IBM is not providing program services of any kind for this program. Making use of the Information provided in this technote is done at the user's own risk.

  2. Ensure you have successfully connected to the remote target and given permission to the remote target's SSH key. This is a one time operation per local host. For simplicity, it is recommend you do this separately using the main putty.exe client user interface.
  3. You must have OMROOT defined as a local environment variable. For example, C:/IBM/Rational/Rhapsody/Share or C:/Users/<user name>/IBM/Rational/Rhapsody/Share
  4. Ensure the correct Rhapsody API is registered for the above OMROOT installation. See

  1. Copy the to the Rhapsody OMROOT\share\profiles folder and unzip
  2. Ensure path is correct i.e. Share\Profiles\NativeLinuxAdaptor\NativeLinux_rpy\

  1. Create a new Rhapsody project and add the NativeLinuxProfile (
  2. Add a new linux configuration and set the NativeLinuxConfiguration stereotype to the configuration
  3. Open the features of the configuration and set the following properties:
    • C_CG::Linux::RemoteTarget - Set this to the remote target, the linux/raspberry pi workstation/device
    • C_CG::Linux::RemoteTargetUsername - Set this to the username of the account you want to use on the remote target
    • C_CG::Linux::RemoteTargetPassword - Set the to the password of the account you want to use on the remote target
  4. Run the Code menu > BuildFramework command. You should see the linuxshare.tar uploaded to the remote target, extract and then build remotely on the target. The output is typical for a framework build n.b. the paths will mention linux-style paths instead of windows-style paths
  5. All done. You are ready to start modelling!!
  • Create your model and test it using a Windows compatible configuration.
  • Add a new NativeLinuxConfiguration and make it the active configuration.
  • Use GMR (or separate commands) to build and run your model on the Raspberry Pi

  • Console output may be shown on the local host in "chunks", animation however will run in real-time.
Appendix: Rhapsody workflows

If you need to modify or extend the capabilities of this profile you can find the SSH command chain details of each workflow in this section.

  1. Building the Rhapsody OXF framework

  2. Building your Project

  3. Executing your Project


All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Document information

More support for: Rational Rhapsody
Integrations - 3rd Party

Software version: 8.1.3, 8.1.4, 8.1.5, 8.2

Operating system(s): Linux, Windows

Reference #: 1973531

Modified date: 18 April 2017