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

送分小仙女□ 提交于 2019-11-29 19:25:56

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 assembler.

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.

zhigang

Here is an excellent explanation.

Toolchains follow the loose naming convention: 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 examples:

arm-none-eabi: This toolchain targets the ARM architecture, has no vendor, does not target any 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.

dartan

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!