"Go" arm Cross compiler Gnueabi, None-eabi, Arm-eabi, GNUEABIHF, Gnueabi differences

Source: Internet
Author: User

Original URL: http://www.veryarm.com/296.html

Naming rules

The naming convention for the cross-compilation toolchain is:arch [-vendor] [-os] [-(GNU) Eabi]

    • Arch -architecture, such as Arm,mips
    • Vendor -tool chain Provider
    • OS -Target operating system
    • Eabi -Embedded Application Binary interface (Embedded application binary Interface)

Depending on whether the operating system is supported or not, ARM GCC can be divided into supported and unsupported operating systems, such as

    • Arm-none-eabi: There is no operating system, and naturally it is impossible to support functions that are closely related to the operating system, such as fork (2). He uses newlib, a C library dedicated to embedded systems.
    • Arm-none-linux-eabi: For Linux, use glibc

Instance 1, ARM-NONE-EABI-GCC

(Arm architecture,no Vendor,not target an operating system,complies with the arm EABI)
Bare-metal systems for compiling the ARM architecture (including boot, kernel for ARM Linux, not for compiled Linux applications application), generally suitable for ARM7, cortex-m, and cortex-r cores, so it is not supported by those operating systems A closely related function, such as fork (2), uses newlib, a C library dedicated to embedded systems.

2, ARM-NONE-LINUX-GNUEABI-GCC

(ARM architecture, no vendor, creates binaries that run on the Linux operating system, and uses the GNU EABI)

Mainly used in the ARM architecture based Linux system, can be used to compile the arm architecture of U-boot, Linux kernel, Linux applications and so on. Arm-none-linux-gnueabi is based on GCC and uses the GLIBC library, which has been optimized by Codesourcery company to launch the compiler. The Arm-none-linux-gnueabi-xxx cross-compilation tool has excellent floating-point operations. General ARM9, ARM11, cortex-a kernel, with Linux operating system will be used.

3, ARM-EABI-GCC

Android ARM compiler.

4, ARMCC

ARM's compiled tools, like Arm-none-eabi, can compile bare-metal programs (u-boot, kernel), but not Linux applications. ARMCC general and ARM development tools, Keil MDK, ADS, RVDS and DS-5 compilers are ARMCC, so ARMCC compiler are charged (except Patriotic edition, hehe ~ ~).

5, ARM-NONE-UCLINUXEABI-GCC and ARM-NONE-SYMBIANELF-GCC

Arm-none-uclinuxeabi for uCLinux, using GLIBC.

Arm-none-symbianelf used for Symbian, and did not know what the C library was.

Codesourcery

Codesourcery launched the product called Sourcery g++ Lite Edition, which is based on the command-line of the compiler is free, can be downloaded on the official website, and which contains the IDE and debug tools are charged, Of course there are also 30-day trial versions.

Currently Codesourcery has been acquired by Mentor Graphics, so the original website style has all changed to Mentor style, but Sourcery g++ Lite Edition can also be registered for free download.

Codesourcery has been working on the development and optimization of the arm target GCC, and its arm gcc is currently very good in the market, many patches may not have been accepted by GCC, so it should still be used directly (and he provided under Windows [MinGW Cross-compiled] And Linux under the binary version, more convenient, if not very time and interest, do not recommend the download SRC source package to compile their own, very troublesome, codesourcery to the shell script many times there is no way to directly use, you have to extract the key part of the manual execution, but also the cost of energy and time, If you want to know the details, you don't have to compile it yourself to see what steps he is building, if you're interested in cross-compiler.

ABI and EABI

ABI: Binary Application Interface (application binary Interface (ABI) for the ARM Architecture). In computers, applying a binary interface describes a low-level interface between an application (or other type) and an operating system or another application.

EABI: Embedded ABI. Embedded application binary interfaces specify standard conventions for file formats, data types, register usage, stacked organization optimizations, and parameters in an embedded software. Developers using their own assembly language can also use EABI as an interface to the assembly language generated by the compatible compiler.

The main difference between the two is that the ABI is on the computer, Eabi is embedded on the platform (such as arm,mips, etc.).

ARM-LINUX-GNUEABI-GCC and ARM-LINUX-GNUEABIHF-GCC

The two cross compilers are suitable for Armel and ARMHF two different architectures, and Armel and ARMHF have different strategies for floating-point operations (with the FPU arm to support both floating-point arithmetic strategies).

In fact, these two cross compilers are only GCC's option-mfloat-abi the default values are different. GCC options-mfloat-abi have three values soft, SOFTFP,hard (both of which require the FPU floating point unit in arm, soft and the latter are compatible, but SOFTFP and hard two modes are incompatible):
Soft: Use the software mode instead of the FPU for floating point calculations, even if the FPU floating point unit is not used.
SOFTFP: The default value of the Armel architecture (corresponding compiler for ARM-LINUX-GNUEABI-GCC) is calculated using the FPU, but the parameters are transmitted by ordinary registers, so when the interrupt is done, only the ordinary registers are saved, the interrupt load is small, But the parameters need to be converted to floating-point recalculation.
Hard : ARMHF architecture (corresponding compiler ARM-LINUX-GNUEABIHF-GCC) takes the default values, with the FPU calculation, the parameters are also used in the FPU floating point register, eliminating the conversion, the best performance, but the interrupt load is high.

Save the contents of the C file used in the following test to MFLOAT.C:
#include <stdio.h>
int main (void)
{
Double a,b,c;
A = 23.543;
b = 323.234;
c = b/a;
printf ("The 13/2 =%f\n", c);
printf ("Hello World!\n");
return 0;
}

1. Compile with ARM-LINUX-GNUEABIHF-GCC and use the "-V" option for more detailed information:
# arm-linux-gnueabihf-gcc-v Mfloat.c
collect_gcc_options= '-V '-march=armv7-a '-mfloat-abi=hard '-mfpu=vfpv3-d16′ '-mthumb '
-mfloat-abi=hard

You can see that hard hardware floating point mode is used.

2. Compile with ARM-LINUX-GNUEABI-GCC:
# arm-linux-gnueabi-gcc-v Mfloat.c
collect_gcc_options= '-V '-march=armv7-a '-mfloat-abi=softfp '-mfpu=vfpv3-d16′ '-mthumb '
-mfloat-abi=softfp

You can see the use of SOFTFP mode.

Cross-compilation tool

Resources
    1. Cross-compiler Arm-linux-gnueabi and ARM-LINUX-GNUEABIHF differences: http://www.cnblogs.com/xiaotlili/p/3306100.html
    2. The difference between Arm-none-linux-gnueabi,arm-none-eabi and Arm-eabi: http://blog.csdn.net/mantis_1984/article/details/21049273
    3. What ' s the difference between arm-linux-/arm-none-linux-gnueabi-/arm-fsl-linux-gnueabi-in ltib?https:// community.freescale.com/thread/313490

Articles from veryarm:http://www.veryarm.com/296.html, reproduced please keep.

"Go" arm Cross compiler Gnueabi, None-eabi, Arm-eabi, GNUEABIHF, Gnueabi differences

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.