ChorusOS 4.0 Porting Guide

dbgBsp

The source code for generic serial device drivers can be found in the drv/src/dbg subtree. There are two files per driver: Bsp.h and a file defining the interface to platform specific functions. This interface is device driver dependent.

The dbgBsp platform-specific source code can be found in the /src/dbg directory tree.

A serial line device driver is platform independent. It depends only on a chip used for serial I/O. A serial line device driver calls a small number of platform dependent functions in order to access device registers. If a generic driver already exists for your platform, you only need to modify these functions. If no generic device driver exists for a chip on your platform, create one using the generic serial line device driver interface described in drv/src/dbg/dbgUart.h.

Example

This section describes a dbgBsp for the PowerPC Genesis-2 board. The source files for this example are in powerpc/genesis2/src/dbg. There are three files in this directory:

dbgBsp.c:

ns16550Bsp.c:

Imakefile: