IAR C/C++ Development Guide Compiling and Linking for RISC-V

IAR C/C++ Development Guide Compiling and Linking for RISC-V

IAR C/C++ Development Guide Compiling and Linking for RISC-V DRISCV-5 COPYRIGHT NOTICE © 2019–2021 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, C-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. RISC-V is a registered trademark of RISC-V International. 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 Fifth edition: June 2021 Part number: DRISCV-5 This guide applies to version 2.10.x of IAR Embedded Workbench® for RISC-V. Internal reference: BB8, FF9.0, tut2009.1, csrct2010.1, V_110411, IJOA. IAR C/C++ Development Guide 2 Compiling and linking for RISC-V AFE1_AFE2-1:1 Brief contents Tables ..................................................................................................................... 31 Preface .................................................................................................................... 33 Part 1. Using the build tools ................................................... 41 Introduction to the IAR build tools ........................................................ 43 Developing embedded applications ........................................................ 49 Data storage ...................................................................................................... 61 Functions ............................................................................................................... 65 Linking using ILINK ........................................................................................ 75 Linking your application ................................................................................ 93 The DLIB runtime environment ........................................................... 109 Assembler language interface ................................................................. 149 Using C ................................................................................................................ 171 Using C++ .......................................................................................................... 179 Application-related considerations ....................................................... 185 Efficient coding for embedded applications ...................................... 199 Part 2. Reference information ........................................... 217 External interface details ............................................................................ 219 Compiler options ........................................................................................... 229 Linker options .................................................................................................. 269 Data representation ...................................................................................... 301 Extended keywords ...................................................................................... 315 3 AFE1_AFE2-1:1 Pragma directives ........................................................................................... 329 Intrinsic functions ........................................................................................... 355 The preprocessor .......................................................................................... 365 C/C++ standard library functions .......................................................... 377 The linker configuration file ...................................................................... 391 Section reference ........................................................................................... 427 The stack usage control file ...................................................................... 433 IAR utilities ........................................................................................................ 441 Implementation-defined behavior for Standard C++ .................. 487 Implementation-defined behavior for Standard C ........................ 507 Implementation-defined behavior for C89 ....................................... 527 Index ..................................................................................................................... 539 IAR C/C++ Development Guide 4 Compiling and linking for RISC-V AFE1_AFE2-1:1 Contents Tables ..................................................................................................................... 31 Preface .................................................................................................................... 33 Who should read this guide ............................................................... 33 Required knowledge .......................................................................... 33 How to use this guide .......................................................................... 33 What this guide contains ................................................................... 34 Part 1. Using the build tools ............................................................... 34 Part 2. Reference information ............................................................ 34 Other documentation ........................................................................... 35 User and reference guides .................................................................. 36 The online help system ...................................................................... 36 Further reading ................................................................................... 36 Web sites ............................................................................................ 37 Document conventions ........................................................................ 37 Typographic conventions ................................................................... 38 Naming conventions .......................................................................... 39 Part 1. Using the build tools ................................................... 41 Introduction to the IAR build tools ........................................................ 43 The IAR build tools—an overview ................................................... 43 The IAR C/C++ Compiler .................................................................. 43 The IAR Assembler ........................................................................... 44 The IAR ILINK Linker ...................................................................... 44 Specific ELF tools .............................................................................. 44 External tools ..................................................................................... 44 IAR language overview ......................................................................... 44 Device support ......................................................................................... 45 Supported RISC-V devices ................................................................ 45 Preconfigured support files ................................................................ 46 Examples for getting started .............................................................. 47 5 AFE1_AFE2-1:1 Special support for embedded systems ........................................ 47 Extended keywords ............................................................................ 47 Pragma directives ............................................................................... 47 Predefined symbols ............................................................................ 47 Accessing low-level features ............................................................. 48 Developing embedded applications ........................................................ 49 Developing embedded software using IAR build tools .......... 49 CPU features and constraints ............................................................. 49 Mapping of memory ........................................................................... 49 Communication with peripheral units ................................................ 50 Event handling ................................................................................... 50 System startup .................................................................................... 50 Real-time operating systems .............................................................. 51 The build process—an overview ...................................................... 51 The translation process

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    572 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us