Platform hal – Comtrol eCos User Manual

Page 311

Advertising
background image

Chapter 11. Porting Guide

File

Description

include/var_arch.h

Saved register frame format, various thread, register and
stack related macros.

include/var_cache.h

Cache related macros.

include/var_intr.h

Interrupt related macros.

include/var_regs.h

Extra register definitions for the CPU variant.

include/variant.inc

Various assembly macros used during system
initialization.

src/var_intr.c

Interrupt functions if necessary.

src/var_misc.c

hal_variant_init function and any necessary extra
functions.

src/variant.S

Interrupt handler table definition.

src/

<

arch

>

_

<

variant

>

.ld

Linker macros.

Platform HAL

Extras files may be added for platform specific serial drivers. Extra files for handling interrupts and exceptions will
be present if it makes sense.

File

Description

include/hal_diag.h

Defines functions used for HAL diagnostics output.
This would normally be the ROM calling interface
wrappers, but may also be the low-level IO functions
themselves, saving a little overhead.

include/platform.inc

Platform initialization code. This includes memory
controller, vectors, and monitor initialization.
Depending on the architecture, other things may need
defining here as well: interrupt decoding, status register
initialization value, etc.

include/plf_cache.h

Platform specific cache handling.

include/plf_intr.h

Platform specific interrupt handling.

include/plf_io.h

PCI IO definitions and macros. May also be used to
override generic HAL IO macros if the platform
endianness differs from that of the CPU.

include/plf_stub.h

Defines stub initializer and board reset details.

src/hal_diag.c

May contain the low-level device drivers. But these may
also reside in plf_stub.c

src/platform.S

Memory controller setup macro, and if necessary
interrupt springboard code.

src/plf_misc.c

Platform initialization code.

src/plf_mk_defs.c

Used to export definitions from C header files to
assembler header files.

207

Advertising