Getting Started with CAmkES on OKL4 3.0

Instructions for OKL4 2.1 are here.

Quick Start

Make sure you have the prerequisite tools.

To get started right away, download this script and run it. It will download OKL4 3.0 and CAmkES and install them.

To build CAmkES and an example system, go to the OKL4 directory created by the first script and run this:

  ./tools/build.py PYFREEZE=False machine=gumstix project=iguana camkes_test=False wombat=False mutex_type=kernel apps=simple simulate

This will build OKL4, CAmkES and a simple example for an ARM target, and then run the resulting system in an emulator.

The Full Procedure

1. Download CAmkES

Download CAmkES for OKL4 3.0: camkes-project--okl4-3-0-release--1.0.1.tgz

2. Download OKL4

Download OKL4 3.0: okl4_3.0.tar.gz

3. Download tools

To build OKL4 and CAmkES you will need a cross compiler toolchain for the target architecture that you will be building for.

To run the resulting image you will need either appropriate hardware, or an emulator.

You will also need to have Python 2.4.4 installed.

See the README file in the OKL4 directory for more details.

Note that the following instructions assume that you will be building on an ia32 (x86) Linux host. If you use a different platform or OS, then you will probably require different cross compiler tools and the instructions will be different.

For ARM target:

gcc cross-compiler toolchain for ia32 Linux: http://www.ertos.nicta.com.au/downloads/tools/arm-linux-3.4.4.tar.gz

Install this in an appropriate directory and add the path to your PATH environment variable (for example export PATH=`pwd`/opt/nicta/tools/gcc-3.4.4-glibc-2.3.5/arm-linux/bin/:$PATH)

skyeye emulator for ia32 Linux: http://www.ertos.nicta.com.au/downloads/tools/skyeye-kenge-1.2.1n.tar.gz

Note, if this emulator doesn't work for you, try to get the sources for version 1.2.3 or higher and build it yourself. Download the sources http://downloads.sourceforge.net/skyeye/skyeye_1_2_3_Rel.tar.bz2 and build it like this:

  make NO_DBCT=1 NO_BFD=1 STATIC=1 NO_LCD=1 PPC_DISABLED=1

Install this in an appropriate directory and add the path to your PATH environment variable (for example export PATH=`pwd`/kenge/bin:$PATH)

4. Install OKL4

Unpack the OKL4 archive you downloaded in step 2.

  tar xzf okl4_3.0.tar.gz

The resulting okl4_3.0 directory will be your OKL4 directory.

You can test your tools and OKL4 distribution by trying to build a simple example.

For ARM target:

  cd okl4_3.0
  ./tools/build.py PYFREEZE=False project=iguana machine=gumstix example=dining_philosophers

5. Install CAmkES

Go to your OKL4 directory. Unpack your downloaded CAmkES archive here:

  tar xzf camkes-project--okl4-3-0-release--1.0.1.tgz 

Your OKL4 directory should contain a new components sub directory after this (there are other changes as well, such as an iguana/apps and an tools/camkes directory)

6. Build an example

In the OKL4 directory do the following:

For ARM target:

  ./tools/build.py PYFREEZE=False machine=gumstix project=iguana camkes_test=False wombat=False mutex_type=kernel apps=simple simulate

Note: quit the emulator by typing: Ctrl-C

Verbose output

For extra debugging output add verbose_str=True --debug=stacktrace to the command line.

Results:

The results should look something like:

  Starting the client
  -------------------
  echo_string: hello world - > hello world
  echo_int: 0 -> 0
  echo_pointer: 0xe0601d44 -> 0xe0601d44
  After the client

7. Celebrate

Hooray, it works!

Now go and work through the tutorial.