ChorusOS 5.0 Board Support Package Developer's Guide

Overview of Creating a Board Support Package

This section contains a general overview of one of the ways of porting ChorusOS to a new target board within a reference target family. Each of the main steps refers to the part of the document that contains more detail on carrying out this step.

Creating a new Board Support Package
  1. Create a new BSP subtree (within the ChorusOS BSP source tree or in another location).

    Duplicate the files from the supported BSP that most resembles your new target: create source_dir/nucleus/bsp/family/my_board/* (see Chapter 3, Writing a New Board Support Package).

  2. Adapt the boot program for your target system.

    In most cases the boot.c program for the particular target family can be reused, as is, for your new board (see Chapter 4, The ChorusOS Boot Program).

  3. Adapt the reboot program for your target system.

    In most cases the reboot.c program for the particular target family can be reused, as is, for your new board (see Chapter 5, The ChorusOS Reboot Program).

  4. Adapt the BSP part of the debug agent for your target system.

    Typically this is the debug agent console driver, watchdog driver and board reset services: dbgBsp.c, uart.c and wdt.c files (see Chapter 6, Porting the Debug Agent and Hot Swap Support for more information on the dbgAgent).

  5. Adapt/write the power-up initialization code for the target board.

    Note that this step may be omitted or done later, if your target board has firmware which enables the ChorusOS operating system to be downloaded (see "Power-up Program Implementation").

  6. Adapt/create the ChorusOS operating system configuration files that are specific to the target board:

    target.xml and target_action.xml (see Chapter 7, Configuring the ChorusOS System Image).

  7. Write the code for the device drivers, if any additional ones are required.

    Note that as a minimum a timer driver is required for the system tick. The host bus bridge driver must also be available if the tick timer device is external to the processor. For more information on writing a device driver see Chapter 10, Writing a New Device Driver. For more information on writing a host bus driver see Chapter 11, Writing a New Bus Driver.

  8. Configure, build and test the ChorusOS system image, using the tools provided in the Sun Embedded Workshop: cdstool, configure, make or ews (see "Building and Build Tools" in ChorusOS 5.0 Source Delivery Guide).


Note -

A new BSP may be tested in two phases. You may initially want to build a system image that contains just the boot programs and a minimal set of drivers (for example, the tick timer). Once the first phase is successful, you can build a more complete system image that contains other required bus/device drivers. These can be added and tested one at a time.