Chapter 11. porting guide, Introduction, Hal structure – Comtrol eCos User Manual

Page 307: Porting guide, Hal classes

Advertising
background image

Chapter 11. Porting Guide

Introduction

eCos has been designed to be fairly easy to port to new targets. A target is a specific platform (board) using a given
architecture (CPU type). The porting is facilitated by the hierarchical layering of the eCos sources - all architecture
and platform specific code is implemented in a HAL (hardware abstraction layer).

By porting the eCos HAL to a new target the core functionality of eCos (infra, kernel, uITRON, etc) will be able to
run on the target. It may be necessary to add further platform specific code such as serial drivers, display drivers,
ethernet drivers, etc. to get a fully capable system.

This document is intended as a help to the HAL porting process. Due to the nature of a porting job, it is impossible
to give a complete description of what has to be done for each and every potential target. This should not be
considered a clear-cut recipe - you will probably need to make some implementation decisions, tweak a few things,
and just plain have to rely on common sense.

However, what is covered here should be a large part of the process. If you get stuck, you are advised
to read the ecos-discuss archive (http://sourceware.cygnus.com/ml/ecos-discuss/) where you may find
discussions which apply to the problem at hand. You are also invited to ask questions on the ecos-discuss
mailing list (http://sourceware.cygnus.com/ecos/intouch.html) to help you resolve problems - but as is
always the case with community lists, do not consider it an oracle for any and all questions. Use common
sense - if you ask too many questions which could have been answered by reading the documentation
(http://sourceware.cygnus.com/ecos/docs-latest/), FAQ (http://sourceware.cygnus.com/fom/ecos) or source code
(http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/?cvsroot=ecos), you are likely to be ignored.

This document will be continually improved by Red Hat engineers as time allows. Feedback and help with improv-
ing the document is sought, so if you have any comments at all, please do not hesitate to post them on ecos-discuss
(mailto:[email protected]?subject=[porting]<subject>) (please prefix the subject with [port-
ing]).

At the moment this document is mostly an outline. There are many details to fill in before it becomes complete.
Many places you’ll just find a list of keywords / concepts that should be described (please post on ecos-discuss if
there are areas you think are not covered).

All pages or sections where the caption ends in [TBD] contain little more than key words and/or random thoughts
- there has been no work done as such on the content. The word FIXME may appear in the text to highlight places
where information is missing.

HAL Structure

In order to write an eCos HAL it’s a good idea to have at least a passing understanding of how the HAL interacts
with the rest of the system.

203

Advertising