BSP and CSP Directory Layout (Windows CE 5.0)
The board support package (BSP) and the chip support package (CSP) directory structures for the production-quality OAL parallel the Windows CE hardware library structure. This parallel structure makes it is easier to browse and understand what hardware platforms are supported and allows you to quickly locate code that implements a particular hardware platform.
The following directories have been revised for the production-quality OAL model:
%_WINCEROOT%\Platform\<Hardware Platform Name>
In the production-quality OAL model, the %_WINCEROOT%\Platform\<Hardware Platform Name> BSP directory contains only the following files and code:
- Memory-mapped configuration files
- Some include files that define the memory layout for the hardware platform that matches Config.bib
- Some glue logic, which is board-level customization code that unites everything in the %_WINCEROOT%\Platform\Common directory
The BSP directory layout is consistent for most BSPs.
%_WINCEROOT%\Platform\Common
The code in the %_WINCEROOT%\Platform\Common directory contains the CPU-specific OAL routines.
Note Any code that must include board descriptions or the way the board itself is laid out — such as interrupts, routing to traces, or the way the board makes use of the CPU — must be in the BSP directory, not in the %_WINCEROOT%\Platform\Common directory.
%_WINCEROOT%\Public\Common\Oak\CSP
The chip support package (CSP) directory, %_WINCEROOT%\Public\Common\Oak\CSP, contains a collection of system-on-a-chip (SOC) and CPU or chipset-level peripheral drivers. You can port the CSP driver for a core peripheral to any new hardware platform environment that makes use of the SOC or chipset without modification.
\Platform\<Hardware Platform Name>
For the production-quality OAL, each hardware platform directory contains the code you need to build the boot loader and the three kernel images: Kern, Kernkitl, and KernKitlProf. Except for the Src directory, no hardware platform files and directories have changed from previous versions of Windows CE. This avoids backward compatibility issues and build problems.
The following table shows the subdirectories under the %_WINCEROOT%\Platform\<Hardware Platform Name> directory.
\Platform\<Hardware Platform Name> subdirectory | Description |
---|---|
Cesysgen | Contains a makefile for filtering any of the configuration files in the Files directory. |
Files | Contains project-specific files for building the run-time image, initial directory structure, initialized databases, and initialized registry. |
Src | Contains the boot loader, OAL, and include files for the hardware platform. |
Src\Bootloader | Contains all the boot loader specific code. |
Src\Bootloader\Eboot | Contains the boot loader source files. |
Src\Common | Contains all the code common to the boot loader and OAL. |
Src\Drivers | Contains the local BSP drivers. |
Src\Inc | Contains hardware platform-specific include files. |
Src\Kernel | Contains device-specific source code files for building and linking the kernel and OAL. |
Src\Kernel\Kern | Contains build files, and possibly stub functions, for building the basic kernel image. |
Src\Kernel\Kernkitl | Contains build files, and possibly stub functions, for building a kernel with Kernel Independent Transport Layer (KITL) support. |
Src\Kernel\Kernkitlprof | Contains build files, and possibly stub functions, for building a kernel with KITL and profiling support. |
Src\Kernel\OAL | Contains the hardware platform-specific OAL code. |
\Platform\Common
For the production-quality OAL, this directory contains entries for each processor family, the common OAL code, and the include files for the OAL components. The processor families are ARM, MIPS, and x86.
The %_WINCEROOT%\Platform\Common directory is divided by CPU architecture. Each CPU architecture directory is further divided into more specific architecture information, such as the CPU family or the CPU manufacturer. As you navigate down the directory tree, the directories become more CPU architecture-specific. For example, the ARM\ARM920T tree contains cache and data abort routines for the ARM920T CPU, and the ARM\ARM926 tree contains the cache routines for the ARM926 CPU. Code can also be inherited from the directories that are further up in the tree.
Although you might want to override some of the code in the %_WINCEROOT%\Platform\Common directory for performance reasons, overall, the code should work without modification. You do not have to copy any of the code in this directory unless necessary. Typically, you should include the library from the particular location in the %_WINCEROOT%\Platform\Common directory in your %_WINCEROOT%\Platform\<Hardware Platform Name> sources file.
The following table shows the subdirectories under the %_WINCEROOT%\Platform\Common directory.
\Platform\Common subdirectory | Description |
---|---|
Lib | Contains libraries required to build your project.
The libraries are in directories with the following formats:
An example is: ARMV4I\Retail.
|
Src | Contains header files, common OAL code, and processor specific OAL code. |
Src\ARM | Contains the ARM processor-specific OAL code. |
Src\ARM\ARM920T | Contains all the CPU OAL code required for the ARM920T processor. |
Src\ARM\ARM920T\Abort | Contains the abort routines specific to the ARM920T CPU. |
Src\ARM\ARM920T\Cache | Contains the cache routines specific to the ARM920T CPU. |
Src\ARM\ARM926 | Contains the CPU OAL code required for the ARM926 processor. |
Src\ARM\ARM926\Cache | Contains the cache routines specific to the ARM926 CPU. |
Src\ARM\Common | Contains routines that are generic to ARM-based hardware platforms. |
Src\ARM\Common\Cache | Contains the cache routines that are common for all ARM CPUs. |
Src\ARM\Common\Memory | Contains the memory translation routines that are common for all ARM CPUs.
The memory routines are used for translating physical addresses to physical addresses, and vice versa. |
Src\ARM\Inc | Contains include files that are generic to all ARM CPUs. |
Src\ARM\Intel | Contains the OAL code specific to the Intel hardware platform. |
Src\ARM\Intel\PXA250 | Contains routines specific to the PXA250 processor. |
Src\ARM\Intel\PXA27x | Contains routines specific to the PXA27x processor. |
Src\ARM\Intel\SA1100 | Contains routines specific to the SA1100 processor. |
Src\ARM\Samsung | Contains the OAL code specific to the Samsung hardware platform. |
Src\ARM\Samsung\S3C2410x | Contains routines specific to the S3C2410x processor. |
Src\Common | Contains OAL code that is generic across all CPU architectures.
For more information about each of these components, see Production-Quality OAL Components. |
Src\Common\Boot | Contains generic boot arguments. |
Src\Common\Cache | Contains code for generic cache routines. |
Src\Common\CEDDK | Contains code used for the Ceddk.dll library. |
Src\Common\EthDrv | Contains code for the generic Ethernet drivers, which is used for debugging. |
Src\Common\Flash | Contains generic flash memory code. |
Src\Common\Ilt | Contains generic ILTiming code. |
Src\Common\Intr | Contains interrupt code that is generic for all CPUs.
This contains code that performs translations between SYSINTRs and IRQs. |
Src\Common\IO | Contains generic I/O routines for all CPUs. |
Src\Common\IOCTL | Contains generic IOCTLs for all CPUs. |
Src\Common\KeyValue | Contains code for maintaining key-value pairs. |
Src\Common\KITL | Contains code for generic KITL routines. |
Src\Common\Log | Contains code used for logging. |
Src\Common\PCI | Contains generic PCI routines. |
Src\Common\PerReg | Contains generic performance register code. |
Src\Common\Power | Contains generic power management code. |
Src\Common\RTC | Contains generic RTC code. |
Src\Common\Timer | Contains generic timer or system tick code. |
Src\Common\Watson | Contains generic Windows CE Error Reporting code. |
Src\Inc | Contains all the header files that export OAL components.
|
Src\MIPS | Contains the MIPS processor-specific OAL code. |
Src\MIPS\AMD | Contains all the CPU OAL code required for the AMD Au1XXX processors. |
Src\MIPS\Broadcom | Contains all the CPU OAL code required for the Broadcom processor. |
Src\MIPS\Common | Contains routines that are generic to MIPS-based hardware platforms. |
Src\MIPS\Inc | Contains include files that are generic to all MIPS CPUs. |
Src\MIPS\MIPS32 | Contains all the CPU OAL code required for the MIPS32 processor. |
Src\MIPS\NEC | Contains all the CPU OAL code required for the NEC VrXXX processors. |
Src\x86 | Contains the x86 processor specific OAL code. |
Src\x86\Common | Contains routines that are generic to x86-based hardware platforms. |
Src\x86\Inc | Contains include files that are generic to all x86 CPUs. |
\Public\Common\Oak\CSP
For the production-quality OAL, CSP drivers are in a common CSP directory along with an organized array of include files that describe the register layouts and common hardware definitions. CSP drivers and BSP code share the same include files, which are under the SOC or chipset model's Inc subdirectory.
The CSP directory structure, under the %_WINCEROOT%\Public\Common\Oak directory, has the format CSP\<CPU Architecture>\<SOC or Chipset Model Number>\<Driver Function>.
For more information, see CSP Drivers.
See Also
Device Driver Libraries | Production-Quality OAL
Send Feedback on this topic to the authors