This documentation explains how the eCos HAL specification has been
mapped onto the AT91SAM7X-EK hardware, and should be read in conjunction
with that specification. The AT91SAM7X-EK platform HAL package complements
the ARM architectural HAL, the AT91 variant HAL and the AT91SAM7 processor
HAL. It provides functionality which is specific to the target board.
Startup
Following a hard or soft reset, the HAL will initialize or
reinitialize most of the on-chip peripherals. There is an exception
for RAM startup applications which depend on a ROM monitor or JTAG
device for certain services.
For ROM startup, the HAL will perform additional
initialization, setting up the PLL and programming the
various internal registers. This is all done in the
PLATFORM_SETUP1 macro in the assembler
header file hal_platform_setup.h.
Linker Scripts and Memory Maps
The AT91SAM7 processor HAL package provides the memory layout information needed
to generate the linker script. The key memory locations are as follows:
On-chip Flash
This is located at address 0x00100000 of the physical memory space.
On-chip RAM
This is located at address 0x00200000 of the physical memory
space. During booting this memory is only available at this address,
but during the boot process it is also remapped to location 0x00000000
in order to allow the hardware exception vectors to be in RAM.
The first 32 bytes are used for hardware exception vectors. The next
32 bytes are used for the VSR table and the next 256 bytes are normally
used for the eCos virtual vectors, allowing RAM-based applications to
use services provided by the ROM monitor. For ROM startup, all
remaining RAM is available. For RAM startup, available RAM starts at
location 0x00201000, with the bottom 4KiB reserved for use by
the GDB stubs.
On-chip Peripheral Registers
These are located at address 0xFF000000 in the physical memory
space.
Real-time characterization
The tm_basic kernel test gives statistics gathered about the real-time
characterization and performance of the kernel. The sample output is shown here
for information. The test was built in ARM mode, which provided better performance
than Thumb mode.
The AT91SAM7X-EK platform HAL does not affect the implementation of other
parts of the eCos HAL specification. The AT91SAM7 processor HAL, AT91
variant HAL, and the ARM architectural HAL documentation should be consulted
for further details.