Products Support Documentation Download
GHS INTEGRITY using Project Files


These instructions are for RDM 14.1 targeting INTEGRITY 11.0.X using "Single Address Space POSIX". Section 2 gives a quick overview of INTEGRITY. Section 3 describes how we compiled an INTEGRITY kernel with necessary modifications to run RDM. Section 4 explains how to compile RDM for INTEGRITY. Section 5 gives an overview of the virtual machine we have been using.


Quick Overview of INTEGRITY

INTEGRITY is a POSIX-like operating system for the embedded space. An application can use several address spaces with protection between them, or they can be linked directly into the kernel. INTEGRITY also supports downloading of address spaces. Each address space is a fully linked application (possibly with use of shared libraries between the address spaces). Applications must be put together using an integration tool before they can be downloaded to the target.

We are using MULTI project files to compile, link, and integrate C and C++ files.

The following documentation on INTEGRITY and MULTI is relevant to our products:

  • INTEGRITY Development Guide
  • Target Connection User's Guide for PowerPC
  • Embedded PowerPC Development Guide
  • Green Hills Installation and Licensing Guide
  • INTEGRITY Installation Addendum
  • Integrate User's Guide
  • INTEGRITY BSP User's Guide
  • Green Hills C/C++ User's Guide
  • Getting Started with MULTI 2000
  • MULTI 2000 User's Guide
  • MULTI 2000 User's Guide Addendum
  • INTEGRITY EventAnalyzer User's Guide

In the following, it is assumed that all the hosted tools for INTEGRITY is installed under /usr/ghs or C:\ghs.

With INTEGRITY, you have the option to use a real target or a simulator. The simulator is a simulator that simulates the instruction set of the architecture. It is not an environment using your host instruction set with a BSP on top of your host OS to emulate the INTEGRITY environment.

With INTEGRITY, there are different options on how to get your code running on a board or a simulator:

  • A kernel that can dynamically download and load applications. When you are done, the application can be unloaded.
  • Compile your application together with the kernel using the kernel's address space.
  • Use several address spaces - for example, one for the kernel, one for the virtual file system server, one for the TCPIP stack, and one for the application.

In the following, we will focus on the first approach using "Single Address Space POSIX."

Task Priorities

Please consult README-task-priorities

How to compile an INTEGRITY Kernel for RDM

Configuring and compiling an INTEGRITY kernel for "Single Address Space POSIX" is done from within MULTI.

Once you have created the workspace, you may need to change some defaults by editing the default.ld file. This is what we have changed for running our tests. Some of the downloadables are a lot bigger than the default download size, and we use a big RAM file system:

__INTEGRITY_HeapSize     = 0x8000000
__INTEGRITY_DownloadSize = 0x1000000
__INTEGRITY_MaxCoreSize  = 0x8000000

The next step is to include a file system into the kernel. Edit the project file for the kernel (the second project file and the only project file of type 'Program') and add the following lines after the other libraries:


ivfsserver is the file system server, ffs is a file system. With NFS and TCPIP, you also need to add:


Add a C source file for the mount points as follows:

#include <stdio.h>
#include <sys/mnttab.h>
vfs_MountEntry vfs_MountTable[] = {
#if 1
{ "<ram:1400k>ramroot:0", "/", MOUNT_FFS, (char *)0, 0, 0},
#if 0
{"", "/nfs", MOUNT_NFS, (char *)0, 0, 0},

Include a tftp server for retrieving files from the target platform. Include the following library in the project file for the kernel:


Add the following lines to

+ extern "C" {
+ #include <ghnet2/tftp_server.h>
+ }
int main()
cout << "Hello world!" << endl;
+ tftp_server_start ();

Now you can use a tfpt client to transfer files between your development host and the target platform. Please note that the tftp server only supports "mode octet."

Build the kernel. If everything went well, you may need to convert the image to the binary format as follows, where integritykernel is the kernel executable file we just built:

elfloader -l /opt/ghs/int1104/ippc/elfloader.bin integrity_kernel


elfloader -l c:/ghs/int1104/ippc/elfloader.bin integrity_kernel

You will need to copy the output file (with extension ".bin") over to a tftp server where it is available for the target board. On Windows, you can use SolarWinds Free TFTP server. On Linux, you can use tftpd.

Unless the kernel has compiled in network parameters (global_table.c), the network must have support for the Reverse Address Resolution Protocol (RARP). On Linux, you can use rarpd. Make sure you set up rarpd so that it skips the check for a bootable image (-e).

How to Develop an Application for INTEGRITY using RDM

RDM examples written in C use the RDM_STARTUP_EXAMPLE macro. The argument to this macro must match the name of a named main function as shown below. The tims example uses this macro as follows:

int32_t EXTERNAL_FCN tims_main(
    int32_t            argc,
    const char *const *argv)


You also have the option of compiling in a hook for the RDM_STARTUP_EXAMPLE. Compile in a hook like this:


This will change the current working directory.

How to Compile RDM for INTEGRITY

Compiling RDM for INTEGRITY consists of a native build for your host development platform and a cross compiled build for your INTEGRITY target.

Native Build for the Host Development Platform

Before you can compile RDM for INTEGRITY, you need a native build for your host development platform.

Native build for Linux

Please follow the steps outlined in Using "configure" and Using "make". Pay special attention that you need to provide the command line option –enable-integrity-project-files when running configure for the INTEGRITY project files to be configured.

Native build for Windows

Please follow the steps outlined in Windows Development Host.

Cross Compiled Build for INTEGRITY

Assuming you have done a native build for your host development platform using the configure script and make on UNIX or the Visual Studio project files on Windows, you can now do a cross compiled build for INTEGRITY.

Run the MULTI IDE and within a workspace open the project file named default.gpj located in:


or something similar depending on your actual target or version of INTEGRITY. If the location of the INTEGRITY development environment (os_dir) does not match your install, you can edit default.gpj to match it.

Build the examples and getting started from within Multi.

Tools and examples will appear under mod in the appropriate target directory. The files with extension '.ael' are INTEGRITY applications you can load and run on the target. You will not be able to set program arguments unless you change the integrate file (extension .int). In the AddressSpace section add a line starting with "Arguments" followed by the actual arguments you want to pass in.

Target Platforms

pcx86 on a Virtual Machine

Our virtual machine has been set up with 1GB of disk space, 512 MB of RAM, and a serial port connected to the virtual machine for the development platform.

As explained in the "INTEGRITY GILA Boot Loader Guide" section 2.1, we boot the virtual machine off the x86 Target Setup CD for INTEGRITY.

Once INTEGRITY is up and running, we connect to it through telnet on port 8081 and issue this command:

> install IDEController0Master

(If you do not know the IP address, connect to it through the serial port as described above and issue the nc command to see the network parameters.)

Then we create the configuration and upload it using ftp. Here we have specified as the tftp server and integrity11x86_kernel as the image to load.

$ cat >gila.cfg <<EOF
# GILA default configuration for target system
ifconfig 0 addr
ifconfig 0 mask
ifconfig 0 gateway
simplemenu -t 1 -d 1 /boot/gila/menu.lst

$ cat >menu.lst <<EOF
item INTEGRITY from
    multiboot tftp:// device=0 DHCP=on
    multiboot /boot/kernel device=0 DHCP=on

$ ftp
ftp> put gila.cfg /mnt/ IDEController0Master/boot/gila/gila.cfg
ftp> put menu.lst /mnt/ IDEController0Master/boot/gila/menu.lst

Eject the DVD, reboot your target to boot the INTEGRITY kernel from the tftp server.