TMS320C6000 优化 C/C++ 编译器用户指南 说明如何使用下列德州仪器 (TI) 代码生成编译器工具:
TI 编译器支持符合国际标准化组织 (ISO) 这些语言标准的 C 和 C++ 代码。编译器支持 1989、1999 和 2011 版本的C语言以及2014 版本的C++语言。
本用户指南讨论了 TI C/C++ 编译器的特性。本手册假设您已了解如何编写 C/C++ 程序。由 Brian W. Kernighan 和 Dennis M. Ritchie 所著的 C 程序设计语言(第二版)介绍了基于 ISO C 标准的 C 语言。您可以使用 Kernighan 和 Ritchie(以下简称为 K&R)一书作为本手册的补充。本手册中对 K&R C(相对于 ISO C)的引用是指由 Kernighan 和 Ritchie 所著的 C 程序设计语言 第一版中定义的 C 语言。
本文档使用以下规则:
特殊字体
显示。交互式显示采用粗体形式的特殊字体来区分输入的命令与系统显示的项目(如提示符、命令输出、错误消息等)。C 代码示例如下所示: #include <stdio.h>
main()
{ printf("Hello World\n");
}
cl6x [options] [filenames] [--run_linker [link_options] [object files]] |
cl6x --run_linker {--rom_model | --ram_model} filenames [--output_file= name.out] | |
--library= libraryname |
symbol .usect "section name", size in bytes[, alignment] |
以下书籍可以作为本用户指南的补充:
ANSI X3.159-1989, Programming Language - C (Alternate version of the 1989 C Standard), American National Standards Institute
ISO/IEC 9899:1989, International Standard - Programming Languages - C (The 1989 C Standard), International Organization for Standardization
ISO/IEC 9899:1999, International Standard - Programming Languages - C (The 1999 C Standard), International Organization for Standardization
ISO/IEC 9899:2011, International Standard - Programming Languages - C (The 2011 C Standard), International Organization for Standardization
ISO/IEC 14882-2014, International Standard - Programming Languages - C++ (The 2014 C++ Standard), International Organization for Standardization
The C Programming Language (second edition), by Brian W. Kernighan and Dennis M. Ritchie, published by Prentice-Hall, Englewood Cliffs, New Jersey, 1988
The Annotated C++ Reference Manual, Margaret A. Ellis and Bjarne Stroustrup, published by Addison-Wesley Publishing Company, Reading, Massachusetts, 1990
C:A Reference Manual (fourth edition), by Samuel P. Harbison, and Guy L. Steele Jr., published by Prentice Hall, Englewood Cliffs, New Jersey
Programming Embedded Systems in C and C++, by Michael Barr, Andy Oram (Editor), published by O'Reilly & Associates; ISBN: 1565923545, February 1999
Programming in C, Steve G. Kochan, Hayden Book Company
The C++ Programming Language (second edition), Bjarne Stroustrup, published by Addison-Wesley Publishing Company, Reading, Massachusetts, 1990
Tool Interface Standards (TIS) DWARF Debugging Information Format Specification Version 2.0, TIS Committee, 1995
DWARF Debugging Information Format Version 3, DWARF Debugging Information Format Workgroup, Free Standards Group, 2005 (http://dwarfstd.org)
DWARF Debugging Information Format Version 4, DWARF Debugging Information Format Workgroup, Free Standards Group, 2010 (http://dwarfstd.org)
System V ABI specification (http://www.sco.com/developers/gabi/)
OpenCL™ Specification version 1.2 (https://www.khronos.org/opencl/)
有关 TI 代码生成工具的更多信息,请参阅以下资源:
以下文档可作为对本用户指南的补充:
TMS320C6000™ and Code Composer Studio™are TMs ofTexas Instruments.
OpenCL™is a TM ofApple Inc. used by permission by Khronos.
Other TMs
TMS320C6000™ 由一套软件开发工具支持,其中包括优化 C/C++ 编译器、汇编优化器、汇编器、链接器以及各种实用程序。
本章概述了这些工具,并介绍了优化 C/C++ 编译器的特性。在 TMS320C6000 汇编语言工具用户指南 中详细论述了汇编器和链接器。
图 1-1 阐述软件开发流程。图中阴影部分突出了 C 语言程序最常见的软件开发路径。其他部分是增强开发流程的外围功能。
以下列表描述了图 1-1 中显示的工具:
如果编译器和链接器选项需要自定义的库版本,库构建实用程序将自动构建运行时支持库。请参阅节 9.4。C 和 C++ 的标准运行时支持库函数的源代码位于编译器安装目录的 lib\src 子目录中提供。
编译器是名为 cl6x 的命令行程序。此程序可以一步编译、优化、汇编和链接程序。在 Code Composer Studio™ 中,编译器自动运行以执行构建项目所需的步骤。
更多有关程序编译的信息,请参阅节 3.1。
编译器具有直接调用约定,因此可以编写相互调用的汇编和 C 函数。更多有关调用约定的信息,请参阅Chapter350。
编译器支持1989、1999 和 2011 版本的C语言以及 2014 版本的 C++ 语言。编译器中的 C 和 C++ 语言特征是按照下述 ISO 标准实现的:
如需了解命令行选项以选择代码所使用的 C 或 C++ 标准,请参阅 节 7.13 。