2.3.64. FAILINC

Causes an abnormal exit from processing an INCLUDE file.

Syntax

FAILINC "string"

where:

string

A string to display that explains the reason for aborting the INCLUDE file.

Description

The FAILINC command enables you to abort processing an INCLUDE file. You might do this when checks of the target or debugger environment have failed to find resources the INCLUDE file requires.

Use the string parameter to explain the abort.

Example

The following example shows how to use the FAILINC command in a macro:

if ( *((char*)(0xffe00)) != 0 )
  $failinc "Peripheral not initialized. Aborting$";

The following example shows how to use the FAILINC command in an INCLUDE file:

jump nofail,( *((char*)(0xffe00)) == 0 )
failinc "Peripheral not initialized. Aborting"
:nofail

These two examples test a memory address, expecting to read a 0 from some peripheral register. If it does not read 0, it aborts INCLUDE file processing.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111