The first run

From XCDL (eXtensible Component Definition Language) Wiki
Jump to: navigation, search


This page describes how to give XCDL a first try, using the µOS++ SE components repository running on a synthetic OS X platform.


This procedure was created and tested with

  • OS X 10.8.2
  • Xcode Command Line Tools


The goal is to run a test that exercises all possible conversions defined in the µOS++ Debug class. Since the class is portable, it does not need any specific hardware, and on Posix platforms the class output can be easily redirected file descriptor 1, making the debug output visible on the terminal used to start the test.

Test steps

The first step is to create a temporary folder for this test and change directory to it:

 mkdir -p $HOME/tmp/xcdl-test
 cd $HOME/tmp/xcdl-test

The second step is to checkout the XCDL Git repository and the µOS++ SE Git repository. In the above folder, run the following commands

 git clone git:// xcdl-python.git
 git clone git:// micro-os-plus-se.git

If the Xcode Command Line Tools were properly installed, the git executable should already be available, otherwise an error will occur.

The next step is to run the XCDL configMakefiles tool, to create the build folder.

 sh xcdl-python.git/scripts/ \
 --config="micro-os-plus-second.git/packages/portable/devices/debug/tests/conversions/meta/" \ \
 --build="build" --linearise --verbose

In addition to the long, verbose, output, this program should create a folder build/osx_cl-sjlj_debug_conversions_Debug where all the interesting stuff is stored.

If you are curious what this program did, you can browse the build folder. It should look like:

ilg-mbp:osx_cl-sjlj_debug_conversions_llvm_Debug ilg$ tree
├── include
│   └── xcdl
│       ├── OS_Defines.h
│       └── OS_Greeting_Defines.h
├── makefile
├── micro-os-plus
│   ├── hal
│   │   └── arch
│   │       └── synthetic
│   │           └── osx
│   │               └── devices
│   │                   └── debug
│   │                       └── src
│   │                           └──
│   └── portable
│       ├── devices
│       │   └── debug
│       │       ├── src
│       │       │   └──
│       │       └── tests
│       │           └── conversions
│       │               └── src
│       │                   └──
│       └── kernel
│           └── src
│               └──

19 directories, 9 files
ilg-mbp:osx_cl-sjlj_debug_conversions_llvm_Debug ilg$ 

The next step is to build the generated Make files. For this go to this new folder and run make.

 cd build/osx_cl-sjlj_debug_conversions_llvm_Debug

The final step is to run the freshly compiled application:


The result should be a list of lines, generated from various methods of the Debug class, performing conversion of all useful types (strings, chars, hex numbers, decimal numbers, etc).

Note 1: the current test is built and executes as a 64 bits application.

Note 2: the tree command is not part of the standard Apple distribution, but it can be installed from Mac Ports.