Hal variant cdl – Comtrol eCos User Manual

Page 340

Advertising
background image

Chapter 11. Porting Guide

Note: Some CPU variants may require specific compiler support. That support must be in place before you
can undertake the eCos variant port.

HAL Variant CDL

The CDL in a variant HAL tends to depend on the exact functionality supported by the variant. If it implements
some of the devices described in the platform HAL, then the CDL for those will be here rather than there (for
example the real-time clock).

There may also be CDL to select options in the architecture HAL to configure it to a particular architectural variant.

Each variant needs an entry in the

ecos.db

file. This is the one for the SH3:

package CYGPKG_HAL_SH_SH3 {

alias

{ "SH3 architecture" hal_sh_sh3 }

directory

hal/sh/sh3

script

hal_sh_sh3.cdl

hardware

description

"

The SH3 (SuperH 3) variant HAL package provides generic

support for SH3 variant CPUs."

}

As you can see, it is very similar to the platform entry.

The variant CDL file will contain a package entry named for the architecture and variant, matching the package
name in the

ecos.db

file. Here is the initial part of the MIPS VR4300 CDL file:

cdl_package CYGPKG_HAL_MIPS_VR4300 {

display

"VR4300 variant"

parent

CYGPKG_HAL_MIPS

implements

CYGINT_HAL_MIPS_VARIANT

hardware

include_dir

cyg/hal

define_header hal_mips_vr4300.h

description

"

The VR4300 variant HAL package provides generic support

for this processor architecture. It is also necessary to

select a specific target platform HAL package."

This defines the package, placing it under the MIPS architecture package in the hierarchy. The

implements

line in-

dicates that this is a MIPS variant. The architecture package uses this to check that exactly one variant is configured
in.

The variant defines some options that cause the architecture HAL to configure itself to support this variant.

cdl_option CYGHWR_HAL_MIPS_64BIT {

display

"Variant 64 bit architecture support"

calculated 1

}

236

Advertising