Configuration — Platform-specific Configuration Options
The MPC8309KIT platform HAL package is loaded automatically when
eCos is configured for an
mpc8309kit target. It
should never be necessary to load this package
explicitly. Unloading the package should only happen as a side
effect of switching target hardware.
The MPC8309KIT platform HAL package supports three separate startup types:
- This is the startup type which is normally used during application development. The board has ROM RedBoot using RAM from 0x00000000 and applications will be loaded from 0x00100000. powerpc-eabi-gdb is used to load a RAM startup application into memory and debug it. It is assumed that the hardware has already been initialized by RedBoot. By default the application will use the eCos virtual vectors mechanism to obtain certain services from RedBoot, including diagnostic output.
- This startup type can be used for finished applications which will be programmed into flash at location 0xFE000000. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization.
This startup type can be used for finished applications which will be loaded into external RAM via a JTAG debugger. The application will be self-contained with no dependencies on services provided by other software. The JTAG debugger should initialize the hardware enough to load the code into RAM, eCos startup code will perform any further hardware initialization.
RedBoot and Virtual Vectors
If the application is intended to act as a ROM monitor, providing
services for other applications, then the configuration option
CYGSEM_HAL_ROM_MONITOR should be set. Typically
this option is set only when building RedBoot.
If the application is supposed to make use of services provided by
a ROM monitor, via the eCos virtual vector mechanism, then the
should be set. By default this option is enabled when building for
a RAM startup, disabled otherwise. It can be manually disabled for
a RAM startup, making the application self-contained, as a testing
step before switching to ROM startup.
If the application does not rely on a ROM monitor for diagnostic services then the serial port will be claimed for HAL diagnostics.
The MPC8309KIT board contains 8MiB of flash memory. The
contains all the code necessary to support access to the
flash. The MPC8309KIT platform HAL package contains definitions
that customize the driver to the MPC8309KIT board.
By default, the system clock interrupts once every 10ms,
corresponding to a 100Hz clock. This can be changed by the
which corresponds to the clock frequency. Other clock-related
settings are recalculated automatically if the denominator is
The MPC8309KIT board uses the QUICC Engine UCC UEC1 Ethernet
device attached to an external PHY. The
CYGPKG_DEVS_ETH_POWERPC_UEC package contains
all the code necessary to support this device. This driver only
supports a single Ethernet interface at present: the RJ-45 socket
on the SOM board. This driver is not active until the generic
Ethernet support package,
CYGPKG_IO_ETH_DRIVERS, is included in the
supports the MPC8309 RTC device. The driver supports only clocking
from the 32kHz RTC input clock. This driver is not active until
the generic wallclock device support package,
CYGPKG_IO_WALLCLOCK, is included in the
The MPC8309KIT board uses the MPC8309 internal watchdog
support. This device is compatible with the watchdog on the
MPC512X family and so shares that device driver. The
contains the code necessary to support this device. Within that
configuration option controls the watchdog timeout, and by default
will force a reset of the board upon timeout. This driver is not
active until the generic watchdog device support package,
CYGPKG_IO_WATCHDOG, is included in the
UART Serial Driver
The MPC8309KIT board uses the 16X5X compatible serial DUARTs. Two
serial UART adaptors are available on the board. Only UART0 is
actually brought out to a usable DB9 external connector via an
RS232 transceiver; UART1 is delivered to the second DB9 via an
RS485 transceiver. The generic 16X5X driver
CYGPKG_IO_SERIAL_GENERIC_16X5X supports the
16X5X compatible DUARTs. The package
definitions to configure the generic driver to the board.
The MPC512X HAL contains a driver for the I²C busses on the
board. There are several devices attached to the busses, see the
board documentation for a description. The file
mpc512x_i2c.c and the header
plf_io.h contain definitions for some of
these devices. The test programs
pca9534_2.c contain tests that exercise
the I²C bus by flashing the LEDs on the carrier board.
The platform HAL defines the default compiler and linker flags for all packages, although it is possible to override these on a per-package basis. Most of the flags used are the same as for other architectures supported by eCos. There is one flag specific to this port:
The powerpc-eabi-gcc compiler
supports many variants of the PowerPC architecture. A
-moption should be used to select the specific variant in use. The MPC8309 contains an e300c3 processor, and this option allows the compiler to optimize code for this processor variant.
|2019-09-17||eCosPro Non-Commercial Public License|