IBM Support

MinGW with IBM Rational Rhapsody

White Papers


Abstract

This document will provide an introduction on how to set up an MinGW environment with IBM Rational Rhapsody.

Content

Author: Arta Ballav Chaudhury




Table of Contents:




Introduction

Rational Rhapsody, a modeling environment based on UML, is a visual development environment for systems engineers and software developers creating real-time or embedded systems and software. Rational Rhapsody uses graphical models to generate software applications in various languages including C, C++, Ada, Java and C#. Rational Rhapsody helps diverse teams collaborate to understand and elaborate requirements, abstract complexity visually using industry standard languages (UML, SysML, AUTOSAR, DoDAF, MODAF, UPDM), validate functionality early in development, and automate delivery of high quality products. For using it with a different environment we can set the target environment in IBM Rational Rhapsody. MinGW is one of the options for target environment.





Introduction of MinGW
  • MinGW32, is a free and open source software development environment for creating Microsoft Windows applications. It includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager) a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU Project's GNU Debugger, and miscellaneous utilities. This environment also can be used with the modelling tool IBM Rational Rhapsody.
  • MinGW does not rely on third-party C runtime dynamic-link library (DLL) files, and because the runtime libraries are not distributed using the GNU General Public License (GPL), it is not necessary to distribute the source code with the programs produced, unless a GPL library is used elsewhere in the program.
  • MinGW can be run either on the native Microsoft Windows platform, cross-hosted on GNU/Linux, or "cross-native" on Cygwin.
  • An alternative called MinGW-w64 was created by a different author to include several new APIs and provide 64-bit support.

Source: https://en.wikipedia.org/wiki/MinGW

This document will introduce details on how to set up MinGW environment with IBM Rational Rhapsody.

Note: MinGW is not officially supported by IBM Rational Rhapsody as per the release note.







Overview of how to use MinGW environment

This environment can be set as language specific in IBM Rational Rhapsody. This document will go through the steps for setting MinGW environment for Language C and Language C++.





Generating makefile for the environment

In order to use the MinGW environment in IBM Rational Rhapsody , you need to build various libraries as oxflibs, aomlibs, omcomlib, tomlibs, Weblib, simulinklib.
So to build these libraries you have to first set the make file in IBM Rational Rhapsody.


Steps to set the makefile for generating the libraries
  • Go to the following path <Install Directory>\ Share\LangCpp
  • For your reference I have attached all the required makefile to the document (SetupMINGWForRhapsody.7z).
  • Copy the following make files from the attachment into the appropriate folder.
    • mingwaom.mak - <Install Directory>\ Share\LangCpp\aom
    • mingwomcom.mak - <Install Directory>\ Share\LangCpp\omcom
    • mingwoxf.mak - <Install Directory>\ Share\LangCpp\oxf
    • mingwSimulinkIntegration.mak - <Install Directory>\ Share\LangCpp\SimulinkIntegration
    • mingwtom.mak - <Install Directory>\ Share\LangCpp\tom
    • mingwWebComponents.mak - <Install Directory>\ Share\LangCpp\WebComponents
    • MinGWbuild.mak - <Install Directory>\ Share\LangCpp





Adapter for MinGW

As you know, to run a new environment we need an adapter in IBM Rational Rhapsody. Hence one adapter for MinGW also attached to the document. With this adapter the MACROs for configuring the OS will be enabled and MINGW can be used. These MACROs are used in framework code of IBM Rational Rhapsody. Please follow the steps to add the adapter to IBM Rational Rhapsody.
  • Copy the mingw\Share\LangCpp\osconfig\MinGW folder from attachment and paste it to <Install Directory>\ share\LangCpp\osconfig folder. With all the above steps we have set the make files and adapter for MinGW





Build Framework for MinGW environment

In order to use the MinGW environment you need to build the framework for IBM Rational Rhapsody

To build the framework with all the MinGW libraries please follow the below steps.
  • We can use a .bat file to build the framework . Hence I have attached the Rebuild_MinGW_Libraries.bat to the document. Copy the mingw\Share\LangCpp\Rebuild_MinGW_Libraries.bat to <Install Directory>\ Share\LangCpp\ folder.
  • Change the path of MinGW as per your installation in Rebuild_MinGW_Libraries.bat file.
  • Copy the MinGWMake.bat and MinGWrun.bat from mingw\Share\etc to <Install Directory>\ Share\etc and edit the MinGW path in the .bat file too.
  • Next step will be to add the MinGW to library to IBM Rational Rhapsody so that all system call can be resolved while using the environment. Follow the below steps.
  • Copy the library from mingw\Share\lib folder to <Install Directory>\ Share\lib folder.





Updating property files for MinGW

One last step before we start modelling. As MinGW is not given as an option in IBM Rational Rhapsody, it by default does not give the option for MinGW environment. Hence to get MinGW environment in IBM Rational Rhapsody we need to update the property file for Rhapsody.

To achieve this follow the below steps.

In order to add this for C++ we need to update siteC++.prp . I have attached one property file named siteC++.prp for MinGW with OXF with the required changes.
  • Update the mingw\Share\Properties\siteC++_OXF_MinGW.prp to <Install Directory>\ Share\Properties folder.
  • Update the siteC++.prp as follows:


  • Include "siteC++_OXF_MinGW.prp"

    Subject CPP_CG

    Metaclass Configuration

    Property Environment Enum "MinGW, Microsoft,MicrosoftDLL,VxWorks,VxWorks62diab,VxWorks62gnu,VxWorks62diab_RTP,VxWorks62 gnu_RTP,Solaris2,Cygwin,Borland,MultiWin32,Multi4Win32,MSStandardLibrary,MicrosoftWinCE.NET,OseSfk,Linux,Solaris2GNU,QNXNeutrinoGCC, QNXNeutrinoCW,INTEGRITY,INTEGRITY5,IntegrityESTL,Integrity5ESTL,NucleusPLUS-PPC,WorkbenchManaged,WorkbenchManaged_RTP" "Microsoft"

    end

    end

    end






Note: The above document explains the MINGW configuration for LangCPP, but the same procedure can be followed in order to also configure for LangC. All corresponding documents have been attached to the SetupMINGWForRhapsody.7z


References

The following were used in references or as other sources of information:



Disclaimer

THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS DOCUMENT, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS DOCUMENT OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS DOCUMENT IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REDOCUMENTS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS OR SOFTWARE.

Original Publication Date

23 April 2016

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.1.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg27047929