MSP430 Application Tips 1:coff Abi and Eabi

Source: Internet
Author: User


when we use the MSP430 MCU for project development, we will encounter the output format of the two image files (as shown): Legacy COFF and Eabi (ELF), this article launches from this topic, leads to COFF Abi and Eabi two application binary interface, Enables developers to low-level from theMSP430 has a new understanding.     
1. image file output format
the MSP430 compiler can output image files in two formats:
A,COFF Object Files
COFF is an abbreviation of the English Common object file format, translated into Chinese meaning "Universal object Files format", it is a widely existed object file format, this is not directly described as the target file format because this format is not only applied to the target file, There are also a wide range of applications in other files, such as executable files. Most executables on the Windows operating system use this format. It has a number of features, such as compilation, relocation, etc. As shown in the TI company in this file format before the addition of English legacy (left), the original text is as follows: COFF is a legacy format; it'll continue to being supported, but the support for some modern language features would not be added. (COFF is a legacy format that will continue to be supported, but now some of the features of the programming language will no longer be added. )B,ELF Object Files
Elf is EnglishThe abbreviation for executable and linking format, translated into Chinese, means "execute link format", which is a file format that TI will continue to support in the future, and new features of the programming language will continue to be added, such as the recent emergence of the C + + languagetemplate instantiation (templates manifested) andExporting inline functions (export inline function) has been supported.
C, how to determine the image file output format
the output format of the image file is determined by the selected Abi, as follows: The object files created by the assembler and linker conform to either the ELF or COFF binary formats, depending O n the ABI selected when building your program. When using the EABI mode, the ELF format is used. For the older COFF ABI mode, the Legacy COFF format is used. (Assembly and connection will be based on an object file in the Elf and COFF two formats, which relies on the ABI interface we chose when building the application.) When we select the Eabi interface, the ELF format will be used. When we select the old Coff ABI interface, the Legacy COFF format will be used. )

2. ABI Overview
Abi is in English Application binary interface, translated into Chinese means "Application binary interface", which defines the underlying interface between the object file (if only for the MSP430 system, we can also refer to it as the target file). The ABI allows object files that conform to the ABI interface to be linked together without having to consider their source files, and it allows an existing ABI-compliant executable file to run on any system that supports the ABI interface.
object files that conform to different ABI interfaces cannot be linked together, and the current MSP430 compiler supports two ABI types:COFF Abi and Eabi. We can use the--abi "link options to selectCOFF ABI (--abi=coffabi) andMSP430 EABI (--abi=eabi). Indicates that the ABI interface used in the current system is eabi.      what does the ABI interface do, and we can look at the following text:An ABI defines how functions is compiled or assembled separately can work together. This involves standardizing the data type representation, register conventions, and function structure and calling convent Ions. It defines linkname generation from C symbol names. It defines the object file format and the debug format. It defines how the system is initialized. In the case of C + + it defines C + + name mangling and exception handling support.(The ABI interface defines how the functions of different compiler compilations or assembler assemblies work together.) These include normalization of data type performance, usage specification of registers, and specification of function structure and invocation. It defines the link name generated by the C language symbol name, the destination file format, the debug file format, how the system is initialized, and so on. In the case of the C + + language, the ABI interface defines how the C + + name is compressed and supports exception handling. )

Summary: The MSP430 is capable of outputting two image file formats, namely: Legacy COFF and Eabi (ELF), which is actually the corresponding two ABI interfaces, respectively,COFF Abi and Eabi. The ABI's role is to make the different target files conforming to the ABI interface (even those compiled by different compilers) work well together (without the program's source files) Ti continues to supportCOFF ABI, but no longer adds new features to the programming language. We should now focus onEabi, it is TI Company will continue to carry out functional extension. The Eabi will be discussed in depth.


original articles, reproduced please indicate the sourcehttp://user.qzone.qq.com/2756567163.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MSP430 Application Tips 1:coff Abi and Eabi

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.