eCos Home

RedBoot Home


About eCos

Supported Hardware

Downloading and Installation

Documentation

FAQ

Mailing lists

Problems

Licensing

Anonymous CVS

Contributions and Third Party Projects

eCos
(Answer) (Category) eCos FAQ : (Category) Using eCos :
How do I create an application using eCos?
An eCos application is built in two steps.
  • Configure and build eCos kernel
  • Link kernel with application code

The first step is quite fully documented elsewhere. The problem comes with the second step, since it will be unfamiliar to most users. Some additional command line arguments for the C compiler will be necessary in order to link your application with the eCos kernel. The simplest way to set an example up is by using the "build_Makefile" script, which you will find alongside the eCos sample programs.

Assume that the eCos kernel was created in the directory "ECOS" and that the application is in the directory "APP".

  % cd APP
  % SRCS=file.c DST=file build_Makefile ECOS

This script will build a simple Makefile template, using the appropriate eCos tools setup used for building the eCos kernel. This Makefile can then be modified as necessary to handle the actual application code setup.

It uses the default eCos compilation flags. This may include some flags that the application does not require or desire such as warning options. Obviously those flags can just be deleted by editting the generated makefile. Consult the GCC manual to see what the various flags do if you don't already know.

If you are using the graphical configuration tools, these lay out the build directory structure in a slightly different way from the command line ecosconfig tool. This should be fixed eventually, but for the moment it can be worked around. If you created a configuration called example, then when saved there will be:

  example.ecc
  example_build/
  example_install/

So enter the example_build directory and type:
    ln -s ../example_install install

build_Makefile can then be used as before.

Note: build_Makefile is only a starting point. Most applications will require modifications to the resulting Makefile in order to be complete.

Previous: (Category) Problems when building eCos itself
This document is: http://ecos.sourceware.org/fom/ecos?file=76
[Search] [Appearance]
This is a Faq-O-Matic 2.717.

Send any queries about the contents of this FAQ to the ecos-discuss mailing list
Send any operational queries about this FAQ to the eCos maintainers