13.5.4. Configuring where Angel runs

This section describes how to configure Angel to run from:

Link addresses

The makefile for angel.rom contains two makefile macros that control the addresses where Angel is linked:


This defines the base address for read/write areas, such as dataseg and bss (zero-initialized) areas, along with some assembler areas. Angel requires approximately 24KB of free RAM for its read/write areas.


This defines the base address for read-only areas. In general, read-only areas are code areas. Angel requires between 50 and 100KB of RAM for its read-only areas.

The target-specific configuration file devconf.h contains a number of macros that define the memory layout of the target board. It also contains checks to ensure that the values of RWADDR and ROADDR are sensible.

Most of these macros are only used within devconf.h (for the sanity checks, in the READ/WRITE_PERMITTED macros, and for defining application stack and heap areas), In addition, the macro ROMBase is used during startup to calculate the offset between the code currently executing in ROM and its eventual ROADDR destination.

ROM locations

Angel supports two types of ROM system:

  • ROM mapped to address 0 on reset, and mapped out to RAM during Angel bootstrap

  • ROM permanently mapped to address 0.

For the first type:

  1. Define ROMBase in devconf.h as the normal (mapped-out) address of the ROM.

  2. Set the ROM-only build variable in target.s to FALSE.

  3. Provide an assembler macro called UNMAPROM in target.s that maps the ROM away from 0.

  4. Declare the makefile macro FIRST as 'startrom.o(ROMStartup)', including the quote (') characters.

For the second type:

  1. Define ROMBase in devconf.h as 0.

  2. Set the ROMonly build variable in target.s to TRUE.

  3. Declare the makefile macro FIRST as 'except.o(__Vectors)', including the single quote (') characters.

Processor exception vectors

Regardless of where you declare RWADDR and ROADDR to be, the ARM processor requires the exception vector table to be located at zero. There are a number of situations where this happens by default, for example when RWADDR is set to 0, or in ROM-at-zero systems.

When this does not happen by default, Angel explicitly copies everything in AREA __Vectors from RWADDR to zero. All code within the __Vectors area must be position-independent, because it is linked to run at ROADDR, not zero.

In most configurations, Angel is able to detect a branch through zero by application code, and report it as an error. However, this is not possible in ROM-at-zero systems. In this case, a branch through zero causes:

  • a system reboot if the processor is executing in a privileged mode

  • a system crash if the processor is not executing in a privileged mode.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D