没有合适的资源?快使用搜索试试~ 我知道了~
首页CodeWarrior Power Architecture Build Tools指南
"《Power Arch Build Tools Reference.pdf》是一份详细的指南文档,专为Freescale半导体的CodeWarrior Development Studio设计,用于Power Architecture处理器的构建工具。该文档涵盖了多个关键章节,旨在帮助开发者高效地利用这些工具进行项目开发。
第1章"Introduction"介绍了编译器和链接器的基本架构,解释了它们在软件开发过程中的角色,以及如何设置CodeWarrior环境变量以确保工具的正确配置。这包括设置环境变量如COMPILER_PATH和LD_PATH,以及如何通过命令行调用这些工具。
第2章"Using Build Tools on the Command Line"详细阐述了在终端或命令行界面中使用构建工具的方法。这部分内容包括如何配置命令行工具,比如设置PATH环境变量以找到工具,以及获取帮助的方式。此外,还介绍了参数和选项的格式,以及常用的文件扩展名规则。
第3章和第4章分别关注标准C和C++的命令行选项。第3章讨论了与C语言标准兼容性的选项,如"-ansi"、"-std"、"-strict"等,这些选项有助于确保代码遵循特定的编程规范。第4章则着重于C++特性的支持,如"-ARM"、"-bool"、"-Cpp_exceptions"等,以及与C++11或更高版本语法相关的选项,如"-dialect"和"-for_scoping",还有与指令集管理器关联的选项"-instrmgr"。
《Power Arch Build Tools Reference.pdf》是一份实用的参考手册,对于希望通过CodeWarrior Development Studio进行Power Architecture处理器开发的工程师来说,它提供了关于构建工具的深入理解和操作指南,帮助他们优化编译流程,提升代码质量,满足严格的编程标准。"
Section number Title Page
14.3.3 Memory Map................................................................................................................................................262
14.3.4 Linker Generated Symbols...........................................................................................................................263
14.4 Deadstripping ...............................................................................................................................................................264
14.5 CodeWarrior Linker Command File (LCF)..................................................................................................................264
14.6 Creating an LCF from Scratch......................................................................................................................................265
14.7 Relocating Code in ROM..............................................................................................................................................267
14.7.1 Relocating Function in ROM.......................................................................................................................268
14.7.2 Placing Code in ROM..................................................................................................................................268
14.7.2.1 Create New ROM Segment........................................................................................................269
14.7.2.2 Create New ROM Section..........................................................................................................269
14.8 Relocating Code and Data in Internal RAM.................................................................................................................270
14.8.1 Placing Code and Data in RAM...................................................................................................................271
14.8.1.1 Create New RAM Segment........................................................................................................271
14.8.1.2 Create New RAM Section..........................................................................................................272
14.9 Relocating Code and Data in External MRAM............................................................................................................ 272
14.10 Unique LCF Examples..................................................................................................................................................273
14.10.1 Configuring Linker File to Several ROM Blocks........................................................................................273
14.10.2 Place the Library File in the LCF.................................................................................................................273
14.10.3 Place Symbols in Specific Memory Location..............................................................................................274
14.10.4 How to Relocate Code in RAM................................................................................................................... 275
14.11 Linker Command File Commands................................................................................................................................276
14.11.1 AGGRESSIVE_MERGE.............................................................................................................................276
14.11.2 AGGRESSIVE_MERGE_FILES................................................................................................................ 276
14.11.3 AGGRESSIVE_MERGE_SECTIONS........................................................................................................277
14.11.4 DO_NOT_MERGE......................................................................................................................................277
14.11.5 DO_NOT_MERGE_FILES.........................................................................................................................277
14.11.6 DO_NOT_MERGE_SECTIONS.................................................................................................................278
14.11.7 INIT..............................................................................................................................................................278
14.11.8 FORCEFILES.............................................................................................................................................. 279
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.x, 06/2015
16 Freescale Semiconductor, Inc.
Section number Title Page
14.11.9 SHORTEN_NAMES_FOR_TOR_101....................................................................................................... 279
Chapter 15
C Compiler
15.1 Extensions to Standard C..............................................................................................................................................281
15.1.1 Controlling Standard C Conformance..........................................................................................................281
15.1.2 C++-style Comments................................................................................................................................... 282
15.1.3 Unnamed Arguments................................................................................................................................... 282
15.1.4 Extensions to the Preprocessor.................................................................................................................... 282
15.1.5 Non-Standard Keywords..............................................................................................................................283
15.1.6 Declaring Variables by Address.................................................................................................................. 283
15.2 C99 Extensions............................................................................................................................................................. 283
15.2.1 Controlling C99 Extensions.........................................................................................................................284
15.2.2 Trailing Commas in Enumerations.............................................................................................................. 284
15.2.3 Compound Literal Values............................................................................................................................ 285
15.2.4 Designated Initializers..................................................................................................................................285
15.2.5 Predefined Symbol __func__.......................................................................................................................286
15.2.6 Implicit Return From main()........................................................................................................................286
15.2.7 Non-constant Static Data Initialization........................................................................................................286
15.2.8 Variable Argument Macros..........................................................................................................................286
15.2.9 Extra C99 Keywords....................................................................................................................................287
15.2.10 C++-Style Comments...................................................................................................................................287
15.2.11 C++-Style Digraphs..................................................................................................................................... 288
15.2.12 Empty Arrays in Structures..........................................................................................................................288
15.2.13 Hexadecimal Floating-Point Constants........................................................................................................288
15.2.14 Variable-Length Arrays............................................................................................................................... 289
15.2.15 Unsuffixed Decimal Literal Values............................................................................................................. 290
15.2.16 C99 Complex Data Types............................................................................................................................290
15.3 GCC Extensions............................................................................................................................................................291
15.3.1 Controlling GCC Extensions....................................................................................................................... 291
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.x, 06/2015
Freescale Semiconductor, Inc. 17
Section number Title Page
15.3.2 Initializing Automatic Arrays and Structures.............................................................................................. 291
15.3.3 The sizeof() Operator...................................................................................................................................292
15.3.4 Statements in Expressions............................................................................................................................292
15.3.5 Redefining Macros.......................................................................................................................................293
15.3.6 The typeof() Operator.................................................................................................................................. 293
15.3.7 Void and Function Pointer Arithmetic.........................................................................................................293
15.3.8 The __builtin_constant_p() Operator...........................................................................................................294
15.3.9 Forward Declarations of Static Arrays.........................................................................................................294
15.3.10 Omitted Operands in Conditional Expressions............................................................................................294
15.3.11 The __builtin_expect() Operator..................................................................................................................295
15.3.12 Void Return Statements............................................................................................................................... 295
15.3.13 Minimum and Maximum Operators............................................................................................................ 296
15.3.14 Local Labels.................................................................................................................................................296
Chapter 16
C++ Compiler
16.1 C++ Compiler Performance..........................................................................................................................................297
16.1.1 Precompiling C++ Source Code.................................................................................................................. 297
16.1.2 Using the Instance Manager.........................................................................................................................298
16.2 Extensions to Standard C++......................................................................................................................................... 298
16.2.1 __PRETTY_FUNCTION__ Identifier........................................................................................................ 298
16.2.2 Standard and Non-Standard Template Parsing............................................................................................ 298
16.3 Implementation-Defined Behavior............................................................................................................................... 301
16.4 GCC Extensions............................................................................................................................................................303
Chapter 17
Precompiling
17.1 What Can be Precompiled............................................................................................................................................ 305
17.2 Using a Precompiled File..............................................................................................................................................306
17.3 Creating a Precompiled File..........................................................................................................................................306
17.3.1 Precompiling a File in the CodeWarrior IDE.............................................................................................. 306
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.x, 06/2015
18 Freescale Semiconductor, Inc.
Section number Title Page
17.3.2 Precompiling a File on the Command Line................................................................................................. 307
17.3.3 Updating a Precompiled File Automatically................................................................................................307
17.3.4 Preprocessor Scope in Precompiled Files.................................................................................................... 307
Chapter 18
Intermediate Optimizations
18.1 Interprocedural Analysis...............................................................................................................................................309
18.1.1 Invoking Interprocedural Analysis...............................................................................................................309
18.1.2 Function-Level Optimization.......................................................................................................................310
18.1.3 File-Level Optimization...............................................................................................................................310
18.1.4 Program-Level Optimization....................................................................................................................... 310
18.1.5 Program-Level Requirements...................................................................................................................... 311
18.1.5.1 Dependencies Among Source Files........................................................................................... 311
18.1.5.2 Function and Top-level Variable Declarations.......................................................................... 311
18.1.5.3 Type Definitions........................................................................................................................ 312
18.1.5.4 Unnamed Structures and Enumerations in C............................................................................. 313
18.2 Intermediate Optimizations...........................................................................................................................................313
18.2.1 Dead Code Elimination................................................................................................................................313
18.2.2 Expression Simplification............................................................................................................................314
18.2.3 Common Subexpression Elimination...........................................................................................................315
18.2.4 Copy Propagation.........................................................................................................................................316
18.2.5 Dead Store Elimination................................................................................................................................317
18.2.6 Live Range Splitting.................................................................................................................................... 318
18.2.7 Loop-Invariant Code Motion....................................................................................................................... 320
18.2.8 Strength Reduction.......................................................................................................................................321
18.2.9 Loop Unrolling.............................................................................................................................................322
18.3 Inlining..........................................................................................................................................................................323
18.3.1 Choosing Which Functions to Inline .......................................................................................................... 323
18.3.2 Inlining Techniques......................................................................................................................................325
Chapter 19
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.x, 06/2015
Freescale Semiconductor, Inc. 19
Section number Title Page
Power Architecture Optimizations
19.1 Code Merging............................................................................................................................................................... 327
Chapter 20
Inline-Assembly for Power Architecture Build Tools
20.1 Assembly Syntax.......................................................................................................................................................... 329
20.1.1 Specifying Inline Assembly Statements...................................................................................................... 330
20.1.2 Function-Level Inline Assembly..................................................................................................................330
20.1.3 Statement-Level Inline Assembly................................................................................................................331
20.1.4 GCC - Style Inline Assembly.......................................................................................................................331
20.1.5 Branch Prediction.........................................................................................................................................332
20.1.6 PC-Relative Addressing...............................................................................................................................332
20.1.7 Normal, Record, and Overflow Forms.........................................................................................................333
20.1.8 Creating Statement Labels........................................................................................................................... 333
20.1.9 Using Comments..........................................................................................................................................334
20.1.10 Using the Preprocessor.................................................................................................................................335
20.2 Referring to Assembly, C, and C++ Variables............................................................................................................. 335
20.2.1 Using Local Variables and Arguments........................................................................................................ 335
20.2.2 Creating a Stack Frame................................................................................................................................336
20.2.3 Referring to Variables in Instruction Operands........................................................................................... 337
20.2.4 Referring to Variables in Memory...............................................................................................................337
20.2.5 Referring to Registers.................................................................................................................................. 338
20.2.6 Referring to Labels.......................................................................................................................................339
20.2.7 Using Variable Names as Memory Locations............................................................................................. 339
20.2.8 Using Immediate Operands..........................................................................................................................340
20.3 Assembler Directives....................................................................................................................................................341
20.3.1 entry............................................................................................................................................................. 342
20.3.2 fralloc........................................................................................................................................................... 342
20.3.3 frfree.............................................................................................................................................................343
20.3.4 machine........................................................................................................................................................ 343
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.x, 06/2015
20 Freescale Semiconductor, Inc.
剩余572页未读,继续阅读
2022-06-02 上传
2010-05-25 上传
2011-05-31 上传
2021-11-09 上传
2021-12-31 上传
2021-11-18 上传
ppcust
- 粉丝: 38
- 资源: 730
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Java集合ArrayList实现字符串管理及效果展示
- 实现2D3D相机拾取射线的关键技术
- LiveLy-公寓管理门户:创新体验与技术实现
- 易语言打造的快捷禁止程序运行小工具
- Microgateway核心:实现配置和插件的主端口转发
- 掌握Java基本操作:增删查改入门代码详解
- Apache Tomcat 7.0.109 Windows版下载指南
- Qt实现文件系统浏览器界面设计与功能开发
- ReactJS新手实验:搭建与运行教程
- 探索生成艺术:几个月创意Processing实验
- Django框架下Cisco IOx平台实战开发案例源码解析
- 在Linux环境下配置Java版VTK开发环境
- 29街网上城市公司网站系统v1.0:企业建站全面解决方案
- WordPress CMB2插件的Suggest字段类型使用教程
- TCP协议实现的Java桌面聊天客户端应用
- ANR-WatchDog: 检测Android应用无响应并报告异常
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功