Hal platform cdl, Ecos database, The section called hal platform cdl – Comtrol eCos User Manual

Page 330: The section called ecos, Database

Advertising
background image

Chapter 11. Porting Guide

Being able to display memory content, CPU registers, interrupt controller details at the time of an interrupt can
save a lot of time.

Using assertions is a good idea. They can sometimes reveal subtle bugs or missing features long before you
would otherwise have found them, let alone notice them.

The default eCos configuration does not use assertions, so you have to enable them by switching on the option

CYGPKG_INFRA_DEBUG

in the infra package.

The idle loop can be used to help debug the system.

Triggering clock from the idle loop is a neat trick for examining system behavior either before interrupts are
fully working, or to speed up "the clock".

Use the idle loop to monitor and/or print out variables or hardware registers.

hal_mk_defs is used in some of the HALs (ARM, SH) as a way to generate assembler symbol definitions from
C header files without imposing an assembler/C syntax separation in the C header files.

HAL Platform CDL

The platform CDL both contains details necessary for the building of eCos, and platform-specific configuration
options. For this reason the options differ between platforms, and the below is just a brief description of the most
common options.

See Components Writers Guide for more details on CDL. Also have a quick look around in existing platform CDL
files to get an idea of what is possible and how various configuration issues can be represented with CDL.

eCos Database

The eCos configuration system is made aware of a package by adding a package description in

ecos.db

. As an

example we use the

TX39/JMR3904

platform:

package CYGPKG_HAL_MIPS_TX39_JMR3904 {

alias

{ "Toshiba JMR-TX3904 board" hal_tx39_jmr3904 tx39_jmr3904_hal }

directory hal/mips/jmr3904

script

hal_mips_tx39_jmr3904.cdl

hardware

description "

The JMR3904 HAL package should be used when targeting the

actual hardware. The same package can also be used when

running on the full simulator, since this provides an

accurate simulation of the hardware including I/O devices.

To use the simulator in this mode the command

‘target sim --board=jmr3904’ should be used from inside gdb."

}

226

Advertising