13.4.2. Overview of porting steps and recommendations

These are the steps required in the porting process:

  1. Choose a target template.

  2. Set up the makefile or APM project file.

  3. Perform a trial build using the template files.

  4. Modify target specific files.

  5. Define the target macros.

  6. Write the device drivers.

  7. Build for the new target.

  8. Download your Angel port to the target.

  9. Debug your Angel port.

These steps are explained in more detail below, together with some recommendations that might be useful when porting Angel to any new hardware.

Choosing a target template

The first step in the porting process is to select a target template. If you are basing your port on an ARM-supplied Angel port, it is recommended that you use the PID port as a starting point.

The PID board is a complex system with a varied memory map comprising:


  • ROM, and Flash memory

  • two serial and one parallel communications channels

  • two PC card slots.

There are also memory-mapped peripherals such as dual timers. The peripherals conform to the ARM Reference Peripheral Specification. The system has a memory remap facility.

Setting up makefiles and APM project templates

After you have copied your template directory pair, you must set up the makefile or APM project template to reflect your new directory structure. In addition you must set a number of build options to suit your requirements.

You can build Angel on the following platforms:

  • Solaris 2.5 or 2.6

  • HPUX 10

  • Windows 95 or 98

  • Windows NT 4.0.

Refer to Modifying the UNIX makefile for information on modifying a UNIX makefile or Modifying an APM project for information on setting up the ARM Project Manager project for your build.

Performing a trial build

When you have set up the makefile or APM project for your development directory structure you should perform a trial build to ensure that the modifications are complete, and that all necessary project build files have been copied correctly.

Modifying target specific files

The PID Angel port includes a number of target specific source files that you must modify to support your hardware and environment. You should examine each of the target specific files described in Modifying target-specific files.

You must pay particular attention to the following:

Defining the device configuration in devconf.h

You should take a great deal of care to modify this file correctly. Time spent checking at this stage will save a lot of debug time later. You must ensure that you define support only for features that are supported by your hardware.

For example, if you select DCC Support for a non-DI core, such as the ARM710a, Angel calls a subroutine to poll a coprocessor. This halts Angel on an undefined instruction trap.

In addition, you must:

  • define a complete memory map for your implementation

  • allocate stack space for each processor mode used by Angel

  • ensure that interrupts are used in the same way as for production hardware.

It is recommended that Angel interrupts are handled by the IRQ.

Refer to devconf.h for more information on modifying this file.

Defining the target macros in target.s

The GETSOURCE macro returns the current interrupt source. These are target dependent and must correspond to the target peripherals. The interrupt sources are defined in devconf.h. You must ensure that all interrupt sources used by Angel are supported by the GETSOURCE macro.

Refer to target.s for more information.

Writing the device drivers

Writing device drivers for your hardware is the major part of the porting procedure and is completely target-dependent. Refer to Writing the device drivers for information on writing device drivers.

Downloading Angel

After you have completed your Angel port you must download it to your hardware. There are a number of methods you can use to do this. Refer to Downloading a new version of Angel for more information.

Debugging your Angel port

At various stages throughout the porting process you will need to debug your Angel port. Only the initial stages of development can be debugged under the ARMulator because the ARMulator environment does not support communications with peripheral devices. Refer to Debugging your Angel port for more information on debugging Angel.

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