Skip to main content

IAR Embedded Workbench for Arm 9.70.x

AEABI compliance

In this section:

The IAR build tools for Arm support the Embedded Application Binary Interface for Arm, AEABI, defined by Arm Limited. This interface is based on the Intel IA64 ABI interface. The advantage of adhering to AEABI is that any such module can be linked with any other AEABI-compliant module, even modules produced by tools provided by other vendors.

The IAR build tools for Arm support the following parts of the AEABI:

AAPCS

Procedure Call Standard for the 32-bit Arm architecture

CPPABI

C++ ABI for the 32-bit Arm architecture

AAELF

ELF for the 32-bit Arm architecture

AADWARF

DWARF for the 32-bit Arm architecture

RTABI

Runtime ABI for the 32-bit Arm architecture

CLIBABI

C library ABI for the 32-bit Arm architecture

AAPCS64

Procedure Call Standard for the 64-bit Arm architecture

VFABIA64

Vector function application binary interface specification for the 64-bit Arm architecture

ELF64

ELF for the 64-bit Arm architecture

DWARF64

DWARF for the 64-bit Arm architecture

CPPABI64

C++ ABI for the 64-bit Arm architecture

The IAR build tools only support a bare metal platform, that is a ROM-based system that lacks an explicit operating system.

Note:

  • The AEABI is specified for C89 only

  • The AEABI does not specify C++ library compatibility

  • Neither the size of an enum or of wchar_t is constant in the AEABI.

  • 64-bit Arm has no runtime ABI or a C ABI. Therefore, the compiler option ‑‑aeabi has no effect in 64-bit mode.

If AEABI compliance is enabled, certain preprocessor constants become real constant variables instead.

Linking AEABI-compliant modules using a third-party linker

If you have a module produced using the IAR C/C++ Compiler and you plan to link that module using a linker from a different vendor, that module must be AEABI-compliant, see Enabling AEABI compliance in the compiler.

In addition, if that module uses any of the IAR-specific compiler extensions, you must make sure that those features are also supported by the tools from the other vendor. Note specifically:

  • Support for the following extensions must be verified: #pragma pack, __no_init, __root, and __ramfunc

  • The following extensions are harmless to use: #pragma location/@, __arm, __thumb, __svc, __irq, __fiq, and __nested.

Enabling AEABI compliance in the compiler

You can enable AEABI compliance in the compiler by setting the ‑‑aeabi option. In this case, you must also use the ‑‑guard_calls option.

Caution

In the IDE, use the Project>Options>C/C++ Compiler>Extra Options page to specify the ‑‑aeabi and ‑‑guard_calls options.

Danger

On the command line, use the options ‑‑aeabi and ‑‑guard_calls to enable AEABI support in the compiler.

Alternatively, to enable support for AEABI for a specific system header file, you must define the preprocessor symbol _AEABI_PORTABILITY_LEVEL to non-zero prior to including a system header file, and make sure that the symbol AEABI_PORTABLE is set to non-zero after the inclusion of the header file:

#define _AEABI_PORTABILITY_LEVEL 1
#undef _AEABI_PORTABLE
#include <header.h>
#ifndef _AEABI_PORTABLE
 #error "header.h not AEABI compatible"
#endif