The MCIMX25X platform HAL package is loaded automatically when eCos is configured for the mcimx25x 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 platform HAL package supports three separate startup types:
This is the startup type which is normally used during application development. The board has RedBoot programmed into flash and boots into that initially. arm-eabi-gdb is then used to load a RAM startup application into memory and debug it. RAM applications can also be downloaded to the board, programmed into flash and then run from the RedBoot prompt. 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. The application will be self-contained with no dependencies on services provided by other software. An initialization table in the image header and eCos startup code will perform all necessary hardware initialization.
This startup type can be used for finished applications which will be loaded via JTAG. The application will be self-contained with no dependencies on services provided by other software. The JTAG init file plus eCos startup code will perform all necessary 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 board contains an 2Mbyte Macronix MX25L1605D SPI serial
NOR flash device. The
CYGPKG_DEVS_FLASH_SPI_M25PXX package contains
all the code necessary to support this part and the platform HAL
package contains definitions that customize the driver to the
board. This driver is not active until the generic
Flash support package,
included in the configuration.
This driver is capable of supporting the JFFS2
filesystem. However, note that the SPI interface means that this
file system has reduced bandwidth and increased latency compared
with other implementations. All that is required to enable the
support is to include the filesystem
CYGPKG_FS_JFFS2) and any of its package
CYGPKG_LINUX_COMPAT) together with the flash
The board uses the internal FEC Ethernet
device attached to an external Texas Instruments DP83640 PHY. The
CYGPKG_DEVS_ETH_FREESCALE_ENET package contains all the
code necessary to support this device and the platform HAL package
contains definitions that customize the driver to the
board. This driver is not active until the generic Ethernet support
CYGPKG_IO_ETH_DRIVERS, is included in
The board uses the i.MXxx internal watchdog.
contains all the code necessary to support this device. Within
that package the
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 board uses the i.MXxx internal UART serial support as described in the i.MXxx processor HAL documentation. Only one serial connector is available on the board, which is connected to UART1. This connector has the RTS/CTS hardware flow control lines connected in addition to the data lines.
ADC support is provided by the
CYGPKG_DEVS_ADC_ARM_TSC package. Only ADC
inputs INAUX0, INAUX1 and
INAUX2 are supported at present. In addition to
the TSC ADC device, this driver uses GPT1 to provide the sample
rate clock. Application code should avoid using this timer if the
ADC is to be used. This driver is only active if the generic ADC
CYGPKG_IO_ADC, is included in
LCD support is provided by the
CYGPKG_DEVS_FRAMEBUF_ARM_IMX package. It
supports a single frame buffer format, 640 by 480 pixels, 16 bits
per pixel true colour. The frame buffer is placed at a fixed
address in memory at 0x83F00000. This driver is only active if the
generic framebuffer support package,
CYGPKG_IO_FRAMEBUF, is included in the
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 are just three flags specific to this port:
The arm-eabi-gcc compiler supports many variants of the ARM architecture. A
-moption should be used to select the specific variant in use, and with current tools
-mcpu=arm926ej-sis the correct option for the ARM926EJ-S CPU in the i.MX25.
The arm-eabi-gcc compiler will compile C and C++ files into the Thumb instruction set when this option is used. The best way to build eCos in Thumb mode is to enable the configuration option
This option allows programs to be created that mix ARM and Thumb instruction sets. Without this option, some memory can be saved. This option should be used if -mthumb is used. The best way to build eCos with Thumb interworking is to enable the configuration option