ARM Developer Suite Version 1.0.1
Total Page:16
File Type:pdf, Size:1020Kb
ARM Developer Suite Version 1.0.1 Tools Guide Copyright © 1999,2000 ARM Limited. All rights reserved. ARM DUI 0067B Copyright © 1999 and 2000 ARM Limited. All rights reserved. Release Information The following changes have been made to this book. Change History Date Issue Change October 1999 A Release 1.0 March 2000 B Release 1.0.1 Proprietary Notice ARM, the ARM Powered logo, Thumb, and StrongARM are registered trademarks of ARM Limited. The ARM logo, AMBA, Angel, ARMulator, EmbeddedICE, ModelGen, Multi-ICE, PrimeCell, ARM7TDMI, ARM7TDMI-S, ARM9TDMI, ARM9E-S, ETM7, ETM9, TDMI, STRONG, are trademarks of ARM Limited. All other products or services mentioned herein may be 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. ii Copyright © 1999,2000 ARM Limited. All rights reserved. ARM DUI 0067B Contents Tools Guide Preface About this book ................................................................................. Preface-ii Feedback ........................................................................................ Preface-vii Chapter 1 Introduction 1.1 About the ARM Developer Suite ................................................................. 1-2 1.2 Supported platforms .................................................................................... 1-5 Chapter 2 C and C++ Compilers 2.1 About the C and C++ compilers .................................................................. 2-2 2.2 File usage ................................................................................................... 2-4 2.3 Command syntax ........................................................................................ 2-8 Chapter 3 ARM Compiler Reference 3.1 Compiler-specific features ........................................................................... 3-2 3.2 Standard C implementation definition ....................................................... 3-11 3.3 Standard C++ implementation definition ................................................... 3-30 3.4 C and C++ language extensions ............................................................... 3-33 3.5 Predefined macros .................................................................................... 3-38 3.6 Implementation limits ................................................................................ 3-41 3.7 Limits for integral numbers ........................................................................ 3-44 3.8 Limits for floating-point numbers ............................................................... 3-45 ARM DUI 0067B Copyright © 1999, 2000 ARM Limited. All rights reserved. iii Chapter 4 The C and C++ Libraries 4.1 About the runtime libraries .......................................................................... 4-2 4.2 Building an application with the C library .................................................... 4-6 4.3 Building an application without the C library ............................................. 4-13 4.4 Tailoring the C library to a new execution environment ............................ 4-20 4.5 Tailoring static data access ...................................................................... 4-23 4.6 Tailoring locale and CTYPE ..................................................................... 4-24 4.7 Tailoring error signalling, error handling, and program exit ...................... 4-47 4.8 Tailoring storage management ................................................................. 4-52 4.9 Tailoring the run-time memory model ....................................................... 4-60 4.10 Tailoring the input/output functions ........................................................... 4-67 4.11 Tailoring other C library functions ............................................................. 4-76 4.12 ISO implementation definition ................................................................... 4-81 4.13 C library extensions .................................................................................. 4-90 4.14 Library naming conventions ...................................................................... 4-96 Chapter 5 Assembler 5.1 Introduction ................................................................................................. 5-2 5.2 Command syntax ........................................................................................ 5-4 5.3 Format of source lines ................................................................................ 5-9 5.4 Predefined register and coprocessor names ............................................ 5-10 5.5 VFP directives and notation ...................................................................... 5-11 5.6 Built-in variables ....................................................................................... 5-12 5.7 ARM pseudo-instructions ......................................................................... 5-13 5.8 Thumb pseudo-instructions ...................................................................... 5-24 5.9 Symbols .................................................................................................... 5-30 5.10 Directives .................................................................................................. 5-36 5.11 Expressions, literals and operators ........................................................ 5-114 Chapter 6 The ARM Linker 6.1 About armlink .............................................................................................. 6-2 6.2 Armlink syntax ............................................................................................ 6-6 6.3 Image structure ......................................................................................... 6-16 6.4 Linker-defined symbols ............................................................................. 6-23 6.5 Library searching, selection and scanning ............................................... 6-26 6.6 Optimizations and modifications ............................................................... 6-29 6.7 Accessing symbols in another image ....................................................... 6-31 6.8 Creating simple images ............................................................................ 6-34 6.9 Creating complex images with scatter loading ......................................... 6-39 Chapter 7 Toolkit Utilities 7.1 Functions of the toolkit utilities .................................................................... 7-2 7.2 The fromELF utility ..................................................................................... 7-3 7.3 ARM profiler ................................................................................................ 7-7 7.4 ARM librarian .............................................................................................. 7-9 7.5 The Flash downloader .............................................................................. 7-13 iv Copyright © 1999, 2000 ARM Limited. All rights reserved. ARM DUI 0067B Chapter 8 Floating-point Support 8.1 About floating-point support ........................................................................ 8-2 8.2 The software floating-point library, fplib ...................................................... 8-3 8.3 Controlling the floating-point environment ................................................. 8-10 8.4 The math library, mathlib ........................................................................... 8-26 8.5 IEEE 754 arithmetic .................................................................................. 8-32 ARM DUI 0067B Copyright © 1999, 2000 ARM Limited. All rights reserved. v vi Copyright © 1999, 2000 ARM Limited. All rights reserved. ARM DUI 0067B Preface This preface introduces the ARM Developer Suite (ADS) tools and reference documentation. It contains the following sections: • About this book on page Preface-ii • Feedback on page Preface-vii ARM DUI 0067B Copyright © 1999,2000 ARM Limited. All rights reserved. Preface-i - Preface About this book This book provides reference information for ADS. It describes the command-line options to the assembler, linker, compilers and other ARM tools in ADS. The book also gives reference material on the ARM implementation of the C and C++ compilers and the C libraries. Intended audience This book is written for all developers who are producing applications using ADS. It assumes that you are an experienced software developer and that you are familiar with the ARM development tools as described in ADS Getting Started. Using this book This book is organized into the following chapters: Chapter 1 Introduction Read this chapter for an introduction to ADS. Chapter 2 C and C++ Compilers Read this chapter for an explanation