13.1.1. Angel system features

Angel provides the following functionality:

These features are described below. See Figure 13.1 for an overview of the Angel components that provide this functionality.

Debug support

Angel provides the following basic debug support:

  • reporting memory and processor status

  • downloading applications to the target system

  • setting breakpoints.

Refer to Angel debugger functions for more information on how Angel performs these functions.

C library semihosting support

Angel uses a software interrupt (SWI) mechanism to enable applications linked with the ARM C and C++ libraries to make semihosting requests. Semihosting requests are requests such as open a file on the host, or get the debugger command-line, that must be communicated to the host to be carried out. These requests are referred to as semihosting because they rely on the C library of the host machine to carry out the request.

The ARM Software Development Toolkit provides prebuilt ANSI C libraries that you can link with your application. The toolkit provides 26 prebuilt library variants that are targeted to Angel. The libraries use the Angel SWI mechanism to request that specific C library functions, such as input/output, are handled by the host system.

These libraries are used by default when you link code that calls ANSI C library functions. Refer to Chapter 4 The C and C++ Libraries in the ARM Software Development Toolkit Reference Guide for more information.

Angel uses a single SWI to request semihosting operations. By default, the SWI is 0x123456 in ARM state and 0xab in Thumb state. You can change this number if required. Refer to Configuring Angel for more information.

If semihosting support is not required you can disable it by setting the $semihosting_enabled variable in the ARM debuggers.

Refer to Angel C library support SWIs for details of the Angel semihosting SWIs.

Communications support

Angel communicates using ADP, and uses channels to allow multiple independent sets of messages to share a single communications link. Angel provides an error-correcting communications protocol over:

  • Serial and serial/parallel connection from host to the target board, with Angel resident on the board.

  • Ethernet connection from the host to PID board, with Angel resident on the board. This requires the Ethernet Upgrade Kit (No. KPI 0015A), available separately from ARM Limited.

The host and target system channel managers ensure that logical channels are multiplexed reliably. The device drivers detect and reject corrupted data packets. The channel managers monitor the overall flow of data and store transmitted data in buffers, in case retransmission is required. Refer to Angel communications architecture for more information.

The full Angel Device Driver Architecture uses Angel task management functionality to control packet processing and to ensure that interrupts are not disabled for long periods of time.

You can write device drivers to use alternative devices for debug communication, such as a ROMulator. You can extend Angel to support different peripherals, or your application can address devices directly.

Task management

All Angel operations, including communications and debug operations, are controlled by Angel task management. Angel task management:

  • ensures that only a single operation is carried out at any time

  • assigns task priorities and schedules task accordingly

  • controls the Angel environment processor mode.

Refer to Angel task management for more information.

Exception handling

Angel exception handling provides the basis for each of the system features described above. Angel installs exception handlers for each ARM exception type except Reset:

SWI

Angel installs a SWI exception handler to support C library semihosting requests, and to allow applications and Angel to enter Supervisor mode.

Undefined

Angel uses three undefined instructions to set breakpoints in code. Refer to Setting breakpoints for more information.

Data, Prefetch Abort

Angel installs basic Data and Prefetch abort handlers. These handlers report the exception to the debugger, suspend the application, and pass control back to the debugger.

FIQ, IRQ

Angel installs IRQ and FIQ handlers that enable Angel communications to run off either, or both types of interrupt. If you have a choice you should use IRQ for Angel communications, and FIQ for your own interrupt requirements.

You can chain your own exception handlers for your own purposes. Refer to Chaining exception handlers for more information.

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