starts
Green Hills Software
30 West Sola Street
Santa Barbara, California 93101
USA
Tel: 805-965-6044
Fax: 805-965-6343
www.ghs.com
DISCLAIMER
GREEN HILLS SOFTWARE MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE
CONTENTS HEREOF AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY
OR FITNESS FOR ANY PARTICULAR PURPOSE. Further, Green Hills Software reserves the right to revise this
publication and to make changes from time to time in the content hereof without obligation of Green Hills Software to
notify any person of such revision or changes.
Copyright © 1983-2014 by Green Hills Software. All rights reserved. No part of this publication may be reproduced, stored
in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without prior written permission from Green Hills Software.
Green Hills, the Green Hills logo, CodeBalance, GMART, GSTART, INTEGRITY, MULTI, and Slingshot are registered
trademarks of Green Hills Software. AdaMULTI, Built with INTEGRITY, EventAnalyzer, G-Cover, GHnet, GHnetLite,
Green Hills Probe, Integrate, ISIM, u-velOSity, PathAnalyzer, Quick Start, ResourceAnalyzer, Safety Critical Products,
SuperTrace Probe, TimeMachine, TotalDeveloper, DoubleCheck, and velOSity are trademarks of Green Hills Software.
All other company, product, or service names mentioned in this book may be trademarks or service marks of their respective
owners.
PubID: start-506382
Branch: http://toolsvc/branches/release-branch-60
Date: April 24, 2014
Contents
Preface
v
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
The MULTI 6 Document Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Conventions Used in the MULTI Document Set . . . . . . . . . . . . . . . . . . . . viii
1. Introduction
1
The MULTI Integrated Development Environment . . . . . . . . . . . . . . . . . . . 2
MULTI Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Editing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Building Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Debugging Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Administrative Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The MULTI Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
MULTI Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Accessing Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Full Online Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Context-Sensitive Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Command, Configuration Option, and Keyword Help . . . . . . . . . . . . . 7
The Help Viewer Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Navigating Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Searching Manuals in the Help Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 12
2. MULTI Tutorial
15
Creating Your First Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Building Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connecting to a Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Connecting to Your Target Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Green Hills Software
iii
Contents
Preparing Your Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setting Up a Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Adding Actions to Your Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Additional Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Configuring MULTI for Use with INTEGRITY or u-velOSity . . . . . . . . . 26
Index
27
iv
MULTI: Getting Started
Preface
Contents
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
The MULTI 6 Document Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Conventions Used in the MULTI Document Set . . . . . . . . . . . . . . . . . . . . . . . . viii
Preface
This preface discusses the purpose of the manual, the MULTI documentation set,
and typographical conventions used.
About This Book
The MULTI: Getting Started book provides an introduction to the MULTI Integrated
Development Environment. For installation instructions, see the installation
document located in the root directory of the installation CD.
This book is divided into the following chapters:
• Chapter 1: Introduction provides an overview of the MULTI Integrated
Development Environment, the MULTI Launcher, and online help. See
Chapter 1, “Introduction” on page 1.
• Chapter 2: MULTI Tutorial introduces you to the basic components of the
MULTI IDE and leads you through creating, building, running, and debugging
a simple “Hello World” program. See Chapter 2, “MULTI Tutorial” on page 15.
Note
New or updated information may have become available while this book
was in production. For additional material that was not available at press
time, or for revisions that may have become necessary since this book
was printed, please check your installation directory for release notes,
README files, and other supplementary documentation.
vi
MULTI: Getting Started
The MULTI 6 Document Set
The MULTI 6 Document Set
The primary documentation for using MULTI is provided in the following books:
• MULTI: Getting Started — Provides an introduction to the MULTI Integrated
Development Environment and leads you through a simple tutorial.
• MULTI: Licensing — Describes how to obtain, install, and administer MULTI
licenses.
• MULTI: Managing Projects and Configuring the IDE — Describes how to
create and manage projects and how to configure the MULTI IDE.
• MULTI: Building Applications — Describes how to use the compiler driver
and the tools that compile, assemble, and link your code. Also describes the
Green Hills implementation of supported high-level languages.
• MULTI: Configuring Connections — Describes how to configure connections
to your target.
• MULTI: Debugging — Describes how to set up your target debugging interface
for use with MULTI and how to use the MULTI Debugger and associated tools.
• MULTI: Debugging Command Reference — Explains how to use Debugger
commands and provides a comprehensive reference of Debugger commands.
• MULTI: Scripting — Describes how to create MULTI scripts. Also contains
information about the MULTI-Python integration.
For a comprehensive list of the books provided with your MULTI installation, see
the Help → Manuals menu accessible from most MULTI windows.
Most books are available in the following formats:
• A printed book (select books are not available in print).
• Online help, accessible from most MULTI windows via the Help → Manuals
menu.
• An electronic PDF, available in the manuals subdirectory of your IDE or
Compiler installation.
Green Hills Software
vii
Preface
Conventions Used in the MULTI Document Set
All Green Hills documentation assumes that you have a working knowledge of your
host operating system and its conventions, including its command line and graphical
user interface (GUI) modes.
Green Hills documentation uses a variety of notational conventions to present
information and describe procedures. These conventions are described below.
Convention
Indication
Example
bold type
Filename or pathname
C:\MyProjects
Command
setup command
Option
-G option
Window title
The Breakpoints window
Menu name or menu choice
The File menu
Field name
Working Directory:
Button name
The Browse button
italic type
Replaceable text
-o filename
A new term
A task may be called a process
or a thread
A book title
MULTI: Debugging
monospace type
Text you should enter as presented
Type help command_name
A word or words used in a
The wait [-global] command
command or example
blocks command processing,
where -global blocks
command processing for all
MULTI processes.
Source code
int a = 3;
Input/output
> print Test
Test
A function
GHS_System()
ellipsis (...)
The preceding argument or option
debugbutton [name]...
can be repeated zero or more times.
(in command line
instructions)
viii
MULTI: Getting Started
Conventions Used in the MULTI Document Set
Convention
Indication
Example
greater than sign ( > )
Represents a prompt. Your actual
> print Test
prompt may be a different symbol
Test
or string. The > prompt helps to
distinguish input from output in
examples of screen displays.
pipe ( | )
One (and only one) of the
call proc | expr
parameters or options separated by
(in command line
the pipe or pipes should be
instructions)
specified.
square brackets ( [ ] )
Optional argument, command,
.macro name [list]
option, and so on. You can either
(in command line
include or omit the enclosed
instructions)
elements. The square brackets
should not appear in your actual
command.
The following command description demonstrates the use of some of these
typographical conventions.
gxyz [-option]... filename
The formatting of this command indicates that:
• The command gxyz should be entered as shown.
• The option -option should either be replaced with one or more appropriate
options or be omitted.
• The word filename should be replaced with the actual filename of an
appropriate file.
The square brackets and the ellipsis should not appear in the actual command you
enter.
Green Hills Software
ix
Chapter 1
Introduction
Contents
The MULTI Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . 2
The MULTI Launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Accessing Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Chapter 1. Introduction
The MULTI Integrated Development Environment
The MULTI Integrated Development Environment (IDE) is designed especially for
embedded systems engineers to assist them in building, debugging, and editing
embedded applications.
The MULTI IDE includes the following tools, most of which can be launched from
within the IDE or as a separate stand-alone program. Parenthetical text indicates
corresponding executable files, which are located in your MULTI IDE installation.
MULTI Launcher
• MULTI Launcher (mstart) — The gateway to the MULTI IDE, which allows
you to quickly launch any of the primary MULTI tools, access open windows,
and manage MULTI workspaces. For more information, see “The MULTI
Launcher” on page 4.
Editing Tools
• MULTI Editor (me) — A graphical editor for modifying text files.
• Checkout Browser (mcobrowse) — A graphical viewer for files managed
under a version control system.
• Diff Viewer (diffview) — A graphical viewer that displays differences between
two text files.
Building Tools
• MULTI Project Manager (mprojmgr) — A graphical interface for managing
and building projects.
• Integrate (integrate) — A graphical utility for configuring tasks, connections,
and kernel objects across multiple AddressSpaces when using the INTEGRITY
RTOS.
2
MULTI: Getting Started
Debugging Tools
Debugging Tools
• MULTI Debugger (multi) — A graphical source-level debugger.
• EventAnalyzer (mevgui) — A graphical viewer for monitoring the complex
real-time interactions of an embedded RTOS such as INTEGRITY or
u-velOSity.
• ResourceAnalyzer (wperf) — A graphical viewer for monitoring the CPU
and memory usage of an embedded system running the INTEGRITY RTOS.
• Serial Terminal (mterminal) — A serial terminal emulator for connecting to
serial ports on embedded devices.
• MULTI TimeMachine Tool Suite — A wide variety of trace analysis tools
that dramatically extend MULTI's trace and debugging capabilities.
Administrative Tools
• Bug Report (gbugrpt) — A utility for providing system configuration and
tool version information to the Green Hills support staff.
• Graphical Utilities (wgutils) — A collection of utilities for analyzing and
performing various operations on object files, libraries, and executables
produced with the Green Hills toolchain.
• MULTI License Administrator (mlmadmin) — A graphical utility for
managing Green Hills tools licenses.
Green Hills Software
3












Chapter 1. Introduction
The MULTI Launcher
The MULTI Launcher provides a convenient way to launch frequently used tools,
to create or access files and projects, and to manage MULTI workspaces. To open
the MULTI Launcher:
• Windows — From the Windows Start menu, select the MULTI menu item.
Alternatively, use Windows Explorer to navigate to the directory where you
installed the MULTI IDE, and double-click multi.exe.
• Linux/Solaris — Run the multi executable from your MULTI IDE installation
directory.
Tip
If you cannot obtain a license to use MULTI, see Chapter 1, “Licensing
for End Users” in the MULTI: Licensing book.
All of the main MULTI components can be accessed from the Launcher toolbar:
•
— Runs a shortcut or an action sequence in the current workspace. Also
allows you to create a new workspace or create or edit a shortcut.
•
— Opens the Project Manager on a recent or new project.
•
— Opens the Debugger on a recent or new executable.
•
— Opens the Editor on a recent or new file.
•
— Opens the Checkout Browser on a recent or new checkout.
•
— Establishes a target connection or opens the Connection Chooser or
Connection Organizer.
•
— Opens a Serial Terminal using a recent or new connection.
•
— Opens the EventAnalyzer (licensed separately).
•
— Opens the ResourceAnalyzer (licensed separately).
•
— Shows/hides the detail pane of the Launcher.
4
MULTI: Getting Started

MULTI Workspaces
You can also launch the Green Hills License Administrator and, if installed, the
Green Hills Probe Administrator from the Utilities menu.
During development, you can use the MULTI Launcher as a convenient, centralized
window manager. You can access any of your open MULTI windows from the
Windows menu of the Launcher.
MULTI Workspaces
The MULTI Launcher allows you to create and use workspaces. A MULTI
workspace is a virtual area where the tools, files, and actions required for a particular
project can be organized, accessed, and executed.
A workspace is typically created for each Top Project, and includes a working
directory and a group of related actions—for example, opening a project in the
MULTI Project Manager, connecting to a target, or performing a shell command.
Actions are grouped into action sequences, so that a single mouse click can perform
all the actions in the specified action sequence.
For more information, see Chapter 3, “Managing Workspaces and Shortcuts with
the Launcher” in the MULTI: Managing Projects and Configuring the IDE book.
Green Hills Software
5
Chapter 1. Introduction
Accessing Online Help
Online help provides useful information about MULTI and can be accessed in
several different ways. The following sections describe how to access online help
and how to use the Help Viewer.
Full Online Manuals
You can open the MULTI Help Viewer on an indexed, hypertext version of any
manual by selecting it from the list of installed manuals that appears in the Help
→ Manuals menu. The list is populated with manuals from your IDE installation,
linked Compiler installation, and configured OS installation (see “Configuring
MULTI for Use with INTEGRITY or u-velOSity” on page 26). Note that the
configured OS installation is overwritten in the current MULTI session if you open
the Project Manager on an INTEGRITY or u-velOSity project that specifies a
different OS installation.
You can also access manuals from the command line. Ensure that the IDE installation
directory is in your path, and enter the following command:
helpview pathname | -m manual_name
where:
• pathname opens the .chm file specified in pathname. You must provide a
full path.
• -m manual_name opens the manual manual_name. An example manual name
is "MULTI: Debugging". If the manual name contains a space as in the
preceding example, you must enclose it in quotation marks.
Context-Sensitive Help
Many MULTI windows and dialog boxes are linked to specific topics in the online
manuals. To view the topic for an active window or dialog box, press F1.
If you are using the MULTI Editor, you can also open context-sensitive help about
a button or a menu item by selecting Help → Identify and then clicking the button
or selecting the menu item.
6
MULTI: Getting Started



Command, Configuration Option, and Keyword Help
Command, Configuration Option, and Keyword Help
You can obtain help information about a MULTI Debugger command, a MULTI
configuration option, or a keyword by typing help command_name, help
configuration_option, or help keyword in the Debugger command pane. If
you specify the name of a command or configuration option, the Help Viewer opens
on documentation for the command or option. If you specify a keyword (a word
that is not a command or configuration option), the Help Viewer searches all manuals
for keyword.
To print the basic syntax of a MULTI Debugger command to the command pane,
type usage command_name.
The Help Viewer Window
The following graphic displays the Help Viewer window.
The Help Viewer toolbar contains the following buttons, from left to right:
• Back (
) and Forward (
) — Returns to pages you have visited during the
current help session. Click the button once for each page you want to revisit.
Click and hold the button to select from a list of pages you have visited. These
buttons function across books.
Green Hills Software
7





Chapter 1. Introduction
• View All Subtrees (
) — Toggles the display of the current selection's
sub-topics (if any) in the view pane. When you open the Help Viewer, this
button defaults to its last value.
• Contract All Unselected (
) — Collapses expanded topics in the Contents
tab if the topics do not contain any selections.
• Print (
) — Prints the help page displayed in the view pane. To create a help
page consisting of mixed topics, hold down the Ctrl key while clicking separate
topics. MULTI combines the separate topics and orders them by their location
in the Contents tab.
• Previous Page (
) and Next Page (
) (located at far right) — Displays the
previous or following topic as ordered in the Contents tab. If the previous or
next topic includes sub-topics and the View All Subtrees button is enabled,
the Help Viewer displays the sub-topics along with the section.
The MULTI Help Viewer contains two panes. The right-hand pane, or the view
pane, displays the help page for your selection. The left-hand pane contains the
following three tabs:
• Contents — Displays topics in the manual you are viewing. Click a plus or
minus icon to show or hide nested topics. Click a topic to display it in the view
pane.
• Index — Displays index entries for the manual. To search the index entries,
enter a word or words in the text box located at the top of the pane. MULTI
returns results that contain the word(s) you typed. Click an index entry to
display the associated topic in the view pane.
• Search — Allows you to search for specific words in the current manual or in
all manuals. For information about searching from this tab, see “Searching
Manuals in the Help Viewer” on page 12.
Navigating Help
Navigating manuals in the MULTI Help Viewer is easy. This section describes
different ways to find information.
8
MULTI: Getting Started





Navigating Help
Viewing Previous and Next Topics
To display the previous or following topic as ordered in the Contents tab, do one
of the following:
• Click the
or
button located in the upper-right corner of the Help Viewer
window.
• Select View → Previous Contents Entry or View → Next Contents Entry.
If the previous or next topic includes sub-topics and the View All Subtrees button
(
) is enabled, the Help Viewer displays the sub-topics along with the topic.
Returning to Previously Viewed Help Pages
To return to pages you have visited during the current help session, do one of the
following:
• Click the
or
button located in the left corner of the toolbar. Click the
button once for each page you want to revisit. Click and hold the button to
select from a complete list of pages you have visited during the current help
session. These buttons function across books.
• Select View → Back or View → Forward from the menu bar. This feature
functions across books.
Linking to Related Topics
The underlined links available in the view pane allow you to jump to related topics.
If, when you click a link, a dialog box appears with the message:
You have requested information that the Help Viewer is unable
to retrieve.
one of the following factors may be the cause:
• The manual that the link points to may not be included with your distribution.
• If the link points to an INTEGRITY or u-velOSity manual, you may need to
set the location of the installed OS distribution so that the Help Viewer can
Green Hills Software
9
Chapter 1. Introduction
locate the relevant help files. For information about how to do this, see
“Configuring MULTI for Use with INTEGRITY or u-velOSity” on page 26.
• If the link points to an INTEGRITY or u-velOSity manual, you may be using
a version of the operating system that does not support links from MULTI help.
Note
If you are using MULTI with multiple target architectures (such as ARM
and Power Architecture), you may install tools of the same version number
into a single directory. If you click a link to a target-specific book in this
case, MULTI chooses which version of the book to link to (ARM or
Power Architecture in this example).
Bookmarking Help Pages
You can use bookmarks to return to pages you have visited across MULTI sessions.
To bookmark a page, select Bookmarks → Bookmark This Page.
You can bookmark a help page consisting of mixed topics by holding down the
Ctrl key while clicking separate topics. MULTI combines the separate topics in
the view pane and orders them by their location in the Contents tab. Bookmark the
page as usual.
The Bookmarks menu lists all your bookmarks from across MULTI manuals and
sessions. To return to a bookmarked page, do one of the following:
• Select Bookmarks, and choose a bookmark.
• Select Bookmarks → Manage Bookmarks, and double-click a bookmark.
• From any MULTI tool, select Help → Bookmarks, and choose a bookmark.
To rename, delete, or reorder existing bookmarks, launch the Bookmark Manager
as described in the next section, “Managing Bookmarks” on page 10.
Managing Bookmarks
You can use the Bookmark Manager to rename or delete bookmarks, navigate to
bookmarks, or modify the ordering of bookmarks in the Bookmarks menu.
10
MULTI: Getting Started








Navigating Help
To open the Bookmark Manager, do one of the following:
• In the Help Viewer, select Bookmarks → Manage Bookmarks.
• From any MULTI tool, select Help → Bookmarks → Manage Bookmarks.
The list on the left side of the Bookmark Manager displays the names of all the
bookmarks you have created. When a bookmark is selected, the topic(s) and the
manual marked by that bookmark are displayed in the right side of the window.
The bookmark may reference multiple topics if, for example, you created the
bookmark with multiple entries selected in the Contents tab or if you selected an
index entry associated with multiple topics. Double-clicking a bookmark or a topic
displays that bookmark or topic in the Help Viewer.
The toolbar buttons in the Bookmark Manager allow you to perform the following
operations on bookmarks:
•
— Display the selected bookmark(s) in the Help Viewer.
•
— Rename the selected bookmark.
•
— Delete the selected bookmark(s).
•
and
— Move the selected bookmark up or down in the list. The order
of the bookmarks in the Bookmarks menu mirrors the order of the bookmarks
in the Bookmark Manager.
Note
The
and
buttons are available for use on multiple bookmarks. You
can select multiple bookmarks from the left side of the window by
dragging to select rows or by using Shift or Ctrl to select items.
Green Hills Software
11
Chapter 1. Introduction
Opening Additional Manuals from the Help Viewer
To open a new manual in the current window, do one of the following:
• Select File → Open Manual and choose from the list of installed manuals.
For information about how the list is populated, see “Full Online Manuals”
on page 6.
• Select File → Open Manual File and navigate to a particular file in the file
chooser that appears.
To open a new manual in a new window, select View → Open Other Manuals in
New Window and then open the manual as usual. When you open the Help Viewer,
the Open Other Manuals in New Window toggle option defaults to its last value.
Searching Manuals in the Help Viewer
With the Help Viewer's Search feature, you can search the current manual or all
manuals simultaneously. Follow these steps to perform a search:
1. Type a word or words in the Search tab's text box.
To search for a phrase, put quotation marks around the phrase. To exclude a
word from the search, prefix it with an exclamation point (!). For example,
typing help !MULTI displays all the search results for help that do not contain
the word MULTI in their content. To search for an exclamation point at the
beginning of a word, you must enter a plus sign followed by an exclamation
point (+!). Full regular expressions are not supported.
2. To search for all keywords — Select all from the Find pages matching
drop-down list. The search function returns results that contain all the search
words; however, they may not occur as a phrase unless you enclosed them in
quotation marks.
To search for any keywords — Select any from the Find pages matching
drop-down list. The search function returns results that contain one of the
words, a combination of the words, or all of the words.
3. Select the Match whole word only check box if you want the search results
to contain the keyword as you typed it. For example, if you select this option,
search results for a singular word do not contain the plural form of the word.
12
MULTI: Getting Started
Searching Manuals in the Help Viewer
4. To search all installed manuals, select the Search all manuals check box. For
information about what installations the manuals are pulled from, see “Full
Online Manuals” on page 6. To search only the current manual, clear this
check box.
5. Press Enter to display a list of search results. Click any entry in the list to
display the entry's help page in the view pane. If no results appear, no matches
were found.
Green Hills Software
13
Chapter 2
MULTI Tutorial
Contents
Creating Your First Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Building Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connecting to a Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Connecting to Your Target Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Preparing Your Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setting Up a Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Additional Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Configuring MULTI for Use with INTEGRITY or u-velOSity . . . . . . . . . . . . . 26

Chapter 2. MULTI Tutorial
This chapter introduces you to the basic components of the MULTI IDE, and leads
you through creating and building a simple Hello World program. You will then
run and debug this program on both a simulator and your target hardware.
Creating Your First Project
A project is a collection of source code and resource files that is used to build one
or more programs or libraries. Follow the steps below to create the Hello World
project that is used for the remainder of this tutorial.
1. Start the Launcher as described in “The MULTI Launcher” on page 4.
16
MULTI: Getting Started


Creating Your First Project
2. Select File → Create Workspace to open the Select Workspace Type dialog.
3. Enter Hello World in the Name field. Click OK to create a workspace and
launch the Project Wizard.
Green Hills Software
17

Chapter 2. MULTI Tutorial
4. Click Next to accept the default settings for the project name and directory.
5. Select the Stand-alone operating system. Click Next.
6. If only one processor family is available, the Project Wizard automatically
selects it and continues to the next screen. Otherwise, select your processor
family and click Next.
7. Select your target board. If it is not listed or if you have not yet decided on
one, expand the Generic list and select the processor you intend to target.
Click Finish.
8. In the Top Project Created dialog box that appears next, click OK.
9. The Project Manager: Select Item to Add screen appears next. This screen
allows you to add an example or executable to the framework just created by
the Project Wizard.
For this tutorial, select Hello World (C) and click Finish to accept the defaults
for the remaining settings. The Project Manager will open on your new project.
For information about creating an INTEGRITY project, see “Building INTEGRITY
Applications” in the INTEGRITY Development Guide.
For comprehensive information about the Project Wizard, see “Creating a Project”
in Chapter 1, “Creating a Project” in the MULTI: Managing Projects and
Configuring the IDE book.
18
MULTI: Getting Started


Building Your Program
Building Your Program
In the previous section, you created a project and added all the files necessary to
build your Hello World executable.
The project is ready to build at this point. Click
(Build) to build the executable
program, hello. You can follow the progress of the build in the Status pane at the
bottom of the Project Manager window.
For more information about the MULTI Project Manager, see Chapter 2, “Managing
and Building Projects with the Project Manager” in the MULTI: Managing Projects
and Configuring the IDE book.
Green Hills Software
19



Chapter 2. MULTI Tutorial
Starting the Debugger
Now that your project is built, click
(Debug) to open the MULTI Debugger on
the hello executable.
For information about the MULTI Debugger, see Chapter 2, “The Main Debugger
Window” in the MULTI: Debugging book.
Connecting to a Simulator
Before debugging the program in the MULTI Debugger, you must connect to a
hardware target or simulator that will run the program. The simulators provide an
easy-to-use platform to develop and debug your application before you begin
working with actual hardware. Perform the following steps to connect to a Green
Hills simulator:
1. Click
(Connect) on the MULTI Debugger toolbar to open the Connection
Chooser.
20
MULTI: Getting Started






Debugging Your Program
2. MULTI creates several Connection Methods for your target board as part of
your project. Select the simulator connection from the drop-down list and click
Connect.
For more information about connecting to a target, see Chapter 3, “Connecting to
Your Target” in the MULTI: Debugging book.
Debugging Your Program
Now that you are connected to the simulator, you can step through your code, use
breakpoints, view registers and memory, and perform many other debug tasks with
the MULTI Debugger.
Try the following basic debugging techniques:
• To step into the program, click
(Step (into Functions) on Selected Items)
on the Debugger toolbar.
Note
MULTI will automatically download your program to the simulator
when you first begin executing the code.
• To set a breakpoint (
), click any of the green breakdots ( ).
• To step to the next line, click
(Next (over Functions) on Selected Items)
on the Debugger toolbar.
• To view register values, click
(Registers) on the Debugger toolbar.
• To view interlaced command and target output, see the Debugger Cmd
(command) pane at the bottom of the window. To view just the target output,
select the I/O tab.
Green Hills Software
21





Chapter 2. MULTI Tutorial
• To view interlaced assembly and source code, click
(Assembly) on the
Debugger toolbar.
For more information about debugging your program, see the MULTI: Debugging
book.
For a quick reference to the commands available in the MULTI Debugger, see the
Quick Reference Card (only available in print).
Connecting to Your Target Hardware
Earlier, you connected to a simulator to debug your program. Now, use the following
steps to connect to your target board:
1. If you are still connected to the simulator, disconnect from it by clicking
(Disconnect) on the MULTI Debugger toolbar.
2. Connect your target board to the host computer via a debug device or serial
cable, depending on which protocol you will be using to debug your board.
3. Click
(Connect) to open the Connection Chooser.
4. Select the Connection Method corresponding to your debug device from the
drop-down list.
If your debug device is not listed, click
(Create a new Connection Method)
and enter a name and type for your connection.
Click Create and review the information to verify that this Connection Method
is configured correctly for your board setup. Double-check the connection
type and name (or address), and any other relevant settings. Click OK when
all of the settings are correct.
22
MULTI: Getting Started


Preparing Your Target
5. Click Connect to connect to your target hardware.
6. If more than one CPU is present on your target, the Bind to which
Remote/CPU dialog box appears. Select a CPU and click OK.
For more information about connecting to a target, see Chapter 3, “Connecting to
Your Target” in the MULTI: Debugging book.
Preparing Your Target
Before you can run or debug an executable on your target, you must download or
flash the executable to your target's memory, or verify that the executable is already
present on the target. To accomplish this, perform the following steps:
1. Select the hello executable in the target list (located at the top of the Debugger
window).
2. Click
(Prepare Target) on the Debugger toolbar to open the Prepare
Target dialog box.
3. MULTI recommends settings for preparing your target based on the executable
you are debugging. Click OK to accept the recommended settings and
download the hello executable to your target.
Note
Some target boards may require modifications to the setup script provided
by Green Hills. For more information, see “Configuring Your Target
Hardware for Debugging” in Chapter 6, “Configuring Your Target
Hardware” in the MULTI: Debugging book.
You are now ready to debug your program on your target board.
Once you are finished debugging, click
(Disconnect) to disconnect from your
target hardware. Then close the MULTI Debugger and the MULTI Project Manager.
Green Hills Software
23
Chapter 2. MULTI Tutorial
Setting Up a Workspace
MULTI workspaces allow you to easily associate actions with a project and perform
those actions from within the Launcher. You will now add actions to the workspace
created at the beginning of this tutorial.
Adding Actions to Your Workspace
Workspace actions are grouped into action sequences. Your new workspace contains
the automatically created Startup action sequence. The Startup action sequence
contains an action that launches the MULTI Project Manager on your project.
Follow the steps below to add additional actions that connect to your target and
open your program in the MULTI Debugger:
1. Switch to or start the Launcher, and select the Hello World workspace from
the drop-down list.
2. Right-click the Startup action sequence and select Add Action from the
shortcut menu.
3. Select Connection in the Action drop-down list.
4. Select your hardware target Connection Method in the Target drop-down list
and click OK.
5. Right-click the Startup action sequence and select Add Action from the
shortcut menu.
6. Select Debug Program in the Action drop-down list.
7. Select your hello executable in the Prog drop-down list and click OK.
24
MULTI: Getting Started



Additional Examples
The Startup action sequence in your workspace now contains two additional actions,
one each of type Connection and Debug Program. Now, whenever you run the
Startup action sequence, MULTI will open your project in the MULTI Project
Manager, connect to your target, and open your program in the MULTI Debugger.
Run the Startup action sequence by clicking the
(Run Action Sequences or
Shortcuts) button and selecting Hello World: Startup.
For more information about workspaces, see Chapter 3, “Managing Workspaces
and Shortcuts with the Launcher” in the MULTI: Managing Projects and Configuring
the IDE book.
Additional Examples
There are a number of example projects that highlight particular features of the
MULTI Debugger. To access these examples, perform the following steps:
1. Switch to or start the Launcher, and select the Hello World workspace from
the drop-down list.
2. Double-click the Project Manager action.
3. In the Project Manager, select the default.gpj file for the Hello World project
you created earlier, and click
(Add Item into default.gpj).
4. Select one of the demo projects in the Project Manager: Select Item to Add
dialog box. The Basic Debugging project is a good one to start with. Click
Finish.
Green Hills Software
25


Chapter 2. MULTI Tutorial
5. Select the demo project you just added, and click
(Build).
6. Click
(Debug), and follow the Cmd pane directions, which lead you through
the example.
Configuring MULTI for Use with INTEGRITY or u-velOSity
In the preceding tutorial, you created a stand-alone project. If you plan to use
INTEGRITY or u-velOSity for future projects, you should provide MULTI with
the location of the installed OS distribution. This information is used to:
• Determine the default OS distribution directory used by the Project Wizard
• Add relevant documentation to MULTI's Help menu (see “Full Online Manuals”
on page 6)
• Enable cross-book links between MULTI and INTEGRITY books or between
MULTI and u-velOSity books if the version of the operating system you are
using supports this
• Determine the location of the Event Analyzer configuration file (see the
EventAnalyzer User's Guide)
To define the location of the installed OS distribution:
1. Select Set INTEGRITY Distribution or Set u-velOSity Distribution from
one of the following locations:
• The Config menu located in the MULTI Launcher, Debugger, or Help
Viewer
• The Tools → Configuration submenu located in the MULTI Project
Manager
The dialog box that appears is an interface to the per-user file integrity.dist
or uvelosity.dist.
2. Type the path to your INTEGRITY or u-velOSity installation directory, or use
the browse button to navigate to the directory.
3. Click Save.
26
MULTI: Getting Started
Index
H
hardware
connecting to, 22
help (see online help)
Help menu
online help, obtaining, 6
Help Viewer
navigating, 8, 9, 10
opening additional manuals in, 12
searching, 12
A
window, 7
helpview command, 6
adding actions to workspaces, 24
I
B
Integrated Development Environment (IDE) (see MULTI
breakpoints
Integrated Development Environment (IDE))
setting, 21
INTEGRITY
building projects, 19
using with MULTI IDE, 26
interlaced assembly
C
viewing, 22
command help, 7
commands
K
help regarding, 7
keyword help, 7
helpview, 6
configuration options
L
help regarding, 7
connecting
Launcher (see MULTI Launcher)
to hardware, 22
to simulator, 20
M
context-sensitive help, 6
MULTI Integrated Development Environment (IDE)
conventions
document set, vii
typographical, viii
online help, 6
creating
overview, 2
projects, 16
using with INTEGRITY or u-velOSity, 26
workspaces, 17
MULTI Launcher
overview, 4
D
Debugger
O
starting, 20
online help, 6
using, 21
(see also Help Viewer)
document set, vi, vii
for commands, 7
for configuration options, 7
E
context-sensitive, 6
example projects, 25
for keywords, 7
limitations, 10
F
online manuals, 6
overview, 6
F1 key, for help, 6
preparing your target
P
preparing your target, 23
programs
stepping into, 21
Project Wizard, 17
projects
building, 19
creating, 16
examples, 25
R
registers
viewing, 21
S
setting breakpoints, 21
simulator
connecting to, 20
starting
Debugger, 20
stepping into programs, 21
T
target
preparing, 23
typographical conventions, viii
U
u-velOSity
using with MULTI IDE, 26
V
viewing
interlaced assembly, 22
registers, 21
W
workspaces
adding actions to, 24
creating, 17
overview, 5
28
MULTI: Getting Started
Document Outline
- MULTI: Getting Started
- Contents
- Preface
- Chapter 1. Introduction
- Chapter 2. MULTI Tutorial
- Index