Targeting Embedded Powerpc

Targeting Embedded Powerpc

Freescale Semiconductor, Inc. EPPC.book Page 1 Monday, March 28, 2005 9:22 AM CodeWarrior™ Development Studio PowerPC™ ISA Communications Processors Edition Targeting Manual Revised: 28 March 2005 For More Information: www.freescale.com Freescale Semiconductor, Inc. EPPC.book Page 2 Monday, March 28, 2005 9:22 AM Metrowerks, the Metrowerks logo, and CodeWarrior are trademarks or registered trademarks of Metrowerks Corpora- tion in the United States and/or other countries. All other trade names and trademarks are the property of their respective owners. Copyright © 2005 by Metrowerks, a Freescale Semiconductor company. All rights reserved. No portion of this document may be reproduced or transmitted in any form or by any means, electronic or me- chanical, without prior written permission from Metrowerks. Use of this document and related materials are governed by the license agreement that accompanied the product to which this manual pertains. This document may be printed for non-commercial personal use only in accordance with the aforementioned license agreement. If you do not have a copy of the license agreement, contact your Metrowerks representative or call 1-800-377- 5416 (if outside the U.S., call +1-512-996-5300). Metrowerks reserves the right to make changes to any product described or referred to in this document without further notice. Metrowerks makes no warranty, representation or guarantee regarding the merchantability or fitness of its prod- ucts for any particular purpose, nor does Metrowerks assume any liability arising out of the application or use of any product described herein and specifically disclaims any and all liability. Metrowerks software is not authorized for and has not been designed, tested, manufactured, or intended for use in developing applications where the fail- ure, malfunction, or any inaccuracy of the application carries a risk of death, serious bodily injury, or damage to tangible property, including, but not limited to, use in factory control systems, medical devices or facilities, nuclear facilities, aircraft navigation or communication, emergency systems, or other applications with a similar degree of potential hazard. How to Contact Metrowerks Corporate Headquarters Metrowerks Corporation 7700 West Parmer Lane Austin, TX 78729 U.S.A. World Wide Web http://www.metrowerks.com Sales United States Voice: 800-377-5416 United States Fax: 512-996-4910 International Voice: +1-512-996-5300 e-mail: [email protected] Technical Support United States Voice: 800-377-5416 International Voice: +1-512-996-5300 e-mail: [email protected] For More Information: www.freescale.com Freescale Semiconductor, Inc. EPPC.book Page 3 Monday, March 28, 2005 9:22 AM Table of Contents 1 Introduction 13 Overview of This Manual . 13 Related Documentation. 14 CodeWarrior Information . 14 Embedded PowerPC Programming Information. 15 AltiVec Information. 16 CodeWarrior Development Tools. 16 CodeWarrior IDE . 16 CodeWarrior C/C++ Compiler . 17 CodeWarrior Assembler . 17 CodeWarrior Linker. 17 CodeWarrior Debugger . 18 Metrowerks Standard Libraries . 18 CodeWarrior Development Process . 18 Project Files. 19 Editing Code . 19 Compiling . 19 Linking . 20 Debugging . 20 Viewing Preprocessor Output . 20 2 Working With Projects 21 Types of Projects. 21 Using the EPPC New Project Wizard . 22 Using PowerPC EABI Templates . 26 Using the Makefile Importer Wizard . 26 3 Working With Libraries and Support Code 29 Metrowerks Standard Libraries. 29 Using the Metrowerks Standard Libraries. 29 Using Console I/O. 30 Allocating Memory and Heaps . 31 Embedded PowerPC™ Comms Edition Targeting Manual 3 For More Information: www.freescale.com Freescale Semiconductor, Inc. EPPC.book Page 4 Monday, March 28, 2005 9:22 AM Table of Contents Runtime Libraries . .32 Library Naming Conventions . .32 Required Libraries and Source Code Files . .33 Board Initialization Code . .34 4 Working With the C/C++ Compiler and Linker 35 Integer and Floating-Point Formats. .36 Embedded PowerPC Integer Formats . .36 Embedded PowerPC Floating-Point Formats . .38 AltiVec Vector Data Formats . .38 Data Addressing . .40 Register Variables . .41 Register Coloring Optimization . .42 Pragma Directives . .43 force_active . .44 function_align . .45 incompatible_return_small_structs . .45 incompatible_sfpe_double_params . .45 interrupt . .46 pack . .47 pooled_data . .48 section . .48 Linker Issues for Embedded PowerPC . .53 Linker Generated Symbols . .53 Deadstripping Unused Code and Data. .54 Link Order . .54 Linker Command Files . .55 EXCLUDEFILES . .56 EXTERNAL_SYMBOL . .57 FORCEACTIVE . .57 FORCEFILES . .57 GROUP . .57 INCLUDEDWARF . .58 INTERNAL_SYMBOL. .58 MEMORY . .59 4 Embedded PowerPC™ Comms Edition Targeting Manual For More Information: www.freescale.com Freescale Semiconductor, Inc. EPPC.book Page 5 Monday, March 28, 2005 9:22 AM Table of Contents SECTIONS . 60 SHORTEN_NAMES_FOR_TOR_101 . 62 Using __attribute__ ((aligned(?))) . 64 Variable Declaration Examples. 64 Structure Definition Examples . 64 Typedef Declaration Examples . 65 Structure Member Examples. 65 Small Data Area PIC/PID Support . 66 Internal and External Segments and References . 66 PIC/PID Linker Command File Directives . 67 Linker-defined Symbols . 67 Uses for SDA PIC/PID . 68 Building an SDA PIC/PID Application. ..

View Full Text

Details

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