SoC
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
  • Arm Cortex M3
  • Contact
Reading: ARM Embedded Application Binary Interface
SUBSCRIBE
SoCSoC
Font ResizerAa
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Search
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Have an existing account? Sign In
Follow US
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
© S-O-C.ORG, All Rights Reserved.
Arm

ARM Embedded Application Binary Interface

Graham Kruk
Last updated: September 8, 2023 9:53 am
Graham Kruk 6 Min Read
Share
SHARE

The ARM Embedded Application Binary Interface (EABI) is a standard that defines how executable code interacts with the system software and hardware on ARM-based processors. It specifies details like calling conventions, register usage, stack organization, and data type representations to enable compatibility between different compilers, operating systems, and applications running on ARM devices.

Contents
BackgroundMain ComponentsCalling ConventionsFunction ABIBase Data TypesAggregate Data TypesRegister UsageStack UsageException HandlingImpactVersionsOngoing Development

Background

In the early days of ARM processors, there were no standards for writing code. Each compiler vendor had their own conventions and assumptions. This meant that object code generated by one compiler often could not work with code from another compiler, or with different operating systems. There was no binary compatibility.

To address this problem, ARM introduced the Embedded Application Binary Interface in 2006. It provided a consistent set of interfaces that all parties could rely on when building their compilers, operating systems, and applications. This enabled greater interoperability and helped accelerate the adoption of ARM in embedded devices.

Main Components

The EABI standard defines conventions in several key areas:

Calling Conventions

The calling conventions specify how subroutines receive parameters from the caller and return values back to the caller. This covers details like:

  • Which registers are used to pass the first few parameters
  • Which registers must be preserved by callee functions
  • How the stack is used for additional parameters
  • Who is responsible for removing parameters from the stack after calls

Following consistent conventions enables separately compiled code to interoperate correctly.

Function ABI

The function ABI defines how functions interact with the calling environment, covering aspects like:

  • Frame pointer register usage
  • Stack frame organization
  • Stack alignment
  • Use of link register

This allows unwinding stack frames, debugging, and exception handling to work reliably across different compilers.

Base Data Types

The base data types specify standard storage sizes and binary representations for fundamental data types like integers, floating point values, and pointers. For example:

  • int is 32-bit
  • long int is 32-bit
  • long long int is 64-bit
  • float is 32-bit IEEE 754
  • double is 64-bit IEEE 754

This ensures consistent in-memory layout of data structures and calling semantics across languages and compilers.

Aggregate Data Types

Aggregate types like structures and arrays have additional ABI rules governing their alignment, padding, and endianness. This ensures that composite types maintain their expected layouts when accessed from different language or compiler environments.

Register Usage

The EABI specifies standard purposes for certain general purpose registers. For example, ip is expected to be used as an inter-procedural scratch register. This allows compilers to generate better code knowing that certain registers have defined usages across boundaries.

Stack Usage

The ABI defines important aspects related to use of the stack like direction of growth, alignment, and organization of stack frames. It also defines a dedicated stack limit register that code can query for bounds checking.

Exception Handling

The EABI specifies mechanisms for exception handling and unwinding using frame pointers. This enables languages like C++ that rely on exception handling to work properly across different compilers and operating systems.

Impact

Adoption of EABI has brought significant benefits:

  • Compilers can generate compliant object code, enabling interoperability
  • Source code can be compiled with different EABI compilers
  • Libraries built with one compiler can be reused by others
  • Operating systems adhere to the conventions, improving reliability
  • Debuggers and tools work seamlessly across compiler boundaries
  • Applications are portable across OS and hardware platforms

This has accelerated ARM’s growth in embedded systems by cultivating a healthy cross-vendor ecosystem of compatible software.

Versions

There have been several major versions of the ARM EABI standard:

  • EABI baseline – Introduced in 2005
  • EABI v2 – Added support for C++ exception handling and stack limit registers
  • EABI v3 – Removed frame pointer requirement for simpler cores
  • EABI v4 – Relaxed float-argument passing rules
  • EABI v5 – Further simplifications for microcontroller profile

Within each major version, there are also architecture variants like the standard ARM core profile, the microcontroller profile, and profiles for architectures like Thumb2 and M-profile. This allows customization of the ABI for different ARM core types while retaining overall compatibility.

Ongoing Development

ARM continues evolving the EABI specifications to support new features and simplify adoption for a wider range of devices:

  • Support for 64-bit architectures like ARMv8-A
  • Extended parameter passing conventions
  • AArch32 virtualization extensions
  • armv8.1 atomics and memory model extensions
  • Relaxed exception propagation and unwinding requirements

The ABI gives software providers a stable target for compatibility across the extensive ARM ecosystem. With over 100 billion ARM chips shipped to date in everything from mobile to automotive and IoT devices, this unified ABI foundation has been essential for the architecture’s reach.

Newsletter Form (#3)

More ARM insights right in your inbox

 


Share This Article
Facebook Twitter Email Copy Link Print
Previous Article ARM Cortex M0 Instruction Execution Time
Next Article Application Binary Interface Examples
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

2k Followers Like
3k Followers Follow
10.1k Followers Pin
- Sponsored-
Ad image

You Might Also Like

How to Program ARM Cortex M4

The ARM Cortex M4 is a powerful 32-bit processor optimized…

5 Min Read

Tradeoffs Between Clock Frequency and Timing Closure in Arm Cortex M1

The Arm Cortex M1 processor is designed to provide high…

9 Min Read

What is arm Cortex-M23?

The ARM Cortex-M23 is a 32-bit processor core designed for…

5 Min Read

What is Memory Protection Unit (MPU) in ARM Cortex?

The Memory Protection Unit (MPU) in ARM Cortex processors provides…

7 Min Read
SoCSoC
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
Welcome Back!

Sign in to your account