Partager via


BSP Code Overview (Compact 7)

3/12/2014

To customize a board support package (BSP) to your device, you will need to modify some of the hardware-specific code. This section describes the main functions of the BSP. The descriptions include:

  • The typical location of the source code. (The exact location of the source code depends on the hardware platform that you are using.) The most typical directories are listed.

  • In some cases, a figure and a description of the calling sequence for a typical scenario. The figures are color-coded to indicate which functions are part of the kernel and which are part of the BSP. This distinction is important because it indicates which functions you need to implement. For example, you do not need to implement any kernel functions because Windows Embedded Compact provides the kernel.

  • The main functions for each component (such as flash memory, cache, and so on).

    Important

    Not all functions, configurations, or other supporting files that Windows Embedded Compact requires are listed below. If a function is listed, you may still have to customize the code to your particular implementation, and you will often need to explore lower-level methods that are called by the functions. For a detailed description of each function and configuration file, see Board Support Package (BSP).

Of the BSP functions, some functions are required and some are optional. (For more information, see Board Support Package (BSP) or the comments in the BSP template code in %_WINCEROOT%\Platform\BSPTemplate.) Many of these functions, both required and optional, are already implemented in the common PQOAL library. You can use this common code, or you can use a mix of common code and your own code by replacing the common library implementations as long as the interface matches that specified in the header files.

After you clone an existing BSP for the hardware platform that most closely matches your device, you may then want to pull in code for specific components from other sample BSPs. To find out if code exists that you can use with a particular component (such as the cache) on your hardware platform, first look at the directory names under %_WINCEROOT%\Platform\Common. The directory names will indicate whether code is common to all BSPs, CPUs within a CPU architecture, CPUs within a CPU family, or a particular SOC.

For example, there is cache code in a common directory for the ARM architecture and also in directories for different CPUs (such as ARM920T and ARM1136), and different SOCs (such as OMAP35xx_TPS659xx). Often, the comments in the code will provide useful information on which hardware the code supports. You can also search the Platform directory for a specific function and see which directory it is implemented in. The directory names imply the level of code commonality.

Note

In other topics within this guide, the %_WINCEROOT%\Platform directory is shortened to "Platform."

In This Section

  • BSP Code Organization
    Shows how the design of the BSP code modularizes and separates the code into hardware-specific code and non-hardware-specific code.
  • Boot Loader Code Overview
    Describes the boot loader code for startup, memory layout, serial debugging, download transport, and flash memory.
  • OAL Code Overview
    Describes the OEM adaptation layer (OAL) code for startup, memory layout, real-time clock, cache, timer, power management, serial debugging, interrupts, and module inclusion.
  • KITL Code Overview
    Provides an overview of the kernel independent transfer layer (KITL) start-up sequence.

See Also

Concepts

Bring Up a Hardware Platform