Cdl file layout – Comtrol eCos User Manual
Page 331

Chapter 11. Porting Guide
This contains the title and description presented in the Configuration Tool when the package is selected. It also
specifies where in the tree the package files can be found (
directory
) and the name of the CDL file which
contains the package details (
script
).
To be able to build and test a configuration for the new target, there also needs to be a
target
entry in the
ecos.db
file.
target jmr3904 {
alias
{ "Toshiba JMR-TX3904 board" jmr tx39 }
packages
{ CYGPKG_HAL_MIPS
CYGPKG_HAL_MIPS_TX39
CYGPKG_HAL_MIPS_TX39_JMR3904
}
description "
The jmr3904 target provides the packages needed to run
eCos on a Toshiba JMR-TX3904 board. This target can also
be used when running in the full simulator, since the simulator 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."
}
The important part here is the
packages
section which defines the various hardware specific packages that con-
tribute to support for this target. In this case the MIPS architecture package, the TX39 variant package, and the
JMR-TX3904 platform packages are selected. Other packages, for serial drivers, ethernet drivers and FLASH
memory drivers may also appear here.
CDL File Layout
All
the
platform
options
are
contained
in
a
CDL
package
named
CYGPKG_HAL_
<
architecture
>
_
<
variant
>
_
<
platform
>
.
They
all
share
more
or
less
the same
cdl_package
details:
cdl_package CYGPKG_HAL_MIPS_TX39_JMR3904 {
display
"JMR3904 evaluation board"
parent
CYGPKG_HAL_MIPS
requires
CYGPKG_HAL_MIPS_TX39
define_header hal_mips_tx39_jmr3904.h
include_dir
cyg/hal
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."
compile
platform.S plf_misc.c plf_stub.c
define_proc {
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H
<
pkgconf/hal_mips_tx39.h
>
"
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H
<
pkgconf/hal_mips_tx39_jmr3904.h
>
"
}
227