Arm Cross compiler Gnueabi, None-eabi, Arm-eabi, GNUEABIHF, Gnueabi difference

Source: Internet
Author: User
naming rules

The naming conventions for the cross-compilation tool chain are:arch [-vendor] [-os] [-(GNU) Eabi] Arch -architecture, such as Arm,mips vendor -tool chain provider os< /c4>-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 support and unsupported operating systems, such as Arm-none-eabi: This is not operating system, it is not possible to support those functions 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 a operating system,complies with the arm Eabi)
Bare-metal systems for compiling arm architectures (including ARM Linux boot, kernel, and Linux application application) are generally suitable for ARM7, cortex-m and cortex-r kernel chips, so they are not supported with operating system 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 Linux system based on ARM architecture, can be used to compile ARM architecture u-boot, Linux kernel, Linux application and so on. Arm-none-linux-gnueabi is based on GCC, using the GLIBC library, after the Codesourcery company optimized the launch of the compiler. The Arm-none-linux-gnueabi-xxx Cross Compilation tool is excellent for 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 launch of the compiler tools, features and Arm-none-eabi similar, you can compile bare-metal programs (u-boot, kernel), but can not compile Linux applications. ARMCC general and ARM development tools together, Keil MDK, ADS, RVDS and DS-5 compiler are ARMCC, so ARMCC compiler are charged (except Patriotic edition, hehe ~). 5, ARM-NONE-UCLINUXEABI-GCC and ARM-NONE-SYMBIANELF-GCC

Arm-none-uclinuxeabi is used for uCLinux, using GLIBC.

Arm-none-symbianelf for Symbian, no use, do not know what C library is.

Codesourcery

Codesourcery 's products are called Sourcery g++ Lite Edition, where the command-line based compilers are free and can be downloaded on the official web, and the IDE and debug tools included are charged, There are, of course, 30-day trial versions.

At present, Codesourcery has been acquired by the Ming-Guide International (Mentor Graphics), so the original website style has all become Mentor style, but Sourcery g++ and Lite Edition can also be registered for free download.

Codesourcery has been doing arm target. GCC development and optimization, its arm gcc in the current market is very good, many patch may not be accepted by GCC, so it should still be used directly (and he provided Windows [MinGW Cross compiled) and a binary version of Linux, more convenient; if not very have the time and the interest, does not recommend downloads the SRC source package compiles itself, very troublesome, codesourcery to the shell script many times simply does not have the method to use directly, must withdraw the key part manually to carry out, also to expend the energy and the time, If you want to know the details, you don't have to compile it yourself, see what steps he builds, if you're interested in a cross compiler. ABI and Eabi

ABI: Binary Application Interface (application Binary Interface (ABI) for the ARM architecture). In a computer, a binary interface is used to describe a low-level interface between an application (or other type) and an operating system or another application.

Eabi: Embedded ABI. The embedded application binary interface specifies the standard conventions for file format, data type, register usage, heap organization optimization, and parameters in an embedded software. Developers use their own assembly language can also use Eabi as a compatible compiler generated assembly language interface.

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

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

The two cross compilers apply to the Armel and ARMHF two different architectures, Armel and ARMHF, which have different strategies for floating-point operations (with a FPU arm to support both floating-point operation policies).

In fact, these two cross compilers are just GCC options-mfloat-abi default values are different. GCC option-mfloat-abi has three values soft, SOFTFP, hard(both of which require the FPU floating-point unit in arm, soft is compatible with the latter, but SOFTFP and hard two modes are incompatible):
Soft: do not use the FPU for floating-point calculations, even if the FPU floating-point unit is not used, but the software mode.
SOFTFP: The default value of the Armel architecture (corresponding compiler for ARM-LINUX-GNUEABI-GCC) is computed with the FPU, but the pass parameter is transmitted with a normal register, so that when interrupted, only need to save the ordinary register, the interrupt load is small, However, parameters need to be converted to floating-point computations.
Hard: The default value of the ARMHF architecture (the corresponding compiler ARM-LINUX-GNUEABIHF-GCC) is computed using the FPU, and the pass parameters are also transmitted using the floating-point registers in the FPU, eliminating the conversion, the best performance, but the high interrupt load.

Save the contents of the C file used in the following test as 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, using ARM-LINUX-GNUEABIHF-GCC compilation, using 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 using the hard hardware floating-point pattern.

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 reference Cross compiler Arm-linux-gnueabi and ARM-LINUX-GNUEABIHF differences: http://www.cnblogs.com/xiaotlili/p/3306100. The difference between HTML Arm-none-linux-gnueabi,arm-none-eabi and Arm-eabi: http://blog.csdn.net/mantis_1984/article/details/21049273 What ' s The difference between arm-linux-/arm-none-linux-gnueabi-/arm-fsl-linux-gnueabi-in ltib?https:// community.freescale.com/thread/313490

Article from veryarm:http://www.veryarm.com/296.html, reprint please keep.

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.