ARM DS-5 Using Eclipse

ARM DS-5 Using Eclipse

Copyright © 2010-2012 ARM. All rights reserved.

ARM DUI 0480I (ID022212)

ARM

®

DS-5

Version 5.9

Using Eclipse

ARM DUI 0480I

ID022212

ARM DS-5

Using Eclipse

Copyright © 2010-2012 ARM. All rights reserved.

Release Information

The following changes have been made to this book.

Change History

Date

June 2010

September 2010

November 2010

January 2011

May 2011

July 2011

September 2011

November 2011

February 2012

Issue

F

G

D

E

H

I

A

B

C

Confidentiality

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Non-Confidential

Change

First release for DS-5

Update for DS-5 version 5.2

Update for DS-5 version 5.3

Update for DS-5 version 5.4

Update for DS-5 version 5.5

Update for DS-5 version 5.6

Update for DS-5 version 5.7

Update for DS-5 version 5.8

Update for DS-5 version 5.9

Proprietary Notice

Words and logos marked with

®

or

are registered trademarks or trademarks of ARM in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

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

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

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

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Confidentiality Status

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

Product Status

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

Web Address

http://www.arm.com

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

ii

Contents

ARM DS-5 Using Eclipse

Chapter 1

Chapter 2

ARM DUI 0480I

ID022212

Conventions and feedback

Getting started with Eclipse

2.9

2.10

2.11

2.12

2.13

2.14

2.15

2.16

2.5

2.6

2.7

2.8

2.1

2.2

2.3

2.4

2.17

2.18

2.19

2.20

2.21

2.22

2.23

2.24

2.25

About Eclipse ........................................................................................................... 2-3

Launching Eclipse .................................................................................................... 2-4

Using the welcome screen ....................................................................................... 2-5

Overview of the workbench window ........................................................................ 2-7

Workbench features ................................................................................................. 2-9

Workspace ............................................................................................................. 2-10

Resources .............................................................................................................. 2-12

About working sets ................................................................................................ 2-16

Creating a working set ........................................................................................... 2-17

Changing the top level element when displaying working sets .............................. 2-20

Deselecting a working set ...................................................................................... 2-21

Perspectives and views ......................................................................................... 2-22

Menus .................................................................................................................... 2-26

Toolbars ................................................................................................................. 2-27

Editing source code ............................................................................................... 2-28

Configuring Eclipse ................................................................................................ 2-30

Preferences dialog box .......................................................................................... 2-31

Properties dialog box ............................................................................................. 2-33

Importing and exporting options ............................................................................ 2-35

Using the import wizard ......................................................................................... 2-36

Using the export wizard ......................................................................................... 2-37

Accessing the dynamic help .................................................................................. 2-38

Using ARM-specific cheat sheets .......................................................................... 2-39

Installing new features ........................................................................................... 2-41

Restrictions of use ................................................................................................. 2-42

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

iii

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Contents

Working with projects

3.5

3.6

3.7

3.8

3.1

3.2

3.3

3.4

Project types ............................................................................................................ 3-2

Creating a new C or C++ project ............................................................................. 3-4

Creating a new Makefile project for an ARM Linux target ....................................... 3-6

Importing an existing Eclipse project ....................................................................... 3-8

Setting up the compilation tools for a specific build configuration ......................... 3-11

Configuring the C/C++ build behavior .................................................................... 3-13

Updating a project to a new toolchain .................................................................... 3-15

Adding a new source file to your project ................................................................ 3-16

Working with editors

4.1

4.2

4.3

4.4

4.5

4.6

4.7

4.8

4.9

4.10

4.11

Overview of the C/C++ editor .................................................................................. 4-2

Overview of the ARM assembler editor ................................................................... 4-3

Overview of the ELF content editor ......................................................................... 4-4

ELF content editor - Header tab .............................................................................. 4-5

ELF content editor - Sections tab ............................................................................ 4-6

ELF content editor - Segments tab .......................................................................... 4-7

ELF content editor - Symbol Table tab .................................................................... 4-8

ELF content editor - Disassembly tab ...................................................................... 4-9

Overview of the scatter file editor .......................................................................... 4-10

Creating a scatter file ............................................................................................. 4-11

Importing a memory map from a BCD file ............................................................. 4-13

Working with Remote System Explorer

5.1

5.2

5.3

5.4

5.5

Overview of the Remote System Explorer ............................................................... 5-2

Remote Systems view ............................................................................................ 5-3

Remote System Details view ................................................................................... 5-4

Remote Scratchpad view ......................................................................................... 5-5

Terminals view ......................................................................................................... 5-6

Terminology, shortcuts and icons

6.1

6.2

6.3

Terminology ............................................................................................................. 6-2

Keyboard shortcuts .................................................................................................. 6-3

Menu and toolbar icons ........................................................................................... 6-5

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

iv

Chapter 1

Conventions and feedback

ARM DUI 0480I

ID022212

The following describes the typographical conventions and how to give feedback:

Typographical conventions

The following typographical conventions are used: monospace

Denotes text that can be entered at the keyboard, such as commands, file and program names, and source code.

monospace

Denotes a permitted abbreviation for a command or option. The underlined text can be entered instead of the full command or option name.

monospace italic

Denotes arguments to commands and functions where the argument is to be replaced by a specific value.

monospace bold

Denotes language keywords when used outside example code.

italic bold

Highlights important notes, introduces special terminology, denotes internal cross-references, and citations.

Highlights interface elements, such as menu names. Also used for emphasis in descriptive lists, where appropriate, and for ARM

® processor signal names.

Feedback on this product

If you have any comments and suggestions about this product, contact your supplier and give: your name and company

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

1-1

Conventions and feedback

• the serial number of the product details of the release you are using details of the platform you are using, such as the hardware platform, operating system type and version a small standalone sample of code that reproduces the problem a clear explanation of what you expected to happen, and what actually happened the commands you used, including any command-line options sample output illustrating the problem the version string of the tools, including the version number and build numbers.

Feedback on content

If you have comments on content then send an e-mail to [email protected]

. Give:

• the title the number, ARM DUI 0480I

• if viewing online, the topic names to which your comments apply if viewing a PDF version of a document, the page numbers to which your comments apply

• a concise explanation of your comments.

ARM also welcomes general suggestions for additions and improvements.

ARM periodically provides updates and corrections to its documentation on the ARM

Information Center, together with knowledge articles and Frequently Asked Questions (FAQs).

Other information

ARM Information Center, http://infocenter.arm.com/help/index.jsp

ARM Technical Support Knowledge Articles, http://infocenter.arm.com/help/topic/com.arm.doc.faqs

Support and Maintenance, http://www.arm.com/support/services/support-maintenance.php

ARM Glossary, http://infocenter.arm.com/help/topic/com.arm.doc.aeg0014-/index.html.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

1-2

Chapter 2

Getting started with Eclipse

ARM DUI 0480I

ID022212

The following topics describe how to get started with Eclipse, the C/C++ perspective, the DS-5

Debug perspective, and associated features:

Tasks

Launching Eclipse on page 2-4

Using the welcome screen on page 2-5

Creating a working set on page 2-17

Changing the top level element when displaying working sets on page 2-20

Deselecting a working set on page 2-21

Using the import wizard on page 2-36

Using the export wizard on page 2-37

Accessing the dynamic help on page 2-38

Using ARM-specific cheat sheets on page 2-39

Installing new features on page 2-41 .

Concepts

About Eclipse on page 2-3

Overview of the workbench window on page 2-7

About working sets on page 2-16 .

Reference

Workbench features on page 2-9

Workspace on page 2-10

Resources on page 2-12

Perspectives and views on page 2-22

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-1

Menus on page 2-26

Toolbars on page 2-27

Editing source code on page 2-28

Configuring Eclipse on page 2-30

Preferences dialog box on page 2-31

Properties dialog box on page 2-33

Importing and exporting options on page 2-35

Restrictions of use on page 2-42

.

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-2

Getting started with Eclipse

2.1

About Eclipse

Eclipse for DS-5 is an Integrated Development Environment (IDE) that combines the Eclipse

IDE from the Eclipse Foundation with the compilation and debug technology of the ARM

® tools. It also combines the GNU toolchain for ARM Linux targets. You can use it as a project manager to create, build, debug, monitor, and manage projects for ARM targets. It uses a single folder called a workspace to store files and folders related to specific projects.

2.1.1

See also

Reference

Chapter 2 Getting started with Eclipse .

Other information

EclipseFoundation, http://eclipse.org

GCC, the GNU Compiler Collection, http://gcc.gnu.org

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-3

Getting started with Eclipse

2.2

Launching Eclipse

To launch Eclipse:

On Windows, select Start

All Programs ARM DS-5 Eclipse for DS-5.

On Linux:

— If you installed the shortcut during installation, you can select Eclipse for DS-5 in the Applications menu.

— If you did not install the shortcut during installation:

1.

Add the

install_directory/bin

directory to your

PATH

environment variable.

If it is already configured then you can skip this step.

2.

Open Unix bash shell.

3.

Enter eclipse

at the prompt.

2.2.1

Language packs

Some features of the workbench are translated into different languages.You can download language packs from the Eclipse website when available.

There are two ways to launch the workbench with a different language pack:

If your operating system is running in the language that you want to use then the workbench automatically displays the translated features.

If your operating system is not running in the language that you want to use then you must specify the

-nl

command-line argument when launching the workbench.

For example, to use the Japanese language pack you can use: eclipse -nl ja

2.2.2

See also

Concepts

Using the welcome screen on page 2-5

Overview of the workbench window on page 2-7

.

Reference

Workbench features on page 2-9

Workspace on page 2-10

Importing and exporting options on page 2-35

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-4

Getting started with Eclipse

2.3

Using the welcome screen

When Eclipse launches for the first time, the Workspace Launcher dialog box opens enabling you to select your workspace, accept the default settings and click OK. You are then presented with the welcome screen containing an overview of the main development environment and links to other pages to help you get started.

Note

Some of the links require an active internet connection.

2.3.1

See also

ARM DUI 0480I

ID022212

Figure 2-1 Welcome screen

To access the main development environment click on the close icon in the Welcome to DS-5 tab or click on the Go to the Workbench link on the welcome screen. You can return to the welcome screen at any time by selecting Welcome to DS-5 from the Help menu.

Concepts

Overview of the workbench window on page 2-7

.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-5

Reference

Workbench features on page 2-9

Workspace on page 2-10

Importing and exporting options on page 2-35

.

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-6

Getting started with Eclipse

2.4

Overview of the workbench window

A typical workbench window contains a collections of views that are associated with a specific perspective. For example the Project Explorer view, C/C++ editor, Progress view, Console view, and Problems view are all associated with the C/C++ perspective. Each perspective automatically adds the most useful views when you select it.

DS-5 uses the C/C++ and DS-5 Debug perspectives.

Window Editor Perspective

Perspective toolbar

View toolbar

View menu

ARM DUI 0480I

ID022212

Views

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

Figure 2-2 Typical workbench window

2-7

2.4.1

See also

Getting started with Eclipse

To close the workbench window and exit Eclipse, select Exit from the File menu or click on the close icon in the top corner of the window. On exit, Eclipse saves your settings automatically so that when you next open it, the window returns to the same perspectives and views.

Tasks

Using the welcome screen on page 2-5 .

Reference

Workbench features on page 2-9

Workspace on page 2-10

Importing and exporting options on page 2-35

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-8

Getting started with Eclipse

2.5

Workbench features

The workbench is the main development environment where you can manage individual projects, associated sub-folders, and source files. Each workbench window is linked to one workspace. If you want to use different workspaces at the same time, you can launch several workbench windows and link each one to a different workspace.

This section describes the main workbench features:

Editors

Editors enable you to view and modify the content of a file, for example source files. The tabs in the editor area show files that are currently open for editing.

Menus and Toolbars

The main menu and toolbar are located at the top of the Eclipse window. Other toolbars associated with specific features are located at the top of each perspective or view.

Perspectives Perspectives define the layout of your selected views and editors in Eclipse. They also have their own associated menus and toolbars.

Resources

Resources are projects, files, and folders that exist in your workbench.

Views

Views provide related information corresponding to the active file in the editor.

They also have their own associated menus and toolbars.

Workspace Workspace is an area designated on your file system to store files and folders related to your workbench projects and also your personal workbench settings.

2.5.1

See also

Tasks

Using the welcome screen on page 2-5

Chapter 4 Working with editors

.

Concepts

Overview of the workbench window on page 2-7

.

Reference

Workspace on page 2-10

Resources on page 2-12

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-9

Getting started with Eclipse

2.6

Workspace

The workspace is an area designated on your file system to store files and folders related to your workbench projects and also your personal workbench settings.

Note

ARM recommends that you select a dedicated workspace folder for your workbench projects only. If you select an existing folder containing resources that are not related to workbench projects, you cannot access them in Eclipse. These resources might also cause a conflict later when you create and build projects.

Changes to the customized settings in the Window

Preferences dialog box are saved in your workspace. If you select a different workspace then these settings might be different.

When Eclipse launches for the first time, the Workspace Launcher dialog box opens enabling you to select your workspace.

On subsequent launches the last saved workspace is shown as the default selection in the drop-down menu. You can select another workspace by clicking on the down arrow or the

Browse... button.

Figure 2-3 Workspace launcher dialog box

If required, select the checkbox to disable the Workspace Launcher dialog box from opening on subsequent launches.

Note

You can change the default workspace at any time by selecting Switch Workspace... from the

File menu.

Alternatively, to open Eclipse and automatically link to a specific workspace you can use the

-data

command-line argument. For example: eclipse -data h:\workspace

2.6.1

Editing files outside Eclipse

Project sub-folders and files can be edited even when Eclipse is not running. When you next launch Eclipse, the default preferences enable the relevant views to refresh and update.

Alternatively if you change the default preferences to disable auto-refresh, you can click on the updated sub-folder or file in the Project Explorer view and select Refresh from the File menu.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-10

2.6.2

See also

Tasks

Using the welcome screen on page 2-5 .

Chapter 4 Working with editors

.

Reference

Overview of the workbench window on page 2-7

Workbench features on page 2-9

Resources on page 2-12

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-11

Getting started with Eclipse

2.7

Resources

A resource is a generic term used to describe a project, file, folder or a combination of these.

Resources exist in Eclipse but might not always exist in the workspace. There are three types of resources:

Project

A project is displayed in the Project Explorer view and can be stored within the workspace folder or can be a linked resource.

A project must exist in Eclipse before other resources can be imported or linked to that project. The project creation process creates additional configuration files and folders, for example, build properties. These additional files and folders must not be edited or deleted.

Folder

File

A folder is displayed in the Project Explorer view and can be located within the project folder or can be a linked resource.

A file is displayed in the Project Explorer view and can be located within the project folder or can be a linked resource.

2.7.1

Linked resources

Resources can be shared between projects or they can exist in the file system outside of your selected workspace. To do this a link must be created within Eclipse.

Note

A linked file or folder must have a project as its parent resource.

Deleting, moving or copying a linked resource only affects the link in your workspace and not the resource that it links to. However, deleting a child resource from within a linked folder also deletes it from the file system!

Linked file

To link an existing file to a project in your workspace instead of copying it, you can use the advanced options of the New File wizard. By default the advanced options are not visible, click on the <<Advanced button to reveal them. A path variable can also be used to reference a file.

For more information on referencing with path variables, use the dynamic help.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-12

Getting started with Eclipse

Figure 2-4 Linked file

Linked folder

To link an existing folder to a project in your workspace instead of copying it, you can use the advanced options of the New Folder wizard. By default the advanced options are not visible, click on the <<Advanced button to reveal them. A path variable can also be used to reference a file. For more information on referencing with path variables, use the dynamic help.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-13

Getting started with Eclipse

Figure 2-5 Linked folder

Linked project

Eclipse uses the Import wizard to create a link to an existing project. This can be useful if you have a central folder with shared projects. By default, the Copy projects into workspace checkbox is selected to ensure that a copy of your project is placed in your current workspace.

If you want to leave your project where it is and create a link to it, you must deselect this option.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-14

Getting started with Eclipse

2.7.2

See also

Figure 2-6 Linked project

Disabling the use of linked resources

You can disable the use of linked resources by changing the General

Workspace Linked

Resources settings in the Preferences dialog box.

Tasks

Accessing the dynamic help on page 2-38 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

Preferences dialog box on page 2-31

Adding a new source file to your project on page 3-16 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-15

Getting started with Eclipse

2.8

About working sets

The Project Explorer view usually displays a full list of all your projects associated with the current workspace. If you have a lot of projects it can be difficult to navigate through the list to find the project that you want to use. Creating a working set enables you to group projects together and display a smaller subset of projects. One or more working sets can be selected at the same time or you can use the view menu to switch between one set and another. To return to the original view you can deselect working sets in the view menu.

Working sets are also useful to refine the scope of a search or build projects in a specific working set.

2.8.1

See also

Tasks

Creating a working set on page 2-17

Changing the top level element when displaying working sets on page 2-20

Deselecting a working set on page 2-21 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-16

Getting started with Eclipse

2.9

Creating a working set

To create a working set for related projects:

1.

Click on the View Menu icon in the Project Explorer view toolbar.

2.

Select Select Working Set... from the context menu.

3.

Click New....

Figure 2-7 Creating a new working set

4.

In the working set type, select Resource to group related projects.

5.

Click Next.

ARM DUI 0480I

ID022212

Figure 2-8 Selecting the resource type for the new working set

6.

In the Working set name field, enter a suitable name.

7.

In the Working set contents panel, you can select existing projects that you want to associated with this working or you can return to the wizard later to add projects.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-17

Getting started with Eclipse

Figure 2-9 Adding new resources to a working set

8.

Click Finish.

9.

If required, repeat these steps to create more working sets.

10.

In the Select Working Set dialog box, select the working sets that you want to display in the Project Explorer view.

ARM DUI 0480I

ID022212

Figure 2-10 Select the required working set

11.

Click OK.

The filtered list of projects are displayed in the Project Explorer view. Another feature of working sets that can help with navigation is the option to change the top level element in the

Project Explorer view.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-18

Getting started with Eclipse

2.9.1

See also

Tasks

Changing the top level element when displaying working sets on page 2-20

Deselecting a working set on page 2-21 .

Concepts

About working sets on page 2-16 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-19

Getting started with Eclipse

2.10

Changing the top level element when displaying working sets

In the Project Explorer view, if you have more than one working set then you might want to display the projects in a hierarchical tree with the working set names as the top level element.

This is not selected by default.

To change the top level element in the Project Explorer view:

1.

Click on the View Menu icon in the Project Explorer view toolbar.

2.

Select Top Level Elements from the context menu.

3.

Select either Projects or Working Sets.

2.10.1

See also

Tasks

Creating a working set on page 2-17

Deselecting a working set on page 2-21 .

Concepts

About working sets on page 2-16 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-20

Getting started with Eclipse

2.11

Deselecting a working set

To change the display of projects in the Project Exlorer view and return to the full listing of all the projects in the workspace:

1.

Click on the View Menu icon in the Project Explorer view toolbar.

2.

Select Deselect Working Set from the context menu.

2.11.1

See also

Tasks

Creating a working set on page 2-17

Changing the top level element when displaying working sets on page 2-20 .

Concepts

About working sets on page 2-16 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-21

Getting started with Eclipse

2.12

Perspectives and views

The main workbench window contains one or more perspectives and each perspective contains one or more views.

2.12.1

Perspectives

Perspectives can be opened and customized using the options from the Window menu or you can use the perspective toolbar. By default a perspective opens in the same window, however, you can change the default settings in the Preferences dialog box.

Eclipse for DS-5 focuses on the C/C++ perspective and the DS-5 Debug perspective. You can change perspective by using the perspective toolbar or you can select Window

Open

perspective from the main menu.

Figure 2-11 Changing perspective using the toolbar menu

2.12.2

Views

ARM DUI 0480I

ID022212

A view is a small visual component within Eclipse to navigate through resources or to display specific properties. An editor is a special type of view that enables viewing and editing of source files.

Views can be moved or docked as applicable by dragging and dropping them into position.

Double-clicking on a view tab toggles the maximize/restore options for that view or you can use the relevant toolbar icons. To reset all the views in a perspective to the initial settings and layout you can click on Reset Perspective... in the Window menu.

The following views are useful when building and debugging C/C++ applications:

Editors

Editors are associated with specific file types and open the related editor view automatically when you open an editable file from the Project Explorer view.

General views

Console

Outline

Displays output messages when building projects and also execution messages when running or debugging an application.

Displays a structured list of C/C++ elements in the active file. Clicking on an element changes the editor focus to the position of that element in the active file.

Problems

Displays error messages encountered during a build.

Selecting an error message opens the associated file and moves the focus to the line causing the problem.

Displays the progress meter when a task is in progress.

Progress

Project Explorer Provides a hierarchical view of resources relevant to C/C++ project files. Right-clicking on a resource produces a context menu for specific tasks.

Properties

Displays names and values for the selected item. For example, the last modified time/date for a file.

Help views

Help Contents

Dynamic Help

Displays the installed documentation.

Displays dynamic help for the selected feature.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-22

ARM DUI 0480I

ID022212

Getting started with Eclipse

Cheat Sheets

Displays step by step instructions to help you complete a specific task. Use the view menu to access the list of cheat sheets.

DS-5 Debugger views

App Console

Enables you to interact with the I/O capabilities provided by the semihosting implementation in the ARM

®

C libraries.

ARM Asm Info

Enables you to view more information on an ARM

®

or

Thumb

®

instruction or directive.

Breakpoints

Commands

Debug Control

Displays all the breakpoints and the repsective locations in source code or target memory. Using this view you can add, edit, delete, enable or disable breakpoints.

Provides access to the scripting functionality of the debugger. Most debugger actions are echoed here and you can also execute DS-5 Debugger commands.

Contains a tree hierarchy showing debug connection states, processors, threads and stack frames as applicable.

Disassembly

Expressions

Functions

History

Memory

Modules

Registers

Displays disassembled code.

Enables you to view and edit expressions.

Enables you to view ELF data associated with function symbols for all loaded images.

Provides a historical log of all the executed debugger commands.

Enables you to view and edit the contents of memory.

Enables you to view shared libraries or loaded Operating

System (OS) modules.

Enables you to view and edit registers associated with the selected stack frame. When your application stops, modified values are highlighted.

Screen

Scripts

Target

Trace

Variables

Enables you to display a block of memory as a graphical image. For example, a frame buffer.

Provides access to run and edit script files.

Displays a list of capabilities for the target device that is currently connected to the debugger.

Displays the captured trace information from the debug agent.

Enables you to view and edit variables associated with the selected stack frame.

Remote Systems views

Remote Scratchpad

Enables you to copy and paste or drag and drop local resources to an electronic clipboard for use at a later point in time.

Remote Systems

Enables you to create connections and access resources on the host workstation and remote targets.

Terminals

Enables you to enter shell commands directly on the target without launching any external application.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-23

2.12.3

Trim bar

Getting started with Eclipse

Other views can be added to a perspective but they might not be compatible with all perspectives. To add a view to a perspective:

1.

Ensure that you are in the relevant perspective.

2.

Select Window

Show View Other... to open the Show View dialog box.

3.

Select the required view.

4.

Click OK.

For more information on the other views not listed here, use the dynamic help.

Mimimized views are placed in the trim bar at the edge of the current perspective. By default the trim bar is on the right-hand margin of the perspective but you can drag and drop it to another location if you prefer. In the trim bar, you can double click on a view to restore it or click on the restore icon to restore all the minimized views.

Figure 2-12 Minimized views in the trim area

2.12.4

Fast view bar

Fast views are hidden views that can be accessed quickly from the fast view bar but do not take up space in the current perspective. When you select a fast view it opens in the current perspective but hides again when it loses focus. By default the fast view bar is located at the bottom margin of the current perspective but you can drag and drop it to another location if you prefer.

Figure 2-13 Fast view bar

To add a view to the fast view bar then right-click on a view tab and select Fast View from the context menu.

2.12.5

See also

ARM DUI 0480I

ID022212

Tasks

Accessing the dynamic help on page 2-38

Chapter 4 Working with editors

.

Reference

Workbench features on page 2-9

Workspace on page 2-10

Menus on page 2-26

Toolbars on page 2-27

Preferences dialog box on page 2-31

Perspective icons on page 6-6

View markers on page 6-6

ARM DS-5 Using the Debugger:

App Console view on page 10-3

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-24

ARM Asm Info view on page 10-5

ARM assembler editor on page 10-6

Breakpoints view on page 10-8

C/C++ editor on page 10-12

Commands view on page 10-17

Debug Control view on page 10-20

Disassembly view on page 10-25

Expressions view on page 10-29

History view on page 10-35

Memory view on page 10-37

Modules view on page 10-41

Registers view on page 10-44

Screen view on page 10-47

Scripts view on page 10-50

Target view on page 10-52

Trace view on page 10-54

Variables view on page 10-58 .

ARM DS-5 Using Eclipse:

Remote Systems view on page 5-3

Remote Scratchpad view on page 5-5

Terminals view on page 5-6 .

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-25

Getting started with Eclipse

2.13

Menus

2.13.1

See also

The main menu is located at the top of the Eclipse window and can be customized to your personal preferences. The contents might vary depending on the installed plug-ins and also the active perspective.

Eclipse supports the following options from the main menu:

File

Enables you to create, save, close, print, import, and export resources. You can also manage project and file property settings.

Edit

Enables you to cut, copy, paste, find, and replace text within a resource.

Navigate

Enables you to navigate and quickly find specific resources.

Search

Project

Provides an advanced filter for searching through resources.

Enables you to manage project build configurations and perform specific builds.

You can also customize the build settings for ARM

®

tools.

Run

Enables you to run, send to, debug or configure external tools. You can also manage breakpoints and watchpoints.

Enables you to open, close, and customize perspectives, views and editors.

Window

Help

Provides documentation on Eclipse and the ARM tools, access to the ARM cheat sheets, and software updates. You can also access the menu option About ARM

DS-5 to open a dialog box that displays the version and build number for the current product.

Right-clicking on a resource produces a context menu for specific tasks. For more information on the other menu options not listed here, use the dynamic help.

Tasks

Accessing the dynamic help on page 2-38 .

Reference

Perspectives and views on page 2-22

Menus

Toolbars on page 2-27

Preferences dialog box on page 2-31

Menu and toolbar icons on page 6-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-26

Getting started with Eclipse

2.14

Toolbars

The main toolbar is located at the top of the Eclipse window and can be customized to your personal preferences. The toolbar icons vary depending on the installed plug-ins and also the active perspective.

Figure 2-14 Workbench toolbar

Other toolbars associated with specific features are located at the top of each perspective or view.

Figure 2-15 Perspective toolbar

Figure 2-16 View toolbar

2.14.1

See also

Tasks

Accessing the dynamic help on page 2-38 .

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Preferences dialog box on page 2-31

Menu and toolbar icons on page 6-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-27

Getting started with Eclipse

2.15

Editing source code

You can use the editors provided with Eclipse to edit your source code or you can use an external editor. If you work with an external editor you must refresh Eclipse to synchronize the views with the latest updates. To do this, in the Project Explorer view, you can click on the updated project, sub-folder, or file and select Refresh from the File menu. Alternatively you can enable the automatic refresh option by selecting General

Workspace Refresh automatically in the Preferences dialog box.

When you open a file in Eclipse, a new editor tab appears with the name of the file. An edited file displays an asterisk (*) in the tab name to show that it has unsaved changes.

When you have two or more editor tabs open, you can tile them for side-by-side viewing by clicking on a tab and dragging it over an editor border.

In the left-hand margin of the editor tab you can find a vertical bar that displays markers relating to the active file.

2.15.1

Navigating

There are several ways to navigate to a specific resource within Eclipse. You can use the Project

Explorer view to open a resource by browsing through the resource tree and double-clicking on a file. An alternative is to use the keyboard shortcuts or use the options from the Navigate menu.

2.15.2

Searching

2.15.3

Content assist

The C/C++ editor, ARM

®

assembler editor, and the DS-5 Debugger Commands view provide content assistance at the cursor position to auto-complete the selected item. Using the

Ctrl+Space keyboard shortcut produces a small dialog box with a list of valid options to choose from. You can shorten the list by partially typing a few characters before using the keyboard shortcut. From the list you can use the Arrow Keys to select the required item and then press the

Enter key to insert it.

2.15.4

Bookmarks

Bookmarks can be used to mark a specific position in a file or mark an entire file so that you can return to it quickly. To create a bookmark, select a file or line of code that you want to mark and select Add Bookmark from the Edit menu. The Bookmarks view displays all the user defined bookmarks and can be accessed by selecting Window

Show View Bookmarks from the main menu. If the Bookmarks view is not listed then select Others... for an extended list.

To delete a bookmark, open the Bookmarks view, click on the bookmark that you want to delete and select Delete from the Edit menu.

2.15.5

See also

To locate information or specific code contained within one or more files in Eclipse, you can use the options from the Search menu. Textual searching with pattern matching and filters to refine the search fields are provided in a customizable Search dialog box. You can also open this dialog box from the main workbench toolbar.

Tasks

Accessing the dynamic help on page 2-38 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-28

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-29

Getting started with Eclipse

2.16

Configuring Eclipse

Eclipse can be customized to your own settings by changing the layout, key bindings, file associations, and color schemes.

Projects and files can also be configured to use the build system in different ways by modifying the properties for the selected resource.

Perspectives can be opened and customized using the options from the Window menu or you can use the perspective toolbar. By default a perspective opens in the same window, however, you can change the default settings in the Preferences dialog box.

Views can be moved or docked as applicable by dragging and dropping them into position.

Double-clicking on the title bar of a view toggles the maximize/restore options or you can use the relevant toolbar icons. If you have minimized a view you can restore it by clicking on the restore icon in the toolbar at the side of the perspective. By default this is on the right-hand side of the perspective but you can drag and drop it to another location if you prefer. To reset all the views in a perspective to the initial settings and layout you can click on Reset Perspective... in the Window menu.

2.16.1

See also

Reference

Perspectives and views on page 2-22

Menus on page 2-26

Toolbars on page 2-27

Preferences dialog box on page 2-31

Properties dialog box on page 2-33

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-30

Getting started with Eclipse

2.17

Preferences dialog box

Workbench settings can be customized using the Preferences dialog box. You can access this dialog box by selecting Preferences... from the Window menu. Changes to these settings are saved in the current workspace. If you want to copy your workbench settings to another workspace, use the Export wizard.

The contents of the preferences hierarchy tree include the following groups:

General

Controls the workspace, perspectives, editors, build order, linked resources, file associations, path variables, background operations, keyboard and mouse settings.

C/C++

DS-5

Controls the C/C++ environment settings, CDT build variables, syntax formatting, and default project wizard settings.

Controls the default DS-5 environment settings, presentation and formatting for DS-5 editors and views, target configuration database search locations, and the automatic checks for DS-5 product updates.

Help

Install/Update

Controls how the context help is displayed.

Controls the update history, scheduler, and policy.

Remote Systems

Controls the settings used by the Remote System Explorer.

Run/Debug

Controls the default perspectives, breakpoint, build, and launch settings before running and debugging.

For more information on the other options not listed here, use the dynamic help.

ARM DUI 0480I

ID022212

Figure 2-17 Window preferences dialog box

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-31

2.17.1

See also

Reference

Accessing the dynamic help on page 2-38 .

Reference

Menus on page 2-26

Perspectives and views on page 2-22

Toolbars on page 2-27

Properties dialog box on page 2-33

Importing and exporting options on page 2-35

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-32

Getting started with Eclipse

2.18

Properties dialog box

Project settings can be customized using the Properties dialog box. You can access this dialog box by selecting a project and then selecting Properties... from the Project menu. Changes to the customized settings are saved in the project folder in your workspace. You can also customize the C/C++ properties for a single file for example, if you want to apply a specific compiler option to a file during the build.

Note

If you specify different options for a single file, it overrides the options specified in the project configuration panels that apply to all related source files.

The contents of the properties hierarchy tree for a project include the following:

Resource

Displays the resource location, modification state, and file type.

Builders

C/C++ Build

Controls builders available for the selected project.

Controls the environment, build, and tool chain settings for the active configuration.

C/C++ General

Controls documentation, file types, indexer and path/symbol settings.

Project References Controls project dependencies.

For more information on the other options not listed here, use the dynamic help.

ARM DUI 0480I

ID022212

Figure 2-18 Project properties dialog box

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-33

2.18.1

See also

Tasks

Accessing the dynamic help on page 2-38

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Getting started with Eclipse

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-34

Getting started with Eclipse

2.19

Importing and exporting options

A resource must exist in a project within Eclipse before you can use it in a build. If you want to use an existing resource from your file system in one of your projects, the recommended method is to use the Import wizard. To do this, select Import... from the File menu.

If you want to use a resource externally from Eclipse, the recommended method is to use the

Export wizard. To do this, select Export... from the File menu.

There are several options available in the import and export wizards:

General

This option enables you to import and export the following: files from an archive zip file complete projects selected source files and project sub-folders workbench preference settings.

C/C++

This option enables you to import the following:

C/C++ executable files

C/C++ project settings existing code as Makefile project.

You can also export C/C++ project settings and indexes.

Remote Systems

This option enables you to transfer files between the local host and the remote target.

Run/Debug This option enables you to import and export the following:

• breakpoint settings

• launch configurations.

Scatter File Editor

This option enables you to import the memory map from a BCD file and convert it into a scatter file for use in an existing project.

For information on the other options not listed here, use the dynamic help.

2.19.1

See also

Tasks

Using the import wizard on page 2-36

Using the export wizard on page 2-37

Accessing the dynamic help on page 2-38 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-35

Getting started with Eclipse

2.20

Using the import wizard

The Import wizard can be used to import complete projects, source files and, project sub-folders in addition to breakpoint and preference settings. Select Import... from the File menu.

This section focuses on projects, source files and project sub-folders.

To import a complete project either from an archive zip file or an external folder from your file system, you must use the Existing Projects into Workspace wizard. This ensures that the relevant workbench project files are also imported into your workspace.

Individual source files and project sub-folders can be imported using either the Archive File or

File System wizard. Both options produce a dialog box similar to the following example. Using the options provided you can select the required resources and specify the relevant options, filename, and destination path.

2.20.1

See also

Figure 2-19 Typical example of the import wizard

With the exception of the Existing Projects into Workspace wizard, files and folders are copied into your workspace when you use the Import wizard. To create a link to an external file or project sub-folder you must use the New File or New Folder wizard.

Tasks

Using the export wizard on page 2-37

Accessing the dynamic help on page 2-38 .

Reference

Linked resources on page 2-12

Importing and exporting options on page 2-35

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-36

Getting started with Eclipse

2.21

Using the export wizard

The Export wizard can be used to export complete projects, source files and, project sub-folders in addition to breakpoint and preference settings. Select Export... from the File menu.

This section focuses on projects, source files and project sub-folders.

Exporting a complete project, source file or project sub-folder uses the same process. If you want to create a zip file you can use the Archive File wizard, or alternatively you can use the

File System wizard. Both options produce a dialog box similar to the example shown here.

Using the options provided you can select the required resources and specify the relevant options, filename, and destination path.

2.21.1

See also

Figure 2-20 Typical example of the export wizard

Tasks

Using the import wizard on page 2-36

Accessing the dynamic help on page 2-38 .

Reference

Linked resources on page 2-12

Importing and exporting options on page 2-35

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-37

Getting started with Eclipse

2.22

Accessing the dynamic help

To access the dynamic help for a specific workbench feature you must:

1.

Click on an editable field for the feature that you want to use.

2.

Do one of the following:

• Click on the question mark icon

• Select Dynamic Help from the Help menu.

Use a keyboard shortcut:

— On Windows, F1 key

— On Linux , Shift+F1 key combination.

Dynamic help for the selected feature appears in the About panel at the top of the Related Topics view.

Note

Other possible search results are listed in the Dynamic Help panel at the bottom of the Related

Topics view.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-38

Getting started with Eclipse

2.23

Using ARM-specific cheat sheets

Cheat sheets are working examples that you can use to guide you through a specific task. Each step in the task is listed in the Cheat Sheets view and the current step is highlighted and expanded. You must perform each step in turn to complete the task.

To use a cheat sheet:

1.

Select Cheat Sheet... from the Help menu.

2.

Select a cheat sheet from the list or use Browse... to select from a file, see the following figure.

ARM DUI 0480I

ID022212

Figure 2-21 Selecting a cheat sheet

3.

Click on OK.

4.

Click on the Click to Begin link on the Introduction step to start the task. If you open a cheat sheet more than once, the link on the Introduction step changes text to Click to

Restart.

5.

Follow the instructions step by step. When you complete an instruction, click on the Click

to Complete link to move on to the next instruction. Some of the instructions might have a Click to Perform link for you to use if you want that instruction to be performed automatically by the cheat sheet.

The task is complete when you have performed every step listed in the Cheat Sheets view. This

is shown by the tick icon shown in the left-hand margin of the cheat sheet see Figure 2-22 on page 2-40

.

Figure 2-22 on page 2-40 shows a typical example of a cheat sheet. Steps one and two are shown

as complete, step three (the current step) is highlighted and expanded ready for use. Four instructions are listed in step three, complete each instruction in turn. When step three is fully complete, the cheat sheet moves on to populate and reveal the instructions in step four.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-39

Getting started with Eclipse

Note

Subsequent steps are not populated until you fully complete the previous step.

Figure 2-22 Typical example of a cheat sheet

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-40

Getting started with Eclipse

2.24

Installing new features

To install new features:

1.

Select Install New Software... from the Help menu.

2.

Select a site from the Work with drop-down list or click Add... to add a new site.

3.

Select the required plug-in check boxes. Click on Next >.

4.

Review the list of plug-ins that you are about to install. Click on Next >.

5.

Read each of the license agreements and accept them. If you do not accept a license agreement, you cannot install that feature. Click on Finish.

6.

Click on Yes to restart Eclipse and complete the installation.

To install updated features, select Check for Updates from the Help menu.

Note

You can change the default setting for downloading and installing updated features by selecting

Install/Update

Automatic Updates in the Preferences dialog box.

2.24.1

See also

Reference

Preferences dialog box on page 2-31 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-41

Getting started with Eclipse

2.25

Restrictions of use

This section lists the specific restrictions and peculiarities that apply when using Eclipse.

Organizing projects

The recommended structure for project source files is to create them in the project folder or sub-folder. If a source file is created in a folder that is higher than the project, an absolute link is created.

Opening an existing Eclipse project

You must use the import wizard to import an existing Eclipse project into your workspace.

Inter-project dependencies

Nested projects are not supported. Each project must be organized as a discrete entity. Inter-project dependencies can be set up by referencing other projects that reside in your workspace. Select Project

Properties Project References from the main menu to manually add references.

Link order Specifying the link order of your object files within the same project is not possible with Eclipse. As a workaround, if you split your object files into different projects, you can specify the project build order. Select Window

Preferences...

General Workspace Build Order from the main menu.

Restore Defaults

Restoring the defaults of a project discards all information that is not a part of the project type. All settings changed in the New Project Wizard are lost.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

2-42

Chapter 3

Working with projects

You can use Eclipse to create projects for ARM

®

targets. Projects are top level folders in your workspace that contain related files and sub-folders. A project must exist in your workspace before a new file can be added or an existing file can be imported.

The following topics describe how to work with Eclipse projects:

Tasks

Creating a new C or C++ project on page 3-4

Creating a new Makefile project for an ARM Linux target on page 3-6

Importing an existing Eclipse project on page 3-8

Setting up the compilation tools for a specific build configuration on page 3-11

Configuring the C/C++ build behavior on page 3-13

Updating a project to a new toolchain on page 3-15

Adding a new source file to your project on page 3-16 .

Concepts

Project types on page 3-2

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-1

Working with projects

3.1

Project types

Different project types are provided with Eclipse, depending on the requirements of your project.

Note

Bare metal projects require a software license for the ARM Compiler to successfully build an

ELF image.

Bare-metal Executable

Uses the ARM Compiler toolchain to build a bare-metal executable ELF image.

Bare-metal Static library

Uses the ARM Compiler toolchain to build a library of ELF object format members for a bare-metal project.

Note

It is not possible to debug or run a stand-alone library file until it is linked into an image.

Executable

Uses the GNU Compilation Tools to build a Linux executable ELF image.

Shared Library

Uses the GNU Compilation Tools to build a dynamic library for a Linux application.

Static library

Uses the GNU Compilation Tools to build a library of ELF object format members for a Linux application.

Note

It is not possible to debug or run a stand-alone library file until it is linked into an image.

Makefile project

Creates a project that requires a Makefile, that you can write yourself, to build the project.

Note

Eclipse does not modify Makefile projects.

3.1.1

Build configurations

By default, the new project wizard provides two separate build configurations:

Debug

Release

The debug target is configured to build output binaries that are fully debuggable, at the expense of optimization. It configures the compiler optimization setting to minimum (level 0), to provide an ideal debug view for code development.

The release target is configured to build output binaries that are highly optimized, at the expense of a poorer debug view. It configures the compiler optimization setting to high (level 3).

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-2

3.1.2

See also

Working with projects

In all new projects, the

Debug

configuration is automatically set as the active configuration. This can be changed in the C/C++ Build Settings panel of the Project Properties dialog box.

Tasks

Accessing the dynamic help on page 2-38

Creating a new C or C++ project on page 3-4

Importing an existing Eclipse project on page 3-8 .

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5

ARM

®

DS-5

Getting Started with DS-5:

Licensing and product updates on page 4-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-3

Working with projects

3.2

Creating a new C or C++ project

To create a new C or C++ Project:

1.

Select File

New Project... from the main menu.

2.

Expand the C/C++ group.

3.

Select either C Project or C++ Project.

4.

Click on Next.

5.

Enter a project name.

6.

Leave the Use default location option selected so that the project is created in the default folder shown. Alternatively, deselect this option and browse to your preferred project folder.

7.

Select the type of project that you want to create.

3.2.1

See also

ARM DUI 0480I

ID022212

8.

Click on Finish to create your new project.

The project is visible in the Project Explorer view.

Figure 3-1 Creating a new C project

Tasks

Accessing the dynamic help on page 2-38

Setting up the compilation tools for a specific build configuration on page 3-11

Configuring the C/C++ build behavior on page 3-13

Adding a new source file to your project on page 3-16 .

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-4

Concepts

Project types on page 3-2

.

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Working with projects

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-5

Working with projects

3.3

Creating a new Makefile project for an ARM Linux target

To create a new C or C++ Project for an ARM Linux target:

1.

Select File

New Project... from the main menu.

2.

Expand the C/C++ group.

3.

Select either C Project or C++ Project.

4.

Click on Next.

5.

Enter a project name.

6.

Leave the Use default location option selected so that the project is created in the default folder shown. Alternatively, deselect this option and browse to your preferred project folder.

7.

Expand the Makefile project group.

8.

Select Empty project in the Project type panel.

9.

Select the toolchain that you want to use when building your project.

10.

Click on Finish to create your new project. The project is visible in the Project Explorer view.

11.

Before you can build the project, a

Makefile

, containing all the compilation tool settings, is required. The easiest way to create one is to copy the

Makefile

from the example project, hello

and paste it into your new project. The hello

project can be found in the Linux examples provided with DS-5.

12.

Edit the

Makefile

as follows: a.

Locate the line that contains

OBJS = hello.o

.

b.

Replace hello.o

with the names of the object files corresponding to your source files.

c.

Locate the line that contains

TARGET = hello

.

d.

Replace hello

with the name of the target image file corresponding to your source files.

e.

Save the file.

13.

Add your C/C++ files to the project.

You can now build the new project:

1.

In the Project Explorer view, select the project that you want to build.

2.

Select Project

Build Project from the main menu.

3.3.1

See also

Tasks

Accessing the dynamic help on page 2-38

Setting up the compilation tools for a specific build configuration on page 3-11

Configuring the C/C++ build behavior on page 3-13

Adding a new source file to your project on page 3-16 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-6

Concepts

Project types on page 3-2

.

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Working with projects

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-7

Working with projects

3.4

Importing an existing Eclipse project

To import an existing Eclipse project into your workspace:

1.

Select Import... from the File menu.

2.

To import an existing project, select Existing Project into Workspace. Click on Next.

Figure 3-2 Selecting the import source type

3.

Click on Browse to select the import folder containg the project that you want to import.

4.

In the Projects panel select the project that you want to import.

5.

Select Copy projects into workspace if required or deselect to create links to your existing project(s) and associated files.

6.

If you are not using working sets to group your projects then you can skip this step.

a.

Select Add project to working sets.

b.

Click on Select....

c.

Select an existing working set or create a new one and then select it.

d.

Click OK.

7.

Click on Finish.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-8

Working with projects

3.4.1

See also

ARM DUI 0480I

ID022212

Figure 3-3 Selecting an existing Eclipse projects for import

Note

If your existing project contains project settings from an older version of the build system, you are given the option to update your project. Using the latest version means that you can access all the latest toolchain features.

The imported project is visible in the Project Explorer view.

Tasks

Creating a working set on page 2-17

Changing the top level element when displaying working sets on page 2-20

Deselecting a working set on page 2-21

Accessing the dynamic help on page 2-38

Setting up the compilation tools for a specific build configuration on page 3-11

Configuring the C/C++ build behavior on page 3-13

Adding a new source file to your project on page 3-16 .

Concepts

About working sets on page 2-16

Project types on page 3-2

.

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-9

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Working with projects

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-10

Working with projects

3.5

Setting up the compilation tools for a specific build configuration

The C/C++ Build configuration panels enable you to set up the compilation tools for a specific build configuration, in your project. The settings in these panels determine how the compilation tools build an ARM executable image or library.

To access the build configuration panels:

1.

Select the source file or project in the Project Explorer view.

2.

Select Properties from the Project menu.

3.

Expand C/C++ Build in the Properties dialog box.

4.

Select Settings.

5.

The Configuration panel shows the active configuration. If required, click Manage

Configurations... from the Configuration panel to create a new build configuration or change the active setting.

6.

The compilation tools available for the current project, and their respective build configuration panels are displayed in the Tool Settings tab. Click on this tab and configure the build as required.

Note

Makefile projects do not use these configuration panels. The Makefile must contain all the required compilation tool settings.

ARM DUI 0480I

ID022212

Figure 3-4 Typical build settings dialog box for a C project

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-11

3.5.1

See also

7.

Click OK to save the settings.

Tasks

Accessing the dynamic help on page 2-38

Configuring the C/C++ build behavior on page 3-13 .

Concepts

Project types on page 3-2

.

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

Working with projects

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-12

Working with projects

3.6

Configuring the C/C++ build behavior

A build is the process of compiling and linking source files to generate an output file. A build can be applied to either a specific set of projects or the entire workspace. It is not possible to build an individual file or sub-folder.

Eclipse provides an incremental build that applies the selected build configuration to resources that have changed since the last build. Another type of build is the Clean build that applies the selected build configuration to all resources, discarding any previous build states.

Automatic

This is an incremental build that operates over the entire workspace and can run automatically when a resource is saved. This setting must be enabled for each project by selecting Build on resource save (Auto build) in the Behaviour tab.

By default, this behavior is not selected for any project.

ARM DUI 0480I

ID022212

Manual

Figure 3-5 Workbench build behavior

You must also ensure that Build Automatically is selected from the Project menu. By default, this menu option is selected.

This is an incremental build that operates over the entire workspace on projects with Build (Incremental build) selected. By default, this behavior is selected for all projects.

You can run an incremental build by selecting Build All or Build Project from the Project menu.

Note

Manual builds do not save before running so you must save all related files before selecting this option! To save automatically before building, you can change your default settings by selecting Preferences...

General Workspace from the

Window menu.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-13

3.6.1

See also

Working with projects

Clean

This option discards any previous build states including object files and images from the selected projects. The next automatic or manual build after a clean, applies the selected build configuration to all resources.

You can run a clean build on either the entire workspace or specific projects by selecting Clean... from the Project menu. You must also ensure that Clean is selected in the C/C++ Build

Behaviour tab of the Preferences dialog box. By default, this behavior is selected for all projects.

Build order is a feature where inter-project dependencies are created and a specific build order is defined. For example, an image might require several object files to be built in a specific order. To do this, you must split your object files into separate smaller projects, reference them within a larger project to ensure they are built before the larger project. Build order can also be applied to the referenced projects.

Tasks

Accessing the dynamic help on page 2-38

Creating a new C or C++ project on page 3-4

Importing an existing Eclipse project on page 3-8

Setting up the compilation tools for a specific build configuration on page 3-11 .

Configuring the C/C++ build behavior on page 3-13 .

Concepts

Project types on page 3-2

.

Reference

Menus on page 2-26

Toolbars on page 2-27

Perspectives and views on page 2-22

Preferences dialog box on page 2-31

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-14

Working with projects

3.7

Updating a project to a new toolchain

If you have several products installed, only the latest toolchain is listed in the New Project wizard. Therefore, if you have projects that use an older toolchain, you must update them to the latest toolchain.

To update them to use the new toolchain:

1.

Right-click on the project in thr Project Explorer view.

2.

Select Convert To... from the context menu to display the Project Converters dialog box.

3.

Select the required toolchain.

Note

Beware that if you convert back to an earlier version you might lose toolchain functionality.

4.

Click OK.

3.7.1

See also

Tasks

Accessing the dynamic help on page 2-38

Creating a new C or C++ project on page 3-4

Importing an existing Eclipse project on page 3-8 .

Concepts

Project types on page 3-2

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-15

3.8

Adding a new source file to your project

To add a new source file to your project:

1.

Select File

New File from Template from the main menu.

2.

Select your project folder or sub-folder from the New File dialog box.

Working with projects

Figure 3-6 Adding a new file to your project

3.

Enter a filename with the relevant extension in the File name field.

4.

Accept the default template or click Configure... if you want to change it.

5.

Click on Finish.

The new source file is visible in the Project Explorer view.

Note

You can also create files, or drag and drop files directly into the project folder, using the file system. To update the views in Eclipse, click on the relevant project in the Project

Explorer view and select Refresh from the File menu.

You can also drag and drop files directly into a project folder, in the Project Explorer view of Eclipse.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

3-16

Chapter 4

Working with editors

The following topics describe how to use the editors when developing a project for an ARM

® target:

Concepts

Overview of the C/C++ editor on page 4-2

Overview of the ARM assembler editor on page 4-3

Overview of the ELF content editor on page 4-4

Overview of the scatter file editor on page 4-10

Creating a scatter file on page 4-11

Importing a memory map from a BCD file on page 4-13 .

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Sections tab on page 4-6

ELF content editor - Segments tab on page 4-7

ELF content editor - Symbol Table tab on page 4-8

ELF content editor - Disassembly tab on page 4-9

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-1

Working with editors

4.1

Overview of the C/C++ editor

The standard C/C++ editor is provided by the CDT plug-in that provides C and C++ extensions to Eclipse. It provides syntax highlighting, formatting of code and content assistance when editing C/C++ code. Embedded assembler in C/C++ files is supported by the ARM Compiler but this editor does not support it and so an error is displayed. This type of code is ARM-specific and accepted Eclipse behavior so you can ignore the syntax error.

If this is not the default editor, right-click on a source file in the Project Explorer view and select

Open With

C/C++ Editor from the context menu.

See the C/C++ Development User Guide for more information. Select Help

Help Contents from the main menu.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-2

Working with editors

4.2

Overview of the ARM assembler editor

The ARM

®

assembler editor provides syntax highlighting, formatting of code and content assistance for labels in ARM assembly language source files. You can change the default settings in the Preferences dialog box.

If this is not the default editor, right-click on your source file in the Project Explorer view and select Open With

ARM Assembler Editor from the context menu.

The following shortcuts are also available for use:

Table 4-1 ARM assembler editor shortcuts

Content assist

Editor focus

Content assist provides auto-completion on labels existing in the active file. When entering a label for a branch instruction, Partially type the label and then use the keyboard shortcut Ctrl+Space to display a list of valid auto-complete options. Use the Arrow Keys to select the required label and press Enter to complete the term.

Continue typing to ignore the auto-complete list.

The following options change the editor focus:

Outline View provides a list of all areas and labels in the active file. Click on an area or label to move the focus of the editor to the position of the selected item.

Select a label from a branch instruction and press F3 to move the focus of the editor to the position of the selected label.

Formatter activation Press Ctrl+Shift+F to activate the formatter settings.

Block comments Block comments are enabled or disabled by using Ctrl+Semicolon.

Select a block of code and apply the keyboard shortcut to change the commenting state.

4.2.1

See also

Concepts

Preferences dialog box on page 2-31 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-3

Working with editors

4.3

Overview of the ELF content editor

The ELF content editor creates forms for the selected ELF file. You can use this editor to view the contents of image files and object files. The editor is read-only and cannot be used to modify the contents of any files.

If this is not the default editor, right-click on your source file in the Project Explorer view and select Open With

ELF Content Editor from the context menu.

The ELF content editor displays one or more of the following tabs depending on the selected file type:

Header

Sections

Form view showing the header information.

Tabular view showing the breakdown of all section information.

Segments

Tabular view showing the breakdown of all segment information.

Symbol Table

Tabular view showing the breakdown of all symbols.

Disassembly

Textual view of the disassembly with syntax highlighting.

4.3.1

See also

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Sections tab on page 4-6

ELF content editor - Segments tab on page 4-7

ELF content editor - Symbol Table tab on page 4-8

ELF content editor - Disassembly tab on page 4-9

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-4

4.4

ELF content editor - Header tab

The Header tab provides a form view of the ELF header information.

Working with editors

4.4.1

See also

Concepts

Overview of the ELF content editor on page 4-4 .

Reference

ELF content editor - Sections tab on page 4-6

ELF content editor - Segments tab on page 4-7

ELF content editor - Symbol Table tab on page 4-8

ELF content editor - Disassembly tab on page 4-9

.

Figure 4-1 Header tab

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-5

Working with editors

4.5

ELF content editor - Sections tab

The Sections tab provides a tabular view of the ELF section information. You can sort the columns by clicking on the column headers.

4.5.1

See also

Concepts

Overview of the ELF content editor on page 4-4 .

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Segments tab on page 4-7

ELF content editor - Symbol Table tab on page 4-8

ELF content editor - Disassembly tab on page 4-9

.

Figure 4-2 Sections tab

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-6

Working with editors

4.6

ELF content editor - Segments tab

The Segments tab provides a tabular view of the ELF segment information. You can sort the columns by clicking on the column headers.

4.6.1

See also

Concepts

Overview of the ELF content editor on page 4-4 .

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Sections tab on page 4-6

ELF content editor - Symbol Table tab on page 4-8

ELF content editor - Disassembly tab on page 4-9

.

Figure 4-3 Segments tab

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-7

Working with editors

4.7

ELF content editor - Symbol Table tab

The Symbol Table tab provides a tabular view of the symbols. You can sort the columns by clicking on the column headers.

4.7.1

See also

Concepts

Overview of the ELF content editor on page 4-4 .

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Sections tab on page 4-6

ELF content editor - Segments tab on page 4-7

ELF content editor - Disassembly tab on page 4-9

.

Figure 4-4 Symbol Table tab

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-8

Working with editors

4.8

ELF content editor - Disassembly tab

The Disassembly tab displays the output with syntax highlighting. The color schemes and syntax preferences use the same settings as the ARM

®

assembler editor. There are several keyboard combinations that can be used to navigate around the output:

Use Ctrl+F to open the Find dialog box to search the output

Use Ctrl+Home to move the focus to the beginning of the output

Use Ctrl+End to move the focus to the end of the output.

Use Page Up and Page Down to navigate through the output one page at a time.

You can also use the Copy and Find options in the context menu by right-clicking in the

Disassembly view.

4.8.1

See also

ARM DUI 0480I

ID022212

Concepts

Overview of the ELF content editor on page 4-4

Overview of the ARM assembler editor on page 4-3 .

Reference

ELF content editor - Header tab on page 4-5

ELF content editor - Sections tab on page 4-6

ELF content editor - Segments tab on page 4-7

ELF content editor - Symbol Table tab on page 4-8

.

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

Figure 4-5 Disassembly tab

4-9

Working with editors

4.9

Overview of the scatter file editor

The scatter file editor enables you to easily create and edit scatter files for use with the ARM linker to construct the memory map of an image. It provides a text editor, a hierarchical tree and a graphical view of the regions and output sections of an image. You can change the default syntax formatting and color schemes in the Preferences dialog box.

If this is not the default editor, right-click on your source file in the Project Explorer view and select Open With

Scatter File Editor from the context menu.

The scatter file editor displays the following tabs:

Source

Textual view of the source code with syntax highlighting and formatting.

Regions/Sections

A graphical view showing load and execute memory maps. These are not editable, however, you can select a load region to show the related memory blocks in the execution regions.

The scatter file editor also provides a hierarchical tree with associated toolbar and context menus using the Outline view. Clicking on a region or section in the Outline view moves the focus of the editor to the relevant position in your code. If this view is not visible, select Show

View

Outline from the Window menu.

Note

The linker documentation for the ARM Compiler toolchain describes in more detail how to use scatter files.

Before you can use a scatter file you must add the

--scatter=file

option to the project within the C/C++ Build

Settings Tool settings ARM Linker Image Layout panel of the

Properties dialog box.

4.9.1

See also

Tasks

Creating a new C or C++ project on page 3-4

Adding a new source file to your project on page 3-16

Creating a scatter file on page 4-11

Importing a memory map from a BCD file on page 4-13 .

Reference

Preferences dialog box on page 2-31

Properties dialog box on page 2-33

ARM

®

Compiler toolchain Using the Linker, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0474-

ARM

®

Compiler toolchain Linker Reference, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0493-.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-10

Working with editors

4.10

Creating a scatter file

To create a scatter file:

1.

Use an existing project or create a new project.

2.

Create a new project and add a new empty text file with the extension

.scat

.

For example scatter.scat

.

3.

Using the Outline view, click on the Add load region toolbar icon or right-click and select

Add load region from the context menu.

Enter a load region name, for example,

LR1

.

Figure 4-6 Add load region dialog box

4.

Click OK.

5.

Modify the load region as shown in the following example.

Example 4-1 Simple scatter file

LR1 0x0000 0x8000

{

LR1_er1 0x0000 0x8000

{

* (+RO)

}

LR1_er2 0x10000 0x6000

{

* (+RW,+ZI)

}

}

6.

Click on the Regions/Sections tab to view a graphical representation.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-11

Working with editors

4.10.1

See also

Figure 4-7 Graphical view of a simple scatter file

7.

Save your changes.

Before you can use a scatter file you must add the

--scatter=file

option to the project within the C/C++ Build

Settings Tool settings ARM Linker Image Layout panel of the

Properties dialog box.

Tasks

Creating a new C or C++ project on page 3-4

Adding a new source file to your project on page 3-16

Importing a memory map from a BCD file on page 4-13 .

Concepts

Overview of the scatter file editor on page 4-10

Reference

Preferences dialog box on page 2-31

Properties dialog box on page 2-33

ARM

®

Compiler toolchain Using the Linker, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0474-

ARM

®

Compiler toolchain Linker Reference, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0493-.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-12

4.11

Importing a memory map from a BCD file

To import a memory map from a BCD file:

1.

Select Import from the File menu.

Select Scatter File Editor

Memory from a BCD File.

Working with editors

Figure 4-8 Import memory map for the scatter file editor

2.

Enter the location of the BCD file or click on Browse... to select the folder.

3.

Select the required file containing the memory map that you want to import.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-13

Working with editors

Figure 4-9 BCD file selection for the scatter file editor

4.

Select Add to current scatter file if you want to add specific memory regions to an existing scatter file.

Note

The scatter file must be open and active in the editor view before you can use this option.

5.

Select Create new scatter file template if you want the wizard to create a new file with the same name as the BCD file but with a

.scat

file extension.

6.

Select the destination project folder.

7.

By default, all the memory regions are selected. Modify the selections and table content as required.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-14

Working with editors

4.11.1

See also

Figure 4-10 Memory block selection for the scatter file editor

8.

Click Finish to complete the scatter file.

Before you can use a scatter file you must add the

--scatter=file

option to the project within the C/C++ Build

Settings Tool settings ARM Linker Image Layout panel of the

Properties dialog box.

Tasks

Creating a new C or C++ project on page 3-4

Adding a new source file to your project on page 3-16

Importing a memory map from a BCD file on page 4-13 .

Concepts

Overview of the scatter file editor on page 4-10

Reference

Preferences dialog box on page 2-31

Properties dialog box on page 2-33

ARM

®

Compiler toolchain Using the Linker, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0474-

ARM

®

Compiler toolchain Linker Reference, http://arminfo.emea.arm.com/help/topic/com.arm.doc.dui0493-.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

4-15

Chapter 5

Working with Remote System Explorer

The following topics describe the Remote System Explorer and how you can use it to access resources on the host workstation and remote targets:

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Concepts

Overview of the Remote System Explorer on page 5-2 .

Reference

Remote Systems view on page 5-3

Remote System Details view on page 5-4

Remote Scratchpad view on page 5-5

Terminals view on page 5-6 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-1

Working with Remote System Explorer

5.1

Overview of the Remote System Explorer

The Remote System Explorer (RSE) enables you to: set up Linux SSH connections to remote targets using TCP/IP create, copy, delete, and rename resources set the read, write, and execute permissions for resources edit files by double-clicking to open in the C/C++ editor execute commands on the remote target view and kill running processes transfer files between the host workstation and remote targets launch terminal views.

Useful RSE views that can be added to the DS-5 Debug perspective are:

Remote Systems

Remote System Details

Remote Scratchpad

Terminals.

To add a view to the DS-5 Debug perspective:

1.

Ensure that you are in the DS-5 perspective. You can change perspective by using the perspective toolbar or you can select Window

Open perspective from the main menu.

2.

Select Window

Show View Other... to open the Show View dialog box.

3.

Select the required view from the Remote Systems group.

4.

Click OK.

5.1.1

See also

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Reference

Remote Systems view on page 5-3

Remote System Details view on page 5-4

Remote Scratchpad view on page 5-5

Terminals view on page 5-6

Miscellaneous icons on page 6-8

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-2

Working with Remote System Explorer

5.2

Remote Systems view

This hierarchical tree view enables you to: set up a Linux connection to a remote target using the Secure SHell (SSH) protocol access resources on the host workstation and remote targets display a selected file in the C/C++ editor open the Remote System Details view and show the selected connection configuration details in a table open the Remote Monitor view and show the selected connection configuration details import and export the selected connection configuration details connect to the selected target delete all passwords for the selected connection open the Properties dialog box and display the current connection details for the selected target.

5.2.1

See also

Figure 5-1 Remote Systems view

The Remote Systems view might not visible by default. To add this view:

1.

Select Window

Show View Other... to open the Show View dialog box.

2.

Expand the Remote Systems group and select Remote Systems.

3.

Click OK.

To configure a connection to the target, click on the toolbar icon Define a connection to a

remote system.

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Concepts

Overview of the Remote System Explorer on page 5-2 .

Reference

Remote System Details view on page 5-4

Remote Scratchpad view on page 5-5

Terminals view on page 5-6

Miscellaneous icons on page 6-8

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-3

Working with Remote System Explorer

5.3

Remote System Details view

This tabular view enables you to: set up a Linux connection to a remote target using the Secure SHell (SSH) protocol access resources on the host workstation and remote targets display a selected file in the C/C++ editor open the Remote Systems view and show the selected connection configuration details in a hierarchical tree open the Remote Monitor view and show the selected connection configuration details import and export the selected connection configuration details connect to the selected target delete all passwords for the selected connection open the Properties dialog box and display the current connection details for the selected target.

5.3.1

See also

Figure 5-2 Remote System Details view

The Remote System Details view is not visible by default. To add this view:

1.

Select Window

Show View Other... to open the Show View dialog box.

2.

Expand the Remote Systems group and select Remote System Details.

3.

Click OK.

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Concepts

Overview of the Remote System Explorer on page 5-2 .

Reference

Remote Systems view on page 5-3

Remote Scratchpad view on page 5-5

Terminals view on page 5-6

Miscellaneous icons on page 6-8

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-4

Working with Remote System Explorer

5.4

Remote Scratchpad view

The Remote Scratchpad view is an electronic clipboard where you can copy and paste or drag and drop useful files and folders into this view for use at a later point in time. This enables you to keep a list of resources from any connection in one place.

Note

Be aware that although the scratchpad only shows links, any changes made to a linked resource also changes it in the original file system.

5.4.1

See also

Figure 5-3 Remote Scratchpad

The Remote Scratchpad view is not visible by default. To add this view:

1.

Select Window

Show View Other... to open the Show View dialog box.

2.

Expand the Remote Systems group and select Remote Scratchpad.

3.

Click OK.

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Concepts

Overview of the Remote System Explorer on page 5-2 .

Reference

Remote Systems view on page 5-3

Remote System Details view on page 5-4

Terminals view on page 5-6

Miscellaneous icons on page 6-8

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-5

Working with Remote System Explorer

5.5

Terminals view

The Terminals view enables you to enter shell commands directly on the target without launching any external application. For example you can browse remote files and folders by entering the ls

or pwd

commands in the same way as you would on a Linux terminal.

5.5.1

See also

Figure 5-4 Terminals view

The Terminals view is not visible by default. To add this view:

1.

Select Window

Show View Other... to open the Show View dialog box.

2.

Expand the Remote Systems group and select Remote Systems.

3.

Click OK.

4.

In the Remote Systems view, click on the toolbar icon Define a connection to a remote

system and configure an Secure SHell (SSH) connection to the target.

5.

Right-click on the connection and select Connect from the context menu.

6.

Enter the User ID and password in the relevant fields.

7.

Click OK to connect to the target.

8.

In the Remote Systems view, right-click on Ssh Terminals.

9.

Select Launch Terminal to open a terminal shell that is connected to the target.

Tasks

Using an RSE connection to work with an ARM Linux target on page 3-9 .

Concepts

Overview of the Remote System Explorer on page 5-2 .

Reference

Remote Systems view on page 5-3

Remote System Details view on page 5-4

Remote Scratchpad view on page 5-5

Miscellaneous icons on page 6-8

.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

5-6

Chapter 6

Terminology, shortcuts and icons

This following topics describe some of the terminology used in Eclipse for DS-5 Using Eclipse, useful keyboard shortcuts, and menu and toolbar icons:

Reference

Terminology on page 6-2

Keyboard shortcuts on page 6-3

Menu and toolbar icons on page 6-5 .

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-1

Terminology, shortcuts and icons

6.1

Terminology

The following terminology is used in this document:

Block

A small sub-division of a flash device that can be programmed.

Device

A component on a target containing the application that you want to debug.

Dialog box A small page containing tabs, panels and editable fields prompting you to enter information.

Editor

Erase

A view that controls the visual aspects of source code for a specific file type.

A feature of a flash device where memory cells are reset to a known value.

Flash device A set of flash memory that has a single command interface.

Panel

A small area in a dialog box or tab to group editable fields.

Perspective A page within the Eclipse window containing a set of related views, editors, menus, and toolbars.

Program

A term used to describe the storing of data on a flash device.

Project

A group of related files and folders in Eclipse.

Resource

A generic term used to describe a project, file, folder, or a combination of these.

Send To

A term used to describe sending a file to a target.

Tab

Target

A small overlay page containing panels and editable fields within a dialog box to group related information. Clicking on a tab brings it to the top.

A development platform on a printed circuit board or a software model that emulates the expected behavior of ARM

®

hardware.

View

Width

A small page to display related information for a specific function.

The smallest number of bits (8, 16 or 32) that can be natively accessed by a flash device.

Wizard

A group of dialog boxs to guide you through a common tasks, for example, creating new files and projects.

Workbench A window containing perspectives, menus, and toolbars.

Workspace An area designated on your file system to store files and folders related to your projects.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-2

Terminology, shortcuts and icons

6.2

Keyboard shortcuts

The most common keyboard shortcuts available for use with Eclipse are:

F3

Click on an assembler label from a branch instruction or a C/C++ calling function and press F3 to move the editor focus to the position of the selected item.

F10

Alt+F4

Use in conjunction with the arrow keys to access the main menu.

Exit Eclipse.

Alt+Left arrow

Go back in navigation history.

Alt+Right arrow

Go forward in navigation history.

Ctrl+Semicolon

Provided with the ARM

®

assembler editor to add comment markers to a selected block of code in the active file.

Ctrl+End

Moves the editor focus to the end of the code.

Ctrl+B

Build all projects in the workspace that have changed since the last build.

Ctrl+Home Moves the editor focus to the beginning of the code.

Ctrl+F

Opens the Find or Find/Replace dialog box to search through the code in the active editor. Some editors are read-only and therefore disable this functionality.

Ctrl+F4

Ctrl+F6

Close the active file in the editor view.

Cycles through open files in the editor view.

Ctrl+F7

Ctrl+F8

Cycles through available views.

Cycles through available perspectives.

Ctrl+F10

Use in conjunction with the arrow keys to access the drop-down menu.

Ctrl+L

Move to a specified line in the active file.

Ctrl+Q

Move to the last edited position in the active file.

Ctrl+Space Provides auto-completion on selected functions in editors.

Shift+F10

use in conjunction with the arrow keys to access the context menu.

Ctrl+Shift+F

Activates the code style settings in the Preferences dialog box and apply them to the active file.

Ctrl+Shift+L

Opens a small page with a list of all keyboard shortcuts.

Ctrl+Shift+R

Opens the Open resource dialog box.

Ctrl+Shift+T

Opens the Open Type dialog box.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-3

Terminology, shortcuts and icons

Ctrl+Shift+/

Provided with the C/C++ editor to add comment markers to the start and end of a selected block of code in the active file.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-4

Terminology, shortcuts and icons

6.3

Menu and toolbar icons

These tables list the most common menu and toolbar icons available for use with Eclipse. For information on icons, markers, and buttons not listed in the following tables, see the standard

Workbench User Guide or the C/C++ Development User Guide in the Help Contents.

If you leave the mouse pointer positioned on a toolbar icon for a few seconds without clicking, a tooltip appears informing you of the purpose of the icon.

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-5

Terminology, shortcuts and icons

6.3.1

Perspective icons

Icon Description

Open new perspective

Fast view bar

Icon

Table 6-1 Perspective icons

Description

C/C++

6.3.2

View icons

Icon Description

Display drop-down menu

Minimize

Restore

Icon

Table 6-2 View icons

Description

Synchronize view contents

Maximize

Close

6.3.3

View markers

Icon Description

Bookmark

Task

Error

Icon

Table 6-3 View markers

Description

Information

Search result

Warning

6.3.4

Editor icons

Icon Description

Save the active file

Print the active file

Create new configuration

Delete selected configuration

Icon

Table 6-4 Editor icons

Description

Save all files

Close view

Duplicate selected configuration

Collapse configuration tree

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-6

Terminology, shortcuts and icons

6.3.5

Configuration icons

Icon Description

Open Run Configurations dialog box

Icon

Table 6-5 Configuration icons

Description

Open Debug Configurations dialog box

6.3.6

Outline icons

Icon Description

Hide fields

Hide non-public members

Class

Macro definition

Enumerator

Protected field

Public field

Protected method

Public method

Type definition

Function

Include file

Peripheral

Bitfield

Map rules

Icon

Table 6-6 Outline icons

Description

Hide static members

Sort alphabetically

Namespace

Enum

Variable

Private field

Include

Private method

Struct

Union

Target configuration file

Memory

Register

Enumeration definition

Tools information

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-7

Terminology, shortcuts and icons

6.3.7

Miscellaneous icons

Icon Description

Open a new resource wizard

Icon

Open new folder wizard open search dialog box

Add load region

Add section

Focus on active task

Table 6-7 Miscellaneous icons

Description

Open new project wizard

Open new file wizard

Display context-sensitive help

Add execution region

Delete selected item

Displays product updates

6.3.8

Navigation icons

Icon Description

Navigate back

Navigate up one level

Open help instruction page

Bookmark active page

Icon

Table 6-8 Navigation icons

Description

Navigate forwards

Print active page

Synchronize TOC with active page

6.3.9

Help Contents icons

Icon Description

Display list of all documents

Icon

Display list of context-sensitive help links to related topics

Maximize frame

Synchronize TOC with active page

Table 6-9 Help Contents icons

Description

Display list of documents in last search

Display list of all bookmarks

Restore frame

ARM DUI 0480I

ID022212

Copyright © 2010-2012 ARM. All rights reserved.

Non-Confidential

6-8

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents