IAR Embedded Workbench®

IAR Embedded Workbench®

IAR Embedded Workbench® IAR C/C++ Compiler User Guide for the Renesas RL78 Microcontroller Family CRL78-3 COPYRIGHT NOTICE © 2011–2014 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, C-SPY, visualSTATE, The Code to Success, IAR KickStart Kit, I-jet, I-scope, 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. Renesas is a registered trademark of Renesas Electronics Corporation. RL78 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 Third edition: March 2014 Part number: CRL78-3 This guide applies to version 1.x of IAR Embedded Workbench® for the Renesas RL78 microcontroller family. Internal reference: M15, csrct2010.1, V_110411, IJOA. IAR C/C++ Compiler User Guide 2 for RL78 AFE1_AFE2-1:1 Brief contents Tables ...................................................................................................................... 23 Preface .................................................................................................................... 25 Part 1. Using the compiler ....................................................... 33 Introduction to the IAR build tools ........................................................ 35 Developing embedded applications ......................................................... 41 Data storage ...................................................................................................... 55 Functions ............................................................................................................... 67 Linking overview .............................................................................................. 77 Linking your application ................................................................................ 85 The DLIB runtime environment .............................................................. 95 Assembler language interface ................................................................. 127 Using C ................................................................................................................ 149 Using C++ .......................................................................................................... 157 Application-related considerations ....................................................... 173 Efficient coding for embedded applications ...................................... 179 Part 2. Reference information ........................................... 197 External interface details ............................................................................ 199 Compiler options ........................................................................................... 205 Data representation ...................................................................................... 239 Extended keywords ....................................................................................... 251 Pragma directives ............................................................................................ 263 3 AFE1_AFE2-1:1 Intrinsic functions ........................................................................................... 285 The preprocessor ........................................................................................... 289 Library functions ............................................................................................. 295 Segment reference ......................................................................................... 305 Implementation-defined behavior for Standard C ......................... 319 Implementation-defined behavior for C89 ........................................ 335 Index ..................................................................................................................... 347 4 AFE1_AFE2-1:1 Contents Tables ...................................................................................................................... 23 Preface .................................................................................................................... 25 Who should read this guide ............................................................... 25 Required knowledge .......................................................................... 25 How to use this guide .......................................................................... 25 What this guide contains ................................................................... 26 Part 1. Using the compiler .................................................................. 26 Part 2. Reference information ............................................................ 26 Other documentation ........................................................................... 27 User and reference guides .................................................................. 27 The online help system ......................................................................28 Further reading ................................................................................... 28 Web sites ............................................................................................29 Document conventions ........................................................................ 29 Typographic conventions ................................................................... 30 Naming conventions .......................................................................... 30 Part 1. Using the compiler ....................................................... 33 Introduction to the IAR build tools ........................................................ 35 The IAR build tools—an overview ................................................... 35 IAR C/C++ Compiler ......................................................................... 35 IAR Assembler ................................................................................... 35 The IAR XLINK Linker .................................................................... 36 External tools ..................................................................................... 36 IAR language overview ......................................................................... 36 Device support ......................................................................................... 37 Supported RL78 devices .................................................................... 37 Preconfigured support files ................................................................ 37 Examples for getting started .............................................................. 38 5 AFE1_AFE2-1:1 Special support for embedded systems ........................................ 38 Extended keywords ............................................................................ 38 Pragma directives ............................................................................... 38 Predefined symbols ............................................................................ 38 Accessing low-level features ............................................................. 39 Developing embedded applications ......................................................... 41 Developing embedded software using IAR build tools .......... 41 CPU features and constraints ............................................................. 41 Mapping of internal and external memory .........................................41 Communication with peripheral units ................................................ 42 Event handling ................................................................................... 42 System startup .................................................................................... 42 Real-time operating systems .............................................................. 43 The build process—an overview ...................................................... 43 The translation process ....................................................................... 43 The linking process ............................................................................ 44 After linking ....................................................................................... 45 Application execution—an overview ............................................. 46 The initialization phase ......................................................................46 The execution phase ........................................................................... 49 The termination phase .......................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    372 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