
IAR C/C++ Development Guide Compiling and Linking for Arm Limited’s Arm® Cores DARM-24 COPYRIGHT NOTICE © 1999–2018 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR Systems, IAR Embedded Workbench, Embedded Trust, IAR Connect, C-SPY, C-RUN, C-STAT, IAR Visual State, IAR KickStart Kit, I-jet, I-jet Trace, I-scope, IAR Academy, IAR, and the logotype of IAR Systems are trademarks or registered trademarks owned by IAR Systems AB. Microsoft and Windows are registered trademarks of Microsoft Corporation. Arm, Cortex, Thumb, and TrustZone are registered trademarks of Arm Limited. EmbeddedICE is a trademark of Arm Limited. uC/OS-II and uC/OS-III are trademarks of Micrium, Inc. CMX-RTX is a trademark of CMX Systems, Inc. ThreadX is a trademark of Express Logic. RTXC is a trademark of Quadros Systems. Fusion is a trademark of Unicoi Systems. Renesas Synergy is a trademark of Renesas Electronics Corporation. Adobe and Acrobat Reader are registered trademarks of Adobe Systems Incorporated. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE Twenty-fourth edition: June 2018 Part number: DARM-24 This guide applies to version 8.30.x of IAR Embedded Workbench® for Arm. Internal reference: BB4, csrct2010.1, V_110411, IMAE. IAR C/C++ Development Guide 2 Compiling and Linking for Arm AFE1_AFE2-1:1 Brief contents Tables ..................................................................................................................... 39 Preface .................................................................................................................... 41 Part 1. Using the build tools ................................................... 49 Introduction to the IAR build tools ........................................................ 51 Developing embedded applications ........................................................ 57 Data storage ...................................................................................................... 71 Functions ............................................................................................................... 75 Linking using ILINK ........................................................................................ 87 Linking your application .............................................................................. 105 The DLIB runtime environment ........................................................... 121 Assembler language interface ................................................................. 159 Using C ................................................................................................................ 183 Using C++ .......................................................................................................... 191 Application-related considerations ....................................................... 201 Efficient coding for embedded applications ...................................... 223 Part 2. Reference information ........................................... 243 External interface details ............................................................................ 245 Compiler options ........................................................................................... 255 Linker options .................................................................................................. 305 Data representation ...................................................................................... 343 Extended keywords ...................................................................................... 359 3 AFE1_AFE2-1:1 Pragma directives ........................................................................................... 377 Intrinsic functions ........................................................................................... 403 The preprocessor .......................................................................................... 451 C/C++ standard library functions .......................................................... 465 The linker configuration file ...................................................................... 477 Section reference ........................................................................................... 511 The stack usage control file ...................................................................... 517 IAR utilities ........................................................................................................ 525 Implementation-defined behavior for Standard C ........................ 571 Implementation-defined behavior for C89 ....................................... 591 Index ..................................................................................................................... 603 IAR C/C++ Development Guide 4 Compiling and Linking for Arm AFE1_AFE2-1:1 Contents Tables ..................................................................................................................... 39 Preface .................................................................................................................... 41 Who should read this guide ............................................................... 41 Required knowledge .......................................................................... 41 How to use this guide .......................................................................... 41 What this guide contains ................................................................... 42 Part 1. Using the build tools ............................................................... 42 Part 2. Reference information ............................................................ 42 Other documentation ........................................................................... 43 User and reference guides .................................................................. 44 The online help system ...................................................................... 44 Further reading ................................................................................... 45 Web sites ............................................................................................ 45 Document conventions ........................................................................ 46 Typographic conventions ................................................................... 46 Naming conventions .......................................................................... 47 Part 1. Using the build tools ................................................... 49 Introduction to the IAR build tools ........................................................ 51 The IAR build tools—an overview ................................................... 51 IAR C/C++ Compiler ......................................................................... 51 IAR Assembler ................................................................................... 52 The IAR ILINK Linker ...................................................................... 52 Specific ELF tools .............................................................................. 52 External tools ..................................................................................... 52 IAR language overview ......................................................................... 53 Device support ......................................................................................... 53 Supported Arm devices ...................................................................... 53 Preconfigured support files ................................................................ 54 Examples for getting started .............................................................. 54 5 AFE1_AFE2-1:1 Special support for embedded systems ........................................ 55 Extended keywords ............................................................................ 55 Pragma directives ............................................................................... 55 Predefined symbols ............................................................................ 55 Accessing low-level features ............................................................. 55 Developing embedded applications ........................................................ 57 Developing embedded software using IAR build tools .......... 57 Mapping of memory ........................................................................... 57 Communication with peripheral units ................................................ 58 Event handling ................................................................................... 58 System startup .................................................................................... 58 Real-time operating
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages641 Page
-
File Size-