Chapter 9. hal interfaces, Base definitions, Byte order – Comtrol eCos User Manual

Page 281: Label translation, Base types, Hal interfaces

Advertising
background image

Chapter 9. HAL Interfaces

This section describes the main HAL interfaces.

Base Definitions

These are definitions that characterize the properties of the base architecture that are used to compile the portable
parts of the kernel. They are concerned with such things a portable type definitions, endianness, and labeling.

These definitions are supplied by the

cyg/hal/basetype.h

header file which is supplied by the architecture HAL.

It is included automatically by

cyg/infra/cyg_type.h

.

Byte order

CYG_BYTEORDER

This defines the byte order of the target and must be set to either

CYG_LSBFIRST

or

CYG_MSBFIRST

.

Label Translation

CYG_LABEL_NAME(name)

This is a wrapper used in some C and C++ files which use labels defined in assembly code or the linker

script. It need only be defined if the default implementation in

cyg/infra/cyg_type.h

, which passes the

name argument unaltered, is inadequate. It should be paired with

CYG_LABEL_DEFN()

.

CYG_LABEL_DEFN(name)

This is a wrapper used in assembler sources and linker scripts which define labels. It need only be defined

if the default implementation in

cyg/infra/cyg_type.h

, which passes the name argument unaltered, is

inadequate. The most usual alternative definition of this macro prepends an underscore to the label name.

Base types

cyg_halint8

cyg_halint16

cyg_halint32

cyg_halint64

cyg_halcount8

cyg_halcount16

cyg_halcount32

cyg_halcount64

cyg_halbool

177

Advertising