Difference between revisions of "The XCDL.py first run"
m (→Test steps) |
m (→Test steps) |
||
Line 45: | Line 45: | ||
<pre> | <pre> | ||
− | ilg-mbp:osx_cl- | + | ilg-mbp:osx_cl-sjlj_debug_conversions_llvm_Debug ilg$ tree |
. | . | ||
├── include | ├── include | ||
Line 77: | Line 77: | ||
19 directories, 9 files | 19 directories, 9 files | ||
− | ilg-mbp:osx_cl- | + | ilg-mbp:osx_cl-sjlj_debug_conversions_llvm_Debug ilg$ |
</pre> | </pre> | ||
Line 83: | Line 83: | ||
<pre> | <pre> | ||
− | cd build/osx_cl- | + | cd build/osx_cl-sjlj_debug_conversions_llvm_Debug |
make | make | ||
</pre> | </pre> |
Revision as of 20:24, 16 January 2013
Introduction
This page describes how to give XCDL a first try, using the µOS++ SE components repository running on a synthetic OS X platform.
Prerequisites
This procedure was created and tested with
- OS X 10.8.2
- Xcode Command Line Tools
Purpose
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://git.code.sf.net/p/xcdl/python xcdl-python.git git clone git://git.code.sf.net/p/micro-os-plus/second micro-os-plus-second.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/configMakefiles.sh \ --config="micro-os-plus-second.git/packages/portable/devices/debug/tests/conversions/meta/config.py" \ --id=config.os.portable.devices.debug.tests.conversions.osx.cl-sjlj.debug \ --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 │ │ └── subdir.mk │ └── portable │ ├── devices │ │ └── debug │ │ ├── src │ │ │ └── subdir.mk │ │ └── tests │ │ └── conversions │ │ └── src │ │ └── subdir.mk │ └── kernel │ └── src │ └── subdir.mk ├── objects.mk └── sources.mk 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 make
The final step is to run the freshly compiled application:
./conversions
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.