arm gcc toolchain as arm-elf or arm-none-eabi, what is the difference?
Asked Answered
G

4

72

When you build a gcc toolchain there is the possibility to build it as arm-elf or as arm-none-eabi, but what is the difference?

I use the eabi today, but that is just since everyone else seem to do that... but since that is a really bad argument, it would be really nice to understand the difference.

Note: This toolchain will crosscompile code for Cortex-M3 based mcu:s like the stm32.

Thanks


Some links:

EABI:

ELF:

Gurias answered 11/5, 2011 at 9:1 Comment(2)
For less deeply embedded use, look at debian.Cheryl
https://mcmap.net/q/269011/-what-is-the-difference-between-arm-linux-gcc-and-arm-none-linux-gnueabiZuber
W
45

Each architecture or architecture/os couple has an ABI. The ABI (Application binary Interface) describes how functions should be called, syscalls numbers, arguments passed, which registers can be used ...

The abi describes how the compiler should generate the assembly.

If you use only assembler you don't need to care about the ABI.

arm-elf and arm-none-eabi just use two versions of the Arm ABI. The eabi toolchain uses a newer revision, but could also be called arm-elf-eabi, as it generates elf too.

Williamwilliams answered 15/5, 2011 at 7:46 Comment(0)
U
62

Here is an excellent doc.

Tool chains have a loose name convention like arch [-vendor] [-os] - eabi

 arch -    refers to target architecture (which in our case is ARM)
 vendor -  refers to toolchain supplier
 os -      refers to the target operating system
 eabi -    refers to Embedded Application Binary Interface

some illustrations as follows :

  • arm-none-eabi - This tool chain targets for ARM architecture, has no vendor, does not target an operating system and complies with the ARM EABI.
  • arm-none-linux-gnueabi - This toolchain targets the ARM architecture, has no vendor, creates binaries that run on the Linux operating system, and uses the GNU EABI. It is used to target ARM-based Linux systems.
Unarmed answered 17/4, 2015 at 16:30 Comment(3)
This post is 100% external content, though since 47 people found it helpful, the source is mentioned and the original post is dead, I don't think we should delete this answer. I have fixed the formatting to clarify that the post is just one big quote, not to be mistaken for plagiarism. I also did a rollback of grammar/spelling changes of quoted content.Eugenie
What does it mean "does not target an operating system"? It still compiles to some OS-specific executable format (probably Linux), doesn't it?Sociality
@Sociality No, it's bare metal.M
W
45

Each architecture or architecture/os couple has an ABI. The ABI (Application binary Interface) describes how functions should be called, syscalls numbers, arguments passed, which registers can be used ...

The abi describes how the compiler should generate the assembly.

If you use only assembler you don't need to care about the ABI.

arm-elf and arm-none-eabi just use two versions of the Arm ABI. The eabi toolchain uses a newer revision, but could also be called arm-elf-eabi, as it generates elf too.

Williamwilliams answered 15/5, 2011 at 7:46 Comment(0)
L
37

As I know:

arm-elf toolchain generates obj code for some OS which support executing elf format (example linux ABI). OS will control executing of your program.

arm-none-eabi toolchain generates obj code for micro-controllers or microprocessors (for bare metal, this will be EABI - embedded ABI). This code are downloaded to clean flash of MC and core of MC start executing it after power-on. No OS, extended command set, no possibility for linking with shared modules.

Lousy answered 13/6, 2013 at 12:24 Comment(1)
I have always been wondering how can we tell which OS the arm-elf toolchain is targeting just from the name.Milquetoast
L
5

The ARM EABI is a standard created by ARM that allows different toolchains to create compatible objects. For instance, so that one toolchain can link objects created by another toolchain.

Lizettelizotte answered 12/3, 2012 at 16:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.