RealView Developer Suite CodeWarrior ® IDEGuide

Version 2.2


Table of Contents

Preface
About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback
Feedback on the RealView Developer Suite
Feedback on this book
1. Introduction
1.1. About the CodeWarrior IDE
1.2. About the CodeWarrior IDE for the RealViewDeveloper Suite
1.2.1. Unused menu commands and windows
1.2.2. Converting other IDE projects and files
1.3. Where to go from here
1.3.1. Online documentation and online help
2. Working with Files
2.1. About working with files
2.2. Creating and opening files
2.2.1. Creating a new file
2.2.2. Opening files from the File menu
2.2.3. Opening files from the project window
2.2.4. Opening header files from an editorwindow
2.3. Saving files
2.3.1. Saving project files
2.3.2. Saving editor files
2.3.3. Saving a backup copy of a file
2.4. Closing files
2.4.1. Closing project files
2.4.2. Closing editor files
2.5. Printing files
2.5.1. Setting print options
2.5.2. Printing a window
2.6. Reverting to the most recently savedversion of a file
2.7. Comparing and merging files and folders
2.7.1. File comparison and merge overview
2.7.2. Choosing files to compare
2.7.3. Applying and unapplying differences
2.7.4. Choosing folders to compare
2.7.5. Comparing XML-formatted projects
3. Working with Projects
3.1. About working with projects
3.1.1. Project structure overview
3.2. Overview of the project window
3.2.1. Navigating the project window
3.2.2. Project views
3.3. Working with simple projects
3.3.1. Creating a new project
3.3.2. Opening a project
3.3.3. Closing a project
3.3.4. Saving a project
3.3.5. Choosing a default project
3.3.6. Moving a project
3.3.7. Importing and exporting a project asXML
3.4. Working with project windows
3.4.1. Projects displayed using the MDI interface
3.4.2. Projects displayed using the FDI interface
3.5. Working with project workspaces
3.5.1. Saving the current workspace or creatinga new workspace
3.5.2. Opening workspaces
3.5.3. Closing workspaces
3.6. Working with project stationery
3.6.1. The project stationery folder
3.6.2. ARM project stationery
3.7. Managing files in a project
3.7.1. Selecting files and groups
3.7.2. Adding files to a project
3.7.3. Grouping files in a project
3.7.4. Moving files and groups
3.7.5. Removing files and groups
3.7.6. Touching and untouching files
3.7.7. Examining and changing project informationfor a file
3.8. Configuring the CodeWarrior IDE forcomplex or multi-user projects
3.9. Working with multiple build targetsand subprojects
3.9.1. Overview of complex projects
3.9.2. Creating a new build target
3.9.3. Assigning files to build targets
3.9.4. Changing a build target name
3.9.5. Assigning build target dependencies
3.9.6. Building all targets in a project
3.9.7. Creating subprojects within projects
3.9.8. Main steps required for compilingand linking a subproject
3.9.9. Subprojects with multiple build targets
4. Working with the ARM Project Stationery
4.1. About the ARM Project stationery
4.1.1. ARM Executable Image
4.1.2. Thumb Executable Image
4.1.3. ARM Object Library
4.1.4. Thumb Object Library
4.1.5. Thumb ARM Interworking Image
4.1.6. Predefined build targets
4.2. Working with an existing ARM project
4.2.1. Opening an existing CodeWarrior project
4.2.2. Building the imagefor your project
4.2.3. Running the image in the Debugger
4.3. Using the Thumb ARM interworking stationery
4.3.1. Before you begin
4.3.2. Creating an ARM Thumb interworkingproject
4.3.3. Adding source files to the build targets
4.3.4. Building the image
4.3.5. Running the image in the debugger
4.4. Creating binary ROM images
4.5. Creating a project that builds anobject library and ROM images
4.5.1. Summary of the project
4.5.2. Creating the CodeWarrior project
4.5.3. Setting up the build target for thelibrary
4.5.4. Creating the application build target
4.5.5. Assign the build target dependencies
4.5.6. Adding the sources to the appropriatebuild targets
4.5.7. Creating the application.bin ROM image
4.5.8. Creating the application.m32 ROM image
4.6. Creating a project with a subproject
4.6.1. Creating the library project
4.6.2. Setting up the build target for thelibrary
4.6.3. Adding the sources to the build target
4.6.4. Removing the vfp_support build targetfrom the main project
4.6.5. Adding a project as a subproject
4.7. Creating your own project stationery
4.7.1. Rules for creating project stationery
4.7.2. Creating project stationery
4.8. Converting ARM projects to Thumb projects
4.9. Converting Executable Image projectsto Library projects
4.10. Compiling and linking a project
4.10.1. Overview of compiling and linking
4.10.2. Compiling files
4.10.3. Making a project
4.10.4. Removing objects from a project
4.11. Processing output
4.11.1. Disassembling code
4.11.2. Converting output ELF images to otherformats
4.11.3. Creating libraries with the ARM RealViewLibrarian
4.12. Running batch files with the batchrunner
4.12.1. Configuring file mappings to recognizebatch files
4.12.2. Configuring the batch runner as thepostlinker
4.12.3. Adding batch files and making thebuild target
5. Working with the ARM Debuggers
5.1. About working with the ARM debuggers
5.1.1. How the ARM debuggers work with theCodeWarrior IDE
5.2. Generating debug information
5.2.1. Generating debug information for individualsource files
5.2.2. Generating debug information for allsource files in a build target
5.3. Running and debugging your code
5.3.1. Running a project
5.3.2. Debugging a project
5.4. Using the message window
5.4.1. Overview of the message window
5.4.2. Using the message window
6. Editing Source Code
6.1. About editing source code
6.2. Overview of the editor window
6.3. Configuring the editor window
6.3.1. Setting text size and font
6.3.2. Displaying window controls
6.3.3. Splitting the window into panes
6.3.4. Saving editor window settings
6.4. Editing text
6.4.1. Basic editor window navigation
6.4.2. Basic text editing
6.4.3. Selecting text
6.4.4. Moving text with drag and drop
6.4.5. Balancing punctuation
6.4.6. Formatting code
6.4.7. Completing code
6.4.8. Shifting text left and right
6.4.9. Undoing changes
6.4.10. Controlling color
6.5. Navigating text
6.5.1. Finding a function
6.5.2. Finding symbol definitions
6.5.3. Using markers
6.5.4. Using bookmarks
6.5.5. Going to a specific line
6.5.6. Using Go Back and Go Forward
6.5.7. Opening a related header file
7. Searching and Replacing Text
7.1. About finding and replacing text
7.2. Finding and replacing text in a singlefile
7.2.1. Searching for selected text
7.2.2. Finding and replacing text with theFind and Replace dialog
7.3. Finding and replacing text in multiplefiles
7.3.1. Using multi-file search
7.3.2. Using file sets
7.4. Using grep-style regular expressions
7.4.1. Special operators
7.4.2. Using regular expressions
8. Working with the Browser
8.1. About working with the browser
8.1.1. Understanding the browser strategy
8.2. Enabling browser data production
8.2.1. Configuring browser options
8.3. Using browser views
8.3.1. Viewing data by class with the Classbrowser view
8.3.2. Viewing data by type with the Contentsview
8.3.3. Viewing class hierarchies and inheritancewith the hierarchy view
8.4. Using the browser
8.4.1. Using Go Back and Go Forward
8.4.2. Using the Browser context menu
8.4.3. Finding declarations, definitions,overrides, and multiple implementations
8.4.4. Using symbol name completion
8.4.5. Editing code in the browser
8.5. Creating classes and members with browserwizards
8.5.1. Using the New Class wizard
8.5.2. Using the New Member Function wizard
8.5.3. Using the New Data Member wizard
9. Configuring IDE Options
9.1. About configuring the CodeWarriorIDE
9.2. Overview of the IDE Preferences window
9.2.1. Using the IDE Preferences window
9.3. Choosing general preferences
9.3.1. Configuring build settings
9.3.2. Configuring concurrent compiles
9.3.3. Configuring IDE extras
9.3.4. Configuring plug-in settings
9.3.5. Configuring shielded folders
9.3.6. Configuring global source trees
9.4. Choosing editor preferences
9.4.1. Code completion
9.4.2. Code formatting
9.4.3. Editor settings
9.4.4. Font & Tabs
9.4.5. Text Colors
9.5. Choosing debugger preferences
9.6. Choosing RAD Tools
9.7. Setting commands and key bindings
9.7.1. Opening the Customize IDE Commandswindow
9.7.2. Adding your own commands to the CodeWarrior IDE
9.7.3. Customizing keybindings
9.8. Customizing toolbars
9.8.1. Toolbar overview
9.8.2. Showing and hiding a toolbar
9.8.3. Modifying a toolbar
10. Configuring a Build Target
10.1. About configuring a build target
10.1.1. Configuration recommendations
10.1.2. Creating project stationery
10.2. Overview of the Target Settings window
10.2.1. Using the Target Settings window
10.3. Configuring general build target options
10.3.1. Configuring target settings
10.3.2. Configuring access paths
10.3.3. Configuring build extras
10.3.4. Configuring runtime settings
10.3.5. Configuring file mappings
10.3.6. Configuring source trees
10.3.7. Configuring the RealView target
10.4. Using the Equivalent Command Linetext box
10.5. Configuring assembler and compilerlanguage settings
10.5.1. Configuring the RealView assembler
10.5.2. Configuring the RealView compiler
10.6. Configuring linker settings
10.6.1. Configuring the RealView linker
10.6.2. Configuring RealView fromelf
10.7. Configuring editor settings
10.7.1. Custom Keywords
10.8. Configuring the debugger
10.8.1. Analyzer Connections
10.8.2. Other Executables
10.8.3. Debugger Settings
10.8.4. Remote Debugging
10.8.5. Configuring the ARM Debuggers
10.8.6. Configuring the RealView Runner
10.9. Configuring Miscellaneous features
10.9.1. RealView Disassembly Features
A. Running the CodeWarrior IDE from the Command Line and CommandWindow
A.1. Using the CodeWarrior IDE from thecommand line
A.2. Using the CodeWarrior Command window
A.2.1. Opening the Command window
A.2.2. Supported commands
B. CodeWarrior IDE Installation and Preference Settings
B.1. The CodeWarrior IDE preferences directory
B.2. The RVCT22BIN environment variable
B.3. Using different versions of the CodeWarriorIDE
B.4. Using the cwfileassoc tool
B.4.1. cwfileassoc command syntax
B.4.2. Example
C. CodeWarrior Project Conversion Utilities
C.1. Introduction
C.2. Converting CodeWarrior for ADS projects
C.2.1. Fixing options that cannot be importedfrom ADS
C.3. Converting GNU Makefiles
C.3.1. Importing GNU makefiles into projects
C.3.2. Exporting projects to GNU Makefiles
C.4. Converting RVD project files
C.4.1. Converting RVD Standard and Libraryprojects
C.4.2. Converting RealView Debugger Containerprojects
C.4.3. Converting RealView Debugger Customprojects
D. CodeWarrior IDE Reference
D.1. CodeWarrior IDE menu reference
D.1.1. File menu
D.1.2. Edit menu
D.1.3. View menu
D.1.4. Search menu
D.1.5. Project menu
D.1.6. Browser menu
D.1.7. Window menu
D.1.8. Help menu
D.1.9. Toolbar submenu
D.1.10. System submenu
D.2. CodeWarrior IDE default key bindings
D.2.1. File menu
D.2.2. Edit menu
D.2.3. View menu
D.2.4. Search menu
D.2.5. Project menu
D.2.6. Window menu
D.2.7. Miscellaneous
D.2.8. Editor commands
Glossary

List of Figures

1.1. Context-sensitive Help for CodeWarriorpanels customized by ARM
1.2. Bubble-help for CodeWarrior panels
2.1. The New dialog box
2.2. Add new file to project
2.3. Open dialog box
2.4. Group drop-down menu
2.5. Header Files drop-down menu in theproject window
2.6. Find and open file dialog box
2.7. Save As dialog box
2.8. Save A Copy As dialog box
2.9. Unsaved changes alert
2.10. Revert to a previous file
2.11. The File Compare Results window
2.12. Compare Files Setup window
2.13. Applied difference
2.14. Applied all differences
2.15. Compare Folders Setup dialog box
2.16. Folder Compare Results window
2.17. Export project as dialog box
3.1. Typical CodeWarrior Project window
3.2. View tabs at the top of the projectwindow
3.3. Project window Files view
3.4. Example Link Order view
3.5. Example Targets view
3.6. New dialog box
3.7. Open dialog
3.8. Project displayed using the MDI interface
3.9. MDI interface showing all windowdisplay options
3.10. Docked and stacked file and project windows
3.11. Project displayed using the FDI interface
3.12. CodeWarrior Alert dialog box
3.13. Adding files to a project
3.14. Add files to targets dialog box
3.15. Create Group dialog
3.16. Rename group dialog
3.17. Expanding groups and subgroups
3.18. Moving a file
3.19. Remove file confirmation dialog
3.20. Synchronize modification dates
3.21. Project Inspector window for attributes
3.22. Project Inspector window for targets
3.23. Build target drop-down list
3.24. Targets view
3.25. Targets view tab
3.26. New Target dialog box
3.27. The target column
3.28. Project Inspector window for targets
3.29. Renaming a build target
3.30. Creating a new build target
3.31. Dragging a build target
3.32. Dependent build target
3.33. Adding files to the dependent buildtarget
3.34. Linking output from a dependent buildtarget
3.35. Building all build targets
3.36. Multiple build targets in subprojects
4.1. New project dialog box
4.2. Interworking project Files view
4.3. Add ARM files
4.4. Interworking project Files view
4.5. New project for tutorial
4.6. Release Settings panel
4.7. Assigning build target dependencies
4.8. File view for current build target
4.9. Adding a subproject
4.10. Project with subproject Files view
4.11. Subproject build target view
4.12. Selecting subproject build targetsfor building
4.13. RealView compiler panel
4.14. Select Thumb initial state
4.15. Select the ARM RealView librarian
4.16. Build Progress window
4.17. Link Order view
4.18. Remove Objects dialog box
4.19. Specifying batch file mappings
4.20. Target Settings panel
4.21. Setting the link order
5.1. Debug Info markers
5.2. RealView compiler Debug/Opt panel
5.3. The Run button
5.4. The Errors & Warnings messagewindow
5.5. Statement arrow pointing to an error
6.1. The editor window
6.2. Header files drop-down menu
6.3. Functions drop-down menu
6.4. The Marker drop-down menu
6.5. The Document Settings drop-down menu
6.6. Toolbar at bottom of Editor window
6.7. Multiple panes in a window
6.8. Code completion window
6.9. The Functions drop-down menu withselected function
6.10. Add Marker dialog box
6.11. Example text file with a marker added
6.12. Remove Markers dialog box
6.13. Editor window containing a bookmark
6.14. Line Number dialog box
6.15. The Header Files drop-down menu
7.1. The Find and replace dialog box
7.2. Search Results window
7.3. The Find in Files dialog
7.4. The In Folders tab in the Find in Files Window
7.5. The In Projects tab in the Find in Files Window
7.6. The In Symbols tab in the Find inFiles Window
7.7. The In Files tab in the Find in FilesWindow
7.8. The Save File Set dialog
7.9. Remove File Sets dialog box
7.10. Regexp checkbox
8.1. Build extras settings panel
8.2. A Class browser view
8.3. The Classes pane
8.4. Member functions, data members, anddeclaration for class circle
8.5. Access filters drop-down list
8.6. Browser access filter icons
8.7. A Contents window
8.8. The Multi-class hierarchy window
8.9. Ancestor drop-down list
8.10. Go Back and Go Forward toolbar buttons
8.11. A Browser context menu for a function
8.12. Using symbol name completion
8.13. Inserting a function template
8.14. Symbol window for a multiply definedfunction
8.15. The Symbol window
8.16. New C++ Class: Name and Location
8.17. New C++ Class: Base Class and Methods
8.18. New C++ Class: Include Files
8.19. New C++ Class: Targets
8.20. New class summary
8.21. New Member Function: Member FunctionDeclaration
8.22. New Member Function: File Locations
8.23. New member function declaration summary
8.24. New Data Member wizard: Data MemberDeclaration
8.25. New Data Member wizard: File Locations
8.26. New data member summary
9.1. The IDE Preferences panel
9.2. Preferences Confirmation dialog box
9.3. Build Settings preference panel
9.4. Concurrent Compiles preference panel
9.5. IDE Extras preference panel
9.6. Plugin settings panel
9.7. Shielded Folders settings panel
9.8. Source Trees panel
9.9. Code Completion configuration panel
9.10. Code Formatting configuration panel
9.11. Editor Settings preference panel
9.12. Font & Tabs preference panel
9.13. Text Coloring preference panel
9.14. Custom Keywords dialog box
9.15. Key Bindings panel
9.16. List of Edit commands
9.17. Configuring a new command
9.18. Mail selection command
9.19. Creating a new group
9.20. Selecting the quote key
9.21. New Key binding for the Quote key
9.22. Edit Keybinding dialog
9.23. The Project window toolbar
9.24. The editor window with hidden toolbar
9.25. Dragging a toolbar element
10.1. Select build target
10.2. Selecting a settings panel
10.3. Settings Confirmation dialog box
10.4. Target Settings panel
10.5. Access Paths settings panel
10.6. Access paths detail
10.7. Select an Access Path dialog box
10.8. Build Extras settings panel
10.9. File Mappings panel
10.10. Source Trees panel
10.11. Example Select Access path dialogbox
10.12. RealView Target panel
10.13. Equivalent Command Line text box
10.14. RealView Assembler Target panel
10.15. RealView Assembler PCS panel
10.16. RealView Assembler Options panel
10.17. RealView Assembler Predefines panel
10.18. RealView Assembler Listing Controlpanel
10.19. RealView Assembler Diagnostics panel
10.20. RealView Assembler Extras panel
10.21. RealView compiler Target and Sourcepanel
10.22. RealView compiler PCS panel
10.23. RealView compiler Source panel
10.24. RealView Compiler Debug and optimizationpanel
10.25. RealView Compiler Preprocessor panel
10.26. RealView Compiler Code Gen panel
10.27. RealView compiler Diagnostics panel
10.28. RealView Compiler Extras panel
10.29. RealView linker Output panel
10.30. RealView Linker Options panel
10.31. RealView Linker Layout panel
10.32. RealView Linker Listings panel
10.33. RealView Linker Diagnostics panel
10.34. RealView Linker Extras panel
10.35. RealView fromELF output panel
10.36. RealView fromELF Text panel
10.37. RealView fromELF Diagnostics panel
10.38. RealView fromELF Extras panel
10.39. Custom Keywords settings panel
10.40. Choose debugger panel
10.41. Armsd1 configuration panel
10.42. Armsd2 configuration panel
10.43. Arguments panel
10.44. RealView Disassembly panel
A.1. Command window
A.2. Running the project (proj) command
C.1. Convert Project dialog box
C.2. Makefile Importer Wizard
C.3. Makefile importer summary

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarksof ARM Limited in the EU and other countries, except as otherwisestated below in this proprietary notice. Other brands and names mentionedherein may be the trademarks of their respective owners.

CodeWarrior ® and Metrowerks ® are registered trademarksof Metrowerks, Inc.

Neither the whole nor any part of the information containedin, or the product described in, this document may be adapted orreproduced in any material form except with the prior written permissionof the copyright holder.

The product described in this document is subject to continuousdevelopments and improvements. All particulars of the product andits use contained in this document are given by ARM Limited in goodfaith. However, all warranties implied or expressed, including butnot limited to implied warranties of merchantability, or fitnessfor purpose, are excluded.

This document is intended only to assist the reader in theuse of the product. ARM Limited shall not be liable for any lossor damage arising from the use of any information in this document,or any error or omission in such information, or any incorrect useof the product.

ConfidentialityStatus

This document is Non-Confidential. The right to use, copyand disclose this document may be subject to license restrictionsin accordance with the terms of the agreement entered into by ARMand the party that ARM delivered this document to.

Product Status

The information in this document is final, that is for a developedproduct.

Revision History
Revision A October1999 Release 1.0 (ADS)
Revision B March2000 Release 1.0.1 (ADS)
Revision C November2000 Release 1.1 (ADS)
Revision D November2001 Release 1.2 (ADS)
Revision E May2005 RVDS 2.2 Release
Copyright © 1999-2005 ARM Limited. All rights reserved. ARM DUI 0065E
Non-Confidential