
RealView® Developer Kit Version 2.2 Compiler and Libraries Guide Copyright © 2005 ARM Limited. All rights reserved. ARM DUI 0282B RealView Developer Kit Compiler and Libraries Guide Copyright © 2005 ARM Limited. All rights reserved. Release Information The following changes have been made to this book. Change History Date Issue Change April 2005 B Release for RVDK v2.2 Proprietary Notice Words and logos marked with ® or ™ are registered trademarks or trademarks owned by ARM Limited. Other brands and names mentioned herein may be the trademarks of their respective owners. Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder. The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded. This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product. Confidentiality Status This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to. Product Status The information in this document is final, that is for a developed product. Web Address http://www.arm.com ii Copyright © 2005 ARM Limited. All rights reserved. ARM DUI 0282B Contents RealView Developer Kit Compiler and Libraries Guide Preface About this book ............................................................................................ viii Feedback ..................................................................................................... xiii Chapter 1 Introduction 1.1 About RVDK ................................................................................................ 1-2 1.2 The ARM compiler and libraries .................................................................. 1-3 Chapter 2 Using the ARM Compiler 2.1 About the ARM compiler ............................................................................. 2-2 2.2 File usage ................................................................................................. 2-10 2.3 armcc command syntax ............................................................................ 2-20 Chapter 3 ARM Compiler Reference 3.1 Compiler-specific features ........................................................................... 3-2 3.2 Language extensions ................................................................................ 3-30 3.3 C and C++ implementation details ............................................................ 3-47 3.4 GNU extensions to the ARM compiler ...................................................... 3-66 3.5 Predefined macros .................................................................................... 3-89 ARM DUI 0282B Copyright © 2005 ARM Limited. All rights reserved. iii Chapter 4 Inline and Embedded Assemblers 4.1 Inline assembler ......................................................................................... 4-2 4.2 Embedded assembler ............................................................................... 4-20 4.3 Legacy inline assembler that accesses sp, lr or pc .................................. 4-29 4.4 Differences between inline and embedded assembly code ..................... 4-31 Chapter 5 The C and C++ Libraries 5.1 About the runtime libraries .......................................................................... 5-2 5.2 Writing reentrant and thread-safe code ...................................................... 5-6 5.3 Building an application with the C library .................................................. 5-20 5.4 Building an application without the C library ............................................. 5-27 5.5 Tailoring the C library to a new execution environment ............................ 5-35 5.6 Tailoring static data access ...................................................................... 5-45 5.7 Tailoring locale and CTYPE ..................................................................... 5-46 5.8 Tailoring error signaling, error handling, and program exit ....................... 5-71 5.9 Tailoring storage management ................................................................. 5-77 5.10 Tailoring the runtime memory model ........................................................ 5-87 5.11 Tailoring the input/output functions ........................................................... 5-95 5.12 Tailoring other C library functions ........................................................... 5-106 5.13 Selecting real-time division ..................................................................... 5-111 5.14 ISO implementation definition ................................................................. 5-112 5.15 C library extensions ................................................................................ 5-121 5.16 Library naming conventions .................................................................... 5-128 Chapter 6 Floating-point Support 6.1 About floating-point support ........................................................................ 6-2 6.2 The software floating-point library, fplib ...................................................... 6-3 6.3 Controlling the floating-point environment ................................................ 6-10 6.4 The math library, mathlib .......................................................................... 6-27 6.5 IEEE 754 arithmetic .................................................................................. 6-36 Chapter 7 Semihosting 7.1 Semihosting ................................................................................................ 7-2 7.2 Semihosting implementation ...................................................................... 7-5 7.3 Semihosting SWIs ...................................................................................... 7-6 7.4 Debug agent interaction SWIs .................................................................. 7-20 Appendix A Via File Syntax A.1 Overview of via files .................................................................................... A-2 A.2 Syntax ......................................................................................................... A-3 Appendix B Standard C Implementation Definition B.1 Implementation definition ............................................................................ B-2 iv Copyright © 2005 ARM Limited. All rights reserved. ARM DUI 0282B Appendix C Standard C++ Implementation Definition C.1 Integral conversion ..................................................................................... C-2 C.2 Calling a pure virtual function ..................................................................... C-3 C.3 Major features of language support ........................................................... C-4 C.4 Standard C++ library implementation definition ......................................... C-5 Appendix D C and C++ Compiler Implementation Limits D.1 C++ ISO/IEC standard limits ...................................................................... D-2 D.2 Internal limits .............................................................................................. D-4 D.3 Limits for integral numbers ......................................................................... D-5 D.4 Limits for floating-point numbers ................................................................ D-6 Appendix E Using Older Options E.1 Mapping old compiler options to the new release ....................................... E-2 Glossary ARM DUI 0282B Copyright © 2005 ARM Limited. All rights reserved. v vi Copyright © 2005 ARM Limited. All rights reserved. ARM DUI 0282B Preface This preface introduces the RealView® Developer Kit (RVDK) v2.2 Compiler and Libraries Guide. It contains the following sections: • About this book on page viii • Feedback on page xiii. ARM DUI 0282B Copyright © 2005 ARM Limited. All rights reserved. vii Preface About this book This book provides reference information for RealView® Developer Kit (RVDK), and describes the command-line options to the ARM® compiler. The book also gives reference material on the ARM implementation of C and C++ in the compiler and the C and C++ libraries. Intended audience This book is written for all developers who are producing applications using RVDK. It assumes that you are an experienced software developer. Using this book This book is organized into the following chapters and appendixes: Chapter 1 Introduction Read this chapter for an introduction to the ARM compiler for RVDK and the libraries. Chapter 2 Using the ARM Compiler Read this chapter for an explanation of all command-line options accepted by the ARM compiler. Chapter 3 ARM Compiler Reference Read this chapter for a description of the language features provided by the ARM compiler, and for information on standards conformance and implementation details. Chapter 4 Inline and Embedded Assemblers
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages462 Page
-
File Size-