HowTo: Create an Example using eCos and GCC

1. Introduction

The document guides you through the installation and configuration of a basic project running on eCos. First a standard demo project included in the ApFw distribution is shown. Second a small demo project is provided. You may start your own application based on this example.

2. Download and Install the Apparatus Framework

Download the framework from this web page and install it by running the MSI under Windows. The installation is step by step documented in the (Documentation - Installation) section of this page.

3. Configure and Compile the Apparatus Framework Library

Open the Apparatus Framework Config tool in the start menu of Windows (Programs - bbv Apparatus Framework - Configuration Tool). Store a project file and name it EXAMPLE_PRJ.acc at some location like z:\EXAMPLE_PATH. Some changes are necessary to build for Windows:

  1. Remove {Build tool gcc} in (Build - Packages)
  2. Add {Build tool gcc for eCos} in (Build - Packages)
  3. In (Build - Templates...) change the (Hardware) to {Apparatus Framework for eCos}.
  4. In (Tools - Paths - Build Tools...) adjust the path to C:\cygwin\opt\ecos\gnutools\i386-elf\i386-elf\bin or where ever the platform specific gcc is installed to.
  5. In (Tools - Paths) adjust the path (User Tools) c:\cygwin\bin or where ever cygwin is installed on your machine.
  6. Tick {Configuration - Apparatus Framework - Testsuite for the Apparatus Framework} and {Configuration - Apparatus Framework - Testsuite for the Apparatus Framework - Test executable for the ApparatusFramework}.
  7. Build eCos
  8. At the empty line behind {Configuration - Apparatus Framework - KernelServices - KernelServices for eCos - Path to eCos} add the path to the _install directory from eCos, e.g. /U/eCos_install. The tool automatically adds "-I/U/eCos_install/include" to the compiler options and "-L/U/eCos_install/lib" to the linker options. Make sure those directories exist.
  9. The tool announces that some dependencies have to be fixed. Click ok.

Compile it now.

The directories EXAMPLE_PRJ_build and EXAMPLE_PRJ_install will be created along with EXAMPLE_PRJ.acc


The drive letter, z: in this case, must be mounted in cygwin. Use the following command:
mount -t -f z: /z
to mount the drive letter z: to /z in cygwin.

4. Download it to your target

Depending on your target you may now download the binary files. The build process created the binary files in the directory EXAMPLE_PRJ_install/bin.