ConfigurationNameConfiguration -- Platform-specific Configuration Options Overview The ADS512101 platform HAL package is loaded automatically when
eCos is configured for an ads512101 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.
Startup The ADS512101 platform HAL package supports four separate startup
types:
- RAM
This is the startup type which
is normally used during application development. The board has
ROMRAM RedBoot running from 0x00000000 and applications will be
loaded from 0x00100000.
powerpc-eabi-gdb is then 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. - ROM
This startup type can be used for finished applications which will
be programmed into flash at location 0xFFF00000. The application will
be self-contained with no dependencies on services provided by other
software. eCos startup code will perform all necessary hardware
initialization.
- ROMRAM
This startup type can be used for finished applications which
will be programmed into flash at location 0xFFF00000. The first
thing the application does is to relocate itself to RAM at
location 0x00000000. The application will be self-contained
with no dependencies on services provided by other
software. eCos startup code will perform all necessary hardware
initialization.
- JTAG
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
configuration option CYGSEM_HAL_USE_ROM_MONITOR
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.
Flash Driver The ADS512101 board contains 64MiB of flash memory. The
CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2 package
contains all the code necessary to support access to the
flash. The ADS512101 platform HAL package contains definitions
that customize the driver to the ADS512101 board.
System Clock By default, the system clock interrupts once every 10ms,
corresponding to a 100Hz clock. This can be changed by the
configuration option CYGNUM_HAL_RTC_DENOMINATOR
which corresponds to the clock frequency. Other clock-related
settings are recalculated automatically if the denominator is
changed.
Ethernet Driver The ADS512101 board uses the MPC5121e's internal FEC ethernet
device attached to an external PHY. The
CYGPKG_DEVS_ETH_POWERPC_FEC package contains
all the code necessary to support this device. The
CYGPKG_DEVS_ETH_POWERPC_ADS512101 package
contains definitions that customize the driver to the ADS512101
board. This driver is not active until the generic Ethernet
support package, CYGPKG_IO_ETH_DRIVERS, is
included in the configuration.
RTC Driver The ADS512101 board uses an ST M41T662 I2C Real Time Clock. The
CYGPKG_DEVICES_WALLCLOCK_ST_M41TXX package
contains all the code necessary to support this device. This
device also needs the CYGPKG_IO_I2C package to
be loaded. This driver is not active until the generic wallclock
device support package, CYGPKG_IO_WALLCLOCK, is
included in the configuration.
Watchdog Driver The ADS512101 board uses the MPC5121e's internal watchdog
support. The CYGPKG_DEVICES_WATCHDOG_MPC512X
package contains all the code necessary to support this
device. Within that package the
CYGNUM_DEVICES_WATCHDOG_POWERPC_MPC512X_DESIRED_TIMEOUT_MS
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
configuration.
UART Serial Driver The ADS512101 board uses the MPC5121e's Programmable Serial
Controllers (PSC's) configured for UART mode. Two serial UART
adaptors are available on the board. However, only PSC3 is
attached to a ( pin D-Sub connector. PSC4 is connected to header
P8.
I2C Driver The MPC512X HAL contains a driver for the I2C busses on the
board. There are several devices attached to the busses, of which,
only the RTC on Bus0 is actually used bt eCos.
CAN Driver The MPC512X contains four Freescale MSCAN devices, although only
one of these is brought out to an external connector. The package
CYGPKG_DEVS_CAN_MSCAN is a general driver for
the MSCAN, and the package
CYGPKG_DEVS_CAN_ADS512101 configures this for the
ADS512101 platform.
Compiler Flags 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:
- -mcpu=e300c3
The powerpc-eabi-gcc compiler supports many
variants of the PowerPC architecture.
A -m option should be used to select the specific
variant in use. The MPC5121e is a e300c4 processor, and the current
tools do not have an option to select this processor directly
so instead we select a processor that is identical as far as the compiler
is concerned, the e300c3.
|