UM08025 Ozone
UM08025 Ozone
UM08025 Ozone
User Manual
Document: UM08025
www.segger.com
2
Disclaimer
Specifications written in this document are believed to be accurate, but are not guar-
anteed to be entirely free of error. The information in this manual is subject to
change for functional or performance improvements without notice. Please make sure
your manual is the latest edition. While the information herein is assumed to be
accurate, SEGGER Microcontroller GmbH & Co. KG (the manufacturer) assumes no
responsibility for any errors or omissions. The manufacturer makes and you receive
no warranties or conditions, express, implied, statutory or in any communication with
you. The manufacturer specifically disclaims any implied warranty of merchantability
or fitness for a particular purpose.
Copyright notice
You may not extract portions of this manual or modify the PDF file in any way without
the prior written permission of the manufacturer. The software described in this doc-
ument is furnished under a license and may only be used or copied in accordance
with the terms of such a license.
Trademarks
Names mentioned in this manual may be trademarks of their respective companies.
Brand and product names are trademarks or registered trademarks of their respec-
tive holders.
Contact address
SEGGER Microcontroller GmbH & Co. KG
In den Weiden 11
D-40721 Hilden
Germany
Tel.+49 2103-2878-0
Fax.+49 2103-2878-28
Email: support@segger.com
Internet: http://www.segger.com
Revisions
This manual describes the J-Link Debugger software.
For further information on topics or routines not yet specified, please contact us
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
3
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
4
This user manual describes the features and usage of J-Link Debugger, SEGGERs
source-level debugger for embedded systems.
Typographic Conventions
Throughout this manual, the following typographic conventions are followed:
Naming Conventions
Please refer to the glossary for the complete list of terms and abbreviations used in
this manual.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
5
emUSB
USB device stack
A USB stack designed to work on any
embedded system with a USB client
controller. Bulk communication and
most standard device classes are sup-
ported.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
6
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
7
Table of Contents
1 Introduction............................................................................................... 15
1.1 What is Ozone? .....................................................................................16
1.2 Features of Ozone .................................................................................16
1.2.1 Unlimited Flash Breakpoints ................................................................ 16
1.2.2 Wide Range of Supported File Formats ................................................. 16
1.2.3 Fully Customizable User Interface ........................................................ 16
1.2.4 Extensive Printf-Support..................................................................... 16
1.2.5 Peripheral and CP15 Register Support .................................................. 16
1.2.6 Automatic Reloading of Modified Program Files ...................................... 16
1.2.7 Scripting Interface............................................................................. 17
1.2.8 Instruction Trace ............................................................................... 17
1.2.9 Code Profiling ................................................................................... 17
1.2.10 Data Graphs ..................................................................................... 17
1.2.11 Timeline ........................................................................................... 17
1.2.12 Advanced Memory Window ................................................................. 17
1.2.13 System Variable Editor ....................................................................... 17
1.2.14 Change-Level Highlighting .................................................................. 17
1.2.15 Easy Data Member Navigation............................................................. 17
1.3 Requirements........................................................................................18
1.4 Supported Operating Systems...............................................................18
1.5 Supported Target Devices .....................................................................18
1.6 Supported Debug Interfaces .................................................................18
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
8
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
9
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
10
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
11
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
12
7 Appendix .................................................................................................141
7.1 Value Descriptors ............................................................................... 142
7.1.1 Frequency Descriptor........................................................................142
7.1.2 Source Code Location Descriptor ........................................................142
7.1.3 Color Descriptor...............................................................................142
7.1.4 Font Descriptor ................................................................................143
7.1.5 Coprocessor Register Descriptor.........................................................143
7.2 System Constants ............................................................................... 144
7.2.1 Host Interfaces ................................................................................144
7.2.2 Target Interfaces .............................................................................144
7.2.3 Boolean Value Constants...................................................................144
7.2.4 Value Display Formats ......................................................................144
7.2.5 Memory Access Widths .....................................................................145
7.2.6 Access Types...................................................................................145
7.2.7 Connection Modes ............................................................................145
7.2.8 Reset Modes....................................................................................145
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
13
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
14
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
15
Chapter 1
Introduction
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
16 CHAPTER 1 Introduction
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
17
1.2.11 Timeline
Ozones Timeline Window visualizes the course of the programs call stack over time.
It provides advanced navigation features that allow users to quickly understand rela-
tive and absolute call frame sizes and positions, which make it a great profiling tool
as well.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
18 CHAPTER 1 Introduction
1.3 Requirements
To use Ozone, the following hardware and software requirements must be met:
Windows 2000 or later operating system
1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64) processor
1 gigabyte (GB) RAM
100 megabyte (MB) available hard disk space
J-Link or J-Trace debug probe
JTAG or SWD data cable to connect the MCU with the debug probe
(not needed for J-Link OB)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
19
Chapter 2
Getting Started
This chapter contains a quick start guide. It covers the installation procedure and explains how
to use the Project Wizard in order to create a basic project file. The chapter completes by
explaining how a debug session is entered.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
20 CHAPTER 2 Getting Started
2.1 Installation
This section explains how Ozone is installed and deinstalled from the operating sys-
tem.
After installation, Ozone can be started by double-clicking on the executable file that
is located in the destination folder. Alternatively, the debugger can be started by exe-
cuting the desktop or start menu shortcuts.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
21
2.1.3.1 Installer
The Linux installer requires no user interaction and installs Ozone into folder /opt/
SEGGER/ozone/<version>. A symlink to the executable file is copied to folder /usr/
bin. The installer automatically resolves unmet library dependencies so that users do
not have to install libraries manually.
SEGGER provides two individual Linux installers for debian and redhat distributions.
Both installers behave exactly the same way and require an internet connection.
Please note that Ozones Linux installer automatically resolves unmet dependencies
and installs library files as required.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
22 CHAPTER 2 Getting Started
2.1.5.1 Installer
The macOS-installer installs Ozone into the application folder. It provides a single
installation option, which is the choice of the installation disk (see figure MacOS
installer on page 22).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
23
Device
On the Project Wizard's first page, the user is asked to select the MCU to be
debugged on. By clicking on the dotted button, a complete list of MCU's grouped by
vendors is opened in a separate dialog from which the user can choose the desired
device.
Peripherals
The user may optionally specify a peripheral register set description file that
describes the memory-mapped register set of the selected MCU. If a valid register-
set description file is specified, peripheral registers will be observable and editable
via the debugger's Register Window (see Register Window on page 90).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
24 CHAPTER 2 Getting Started
On the second page of the Project Wizard, J-Link settings are defined.
Target Interface
The target interface setting specifies how the J-Link debug probe is connected to the
MCU. Ozone currently supports the JTAG and SWD target interfaces.
Host Interface
The host interface parameter specifies how the J-Link debug probe is connected to
the PC hosting the debugger (host-PC). All J-Link models provide a USB interface.
Some J-Link models provide an additional Ethernet interface which is especially use-
ful for debugging an embedded application from a remote host-PC.
Serial No / IP Address
In case multiple debug probes are connected to the host-PC via USB, the user may
enter the serial number of the debug probe he/she wishes to use. If no serial number
is given, the user will need to specify the serial number via a dialog that pops up
when starting the debug session. If Ethernet is selected as host interface, the caption
of this field changes to IP Address and the user may enter the IP address of the
debug probe to connect to.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
25
On the last page of the Project Wizard, the user specifies the debugee.
Data File
This input field allows the user to specify the desired program to debug. Please note
that only ELF or compatible program files contain symbol information. When specify-
ing a program file without symbol information, the debugging features of Ozone are
limited (see Symbol Information on page 115).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
26 CHAPTER 2 Getting Started
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
27
Chapter 3
This chapter provides a description of Ozone's graphical user interface and its usage. The
focus lies on a brief description of graphical elements. Chapter 5 will revisit the debugger
from a functional perspective.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
28 CHAPTER 3 Graphical User Interface
However, some user actions do not have an associated text command and thus can-
not be executed from the command prompt or from a script function. On the other
hand, some actions can only be executed from these locations, but have no affiliated
user interface element. Furthermore, some actions do not provide a hotkey. Appendix
7.8 provides information about which method of execution is available for the differ-
ent user actions.
3.1.3.1 Hotkeys
Multiple local user actions may share the same hotkey. As a consequence, a local
user action can only be triggered via its hotkey when the window containing the
action is visible and has the input focus. On the contrary, global user actions have
unique hotkeys that can be triggered without restriction.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
29
Both foreground and background colors used for change level highlighting can be
adjusted via the User Preference Dialog (see User Preference Dialog on page 44) or
via the user action Edit.Color (see Edit.Color on page 166).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
30 CHAPTER 3 Graphical User Interface
In its center, the Main Window hosts the source code document viewer, or Source
Viewer for short. The Source Viewer is surrounded by three content areas to the left,
right and on the bottom. In these areas, users may arrange debug information win-
dows as desired. The layout process is described in Window Layout on page 43. The
only window that cannot be undocked or repositioned is the Source Viewer itself.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
31
Ozones Main Window provides a menu bar that categorizes all user actions into five
functional groups (see the illustration above). It is possible to control the debugger
from the menu bar alone. The five menu groups are described below.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
32 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
33
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
34 CHAPTER 3 Graphical User Interface
3.5 Toolbars
Three of Ozones Main Menu groups File, Debug and View have affiliated toolbars
that can be docked to the Main Window or positioned freely on the desktop (see the
illustration below). In addition, a breakpoint toolbar is provided.
File Toolbar
Debug Toolbar
View Toolbar
Breakpoint Toolbar
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
35
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
36 CHAPTER 3 Graphical User Interface
Registers
Memory
Local Data
Global Data
Watched Data
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
37
Figure 3.6. Source Viewer (inactive, left) and Disassembly Window (active, right)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
38 CHAPTER 3 Graphical User Interface
3.8.3 Sidebar
Each code window hosts a sidebar on its left side. The sidebar displays icons that
provide additional information about code lines. Breakpoints can be toggled by click-
ing on the sidebar. If desired, the sidebar can be hidden.
Icon Meaning
The code line does not contain executable code.
The code line contains executable code.
A breakpoint is set on the code line.
The code line contains the PC instruction and will be executed next.
The code line contains a call site of a function on the call stack.
The code line contains the PC instruction and a breakpoint is set on the line.
The code line contains a call site and a breakpoint is set on the line.
Table 3.7. Sidebar Icons
Highlight Meaning
for (int i = 0) { The code line contains the program execution point (PC).
Function(x,y); The code line contains the call site of a function on the call stack.
for (int i = 0) { The code line is the selected line.
The code line contains the instruction that is currently selected
for (int i = 0) { within the Instruction Trace Window (See Backtrace Highlighting
on page 101).
Table 3.8. Code Line Highlights
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
39
3.8.5 Breakpoints
Ozones code windows provide multiple options to set, clear, enable, disable and edit
breakpoints. The different options are described below.
Breakpoints on arbitrary addresses and code lines can be toggled using the actions
Break.Set, Break.SetOnSrc, Break.Clear and Break.ClearOnSrc (see Breakpoint
Actions on page 158).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
40 CHAPTER 3 Graphical User Interface
These default colors can be adjusted via the User Preference Dialog (see User Pref-
erence Dialog on page 44) or programatically via user action Edit.Color (see
Edit.Color on page 166).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
41
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
42 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
43
Figure 3.11. Undocked Disassembly Window floating over the Main Window
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
44 CHAPTER 3 Graphical User Interface
3.11 Dialogs
This section describes the different dialogs that are employed within Ozone.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
45
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
46 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
47
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
48 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
49
Value Condition
The value condition pane allows users to specify the IO-value required to trigger the
data breakpoint. The value condition can be disabled by checking the "Ignored" field.
Please refer to Data Breakpoints on page 122 for further information.
OK Button
By pressing the OK button, a data breakpoint with the specified attributes is set in
MCU hardware and added to the Data Breakpoint Window. In case the debugger is
disconnected from the MCU, the data breakpoint is added to the Data Breakpoint
Window and scheduled to be set in MCU hardware when the debug session is started.
Cancel Button
Closes the dialog without setting the data breakpoint.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
50 CHAPTER 3 Graphical User Interface
State
Enables or disables the breakpoint.
Type
Sets the breakpoints implementation type
(see Break.SetType on page 196).
Skip Count
Program execution can only halt each Skip-
Count+1 amount of times the breakpoint is
hit. Furthermore, the remaining trigger con-
ditions must be met in order for program
execution to halt at the breakpoint.
Task
Specifies the RTOS task that must be run-
ning in order for the breakpoint to be triggered. The RTOS task that triggers the
breakpoint can be specified either via its name or via its ID. When the field is left
empty, the breakpoint is task-insensitive.
Condition
An integer-type or boolean-type C-language-expression that must be met in order for
program execution to halt at the breakpoint. When option "Trigger when true" is
selected, the expression must evaluate to a non-zero value in order for the break-
point to be triggered. When option "Trigger when changed" is selected, the break-
point is triggered each time the expression value changed since the last time the
breakpoint was encountered.
Skip Count
Program execution can only halt each SkipCount+1 amount of times the breakpoint is
encountered. In addition, the remaining trigger conditions must be met in order for
program execution to halt at the breakpoint.
Task Filter
Specifies the RTOS task that must be running in order for the breakpoint to be trig-
gered. The RTOS task that triggers the breakpoint can be specified either via its
name or via its ID. When the field is left empty, the breakpoint is task-insensitive.
Extra Actions
Specifies the additional actions that are performed when the MCU is halted at the
breakpoint. The provided options are a text message that is printed to the Console
Window or a message that is displayed within a popup dialog.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
51
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
52 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
53
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
54 CHAPTER 3 Graphical User Interface
Entity
Specifies the set of memory address ranges to be covered by the output file.
Function / Address Range
Selects the function or address range to be covered by the output file.
Output File
Output file.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
55
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
56 CHAPTER 3 Graphical User Interface
Report Scope
Program scope to be covered by the output file.
Tree View
Allows users to define the report scope by selecting the files and functions to be cov-
ered by the output file.
Output Format
Output file format. The default option "Report" generates a human-readable text file.
The alternate option "CSV" generates a comma-separated values file that can be
used with table-processing software such as excel.
CSV Format
Available when output file format is "CSV". Specifies which program entities within
the selected report scope are to be exported. For example, if the report scope con-
tains a single file and the selected CSV format is "Instructions", then a code profile
report about all instructions within the selected file is generated.
Output File
Output file path.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
57
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
58 CHAPTER 3 Graphical User Interface
Trace Source
Specifies the trace data channel to be used. Ozones Instruction Trace, Code Profile
and Timeline Windows are supplied with instruction trace (ETM) data that is emitted
over the trace port. The SWO channel delivers "printf" (ITM) application data to
Ozones Terminal Window. Please note that currently, data streaming via both trace
channels is not supported. For further information on ETM and ITM trace and how to
setup your hardware and software accordingly, please consult the J-Link user man-
ual.
Trace Timing
Specifies the software delays to be applied to the individual trace port data lines.
This essentially performs a software phase correction of the trace ports data signals.
SWO Speed
Specifies the signal frequency of the SWO trace interface in Hz.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
59
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
60 CHAPTER 3 Graphical User Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
61
Chapter 4
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
62 CHAPTER 4 Debug Information Windows
4.1.3 Font
The Source Viewers font can be adjusted by executing the user action Edit.Font (see
Edit.Font on page 166) or via the User Preference Dialog (see User Preference Dia-
log on page 44). In particular, the font size can be quick-adjusted by scrolling the
mouse-wheel while holding down the control key.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
63
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
64 CHAPTER 4 Debug Information Windows
expansion state. Furthermore, when the PC Line is expanded, the debuggers step-
ping behaviour will be the same as if the Disassembly Window was the active code
window (see "Stepping Expanded Source Code Lines" on page 119).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
65
Find
Displays a search dialog that lets users search for text occurrences within the active
document.
Numbering
Displays a submenu that allows users to specify the line numbering frequency.
Show Execution Counters
Toggles the display of execution counters (see "Execution Counters" on page 39).
Hotkey Description
Ctrl+Tab Selects the next document in the list of open documents.
Alt+Left/Right Shows the previous/next location in the text cursor history.
Shift+Left/Right Expands/Collapses the current line.
Ctrl+Arrow Key Scrolls the document while keeping the text cursor position.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
66 CHAPTER 4 Debug Information Windows
The encoding of a machine instruction is identical to the data stored at the instruc-
tions memory address. The term "mnemonic" refers to the abbreviated name of a
machine instruction.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
67
4.2.6 Viewport
The address range displayed within the Disassembly Window is referred to as the
windows viewport. The viewport can be modified in multiple ways that are described
below.
Positioning the Viewport
The address of the first instruction displayed within the Disassembly Window can be
set using action View.Disassembly. When the action is executed from the context
menu or without an address argument, an input dialog will pop up that allows users
to enter the address.
Scrolling the Viewport
The Disassembly Windows viewport can be scrolled in any of the ways depicted in
the table below.
Mouse Wheel Arrow Keys Page Keys Scroll Bar
4 Lines 1 Line 1 Page 1 Line
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
68 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
69
4.3.2 Limitations
The Instruction Trace Window currently cannot be used in conjunction with the Termi-
nal Windows printf via SWO feature.
4.3.3 Setup
When no program download is performed on debug session start, the J-Link firm-
wares trace cache must be initialized manually in order for instruction tracing to
work correctly (see "Initializing the Trace Cache" on page 132).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
70 CHAPTER 4 Debug Information Windows
Export
Opens a dialog that allows users export instruction trace data to a CSV file.
4.3.8 Hotkeys
The Instruction Trace Window provides multiple hotkeys to navigate instruction rows.
Table 4.10 gives an overview.
Hotkey Description
Right or + Expands the currently selected function node.
Collapses the currently selected function node. If an instruction is
Left or -
selected, the function containing the selected instruction is collapsed.
Up Selects and scrolls to the next instruction.
Down Selects and scrolls to the previous instruction.
Selects and scroll to the last (topmost) instruction of the currently
Shift+Up
selected function node.
Selects and scroll to the first (bottommost) instruction of the currently
Shift+Down
selected function node.
PgUp Scrolls one page up.
PgDn Scrolls one page down.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
71
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
72 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
73
Source Coverage
Amount of executable source code lines of the program entity that have been covered
since code profile data was reset. An executable source code line is considered cov-
ered if all of its machine instructions were fully executed. In Figure 4.11, 98.7% or
78 of 79 executable source codes lines within function main were covered.
Run Count
Amount of times a program entity was executed since code profile data was reset.
Load
Amount of instruction fetches that occurred within the program entities address
range divided by the total amount of instruction fetches that occurred since code pro-
file data was reset.
Fetch Count
Amount of instruction fetches that occurred within the address range of the program
entity.
4.4.5 Filters
Individual program entities can be filtered from the code profile statistic. In particu-
lar, there are two different type of filters that can be applies to program entities, as
described below.
Profile Filter
When a profile filter is set on a program entity, its CPU load is filtered from the code
profile statistic. After filtering, the load column displays the distribution of the
remaining CPU load across all none-filtered program entities.
Coverage Filter
When a coverage filter is set on a program entity, its code coverage value is filtered
from the code profile statistic. After filtering, the code coverage columns displays
coverage values computed as if the filtered program entities do not exist.
Adding and Removing Profile Filters
A profile filter can be set and removed via user actions Profile.Exclude and Pro-
file.Include (see "Code Profile Actions" on page 159). In Addition, the load column of
the Code Profile Window provides a checkbox for each item that allows users to
quickly set or unset the filter on the item.
Adding and Removing Coverage Filters
A coverage filter can be set and removed via user actions Coverage.Exclude and Cov-
erage.Include (see "Code Profile Actions" on page 159). In Addition, the code cover-
age columns of the Code Profile Window provide a checkbox for each item that allows
users to quickly set or unset the filter on the item.
Observing the List of Active Filters
The Code Profile Filter Dialog can be accessed from the context menu and displays all
profile and coverage filters that were set, alongside the affiliated user action com-
mands that were executed.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
74 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
75
Window.Show("Console");
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
76 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
77
Attribute Description
State Indicates if the breakpoint is enabled or disabled.
Location Source line or memory address location of the breakpoint.
Permitted implementation type for the breakpoint
Permitted Impl.
(see see Breakpoint Implementation Types on page 146).
Actual Impl. Actual implementation type of the breakpoint.
Context Source code or assembly code line affiliated with the breakpoint.
Task Filter Name or ID of the RTOS task that triggers the breakpoint.
Skip Count The amount of times the breakpoint is skipped when it is encountered.
C-language expression that must evaluate to non-zero (or change)
Condition
in order to trigger the breakpoint (see Break.Edit on page 198).
Table 4.15. Breakpoint attributes
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
78 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
79
4.7.2 Overview
Each table row of the Call Graph Window provides information about a single function
call. The top level rows of the call graph are populated with the programs entry point
functions. Individual functions can be expanded in order to reveal their callees.
Stack Local
The amount of stack space used exclusively by the function.
Depth
The maximum length of any non-recursive call path that originates at the function.
Called From
Source code location of the function call.
Call Site PC
Instruction memory location of the function call.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
80 CHAPTER 4 Debug Information Windows
Group Callees
Displays all calls made to the same function as a single table row.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
81
Branch Sites
A call site that the debugger cannot affiliate with a source code line is displayed as
the address of the machine instruction that caused the branch to the called function.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
82 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
83
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
84 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
85
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
86 CHAPTER 4 Debug Information Windows
View Disassembly
Displays the first machine instruction of the selected function within the Disassembly
Window. If an inline expansion site is selected, this sites first machine instruction is
displayed instead.
View Call Graph
Displays the call graph of the function within the Call Graph Window.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
87
4.11.3 Viewport
The address range displayed within the Memory Window is referred to as the win-
dows viewport. The viewport can be modified in any of the following ways:
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
88 CHAPTER 4 Debug Information Windows
4.11.4 Toolbar
The Memory Windows toolbar provides quick access to the windows options. All tool-
bar actions can also be accessed via the windows context menu. The toolbar ele-
ments are described below.
Address Bar
The toolbars address bar provides a quick way of modifying the viewport address,
i.e. the memory address of the first byte that is displayed within the Memory Win-
dow. When a symbol expression is input into the address bar, the memory window
automatically scrolls to the expression value each time it changes.
Access Width
The red tool button allows users to specify the memory access width. The access
width determines whether memory is accessed in chunks of bytes (access width 1),
half words (access width 2) or words (access width 4).
Display Mode
The blue tool buttons let users choose the display mode. There are three display
modes that differ in the amount of hexadecimal figures (nibbles) that are displayed
per block in the windows hex section. The display mode can be set to 1, 2 or 4 bytes
per hexadecimal block, which corresponds to 2, 4, or 8 nibbles per block.
Fill Memory
Opens the Fill Memory Dialog (see Fill Memory on page 53).
Update Interval
Displays the Auto Refresh Dialog (see Periodic Update on page 88).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
89
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
90 CHAPTER 4 Debug Information Windows
FPU Registers
Floating point registers. This category is only available when the MCU possesses a
floating point unit.
CP15 Registers
Coprocessor-15 registers. This category is only available when the MCU core contains
a CP15 unit.
Peripheral Registers
Memory mapped registers. This category is only available when a peripheral register
set description file was specified. (see SVD Files on page 90).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
91
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
92 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
93
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
94 CHAPTER 4 Debug Information Windows
View Source
Displays the source code declaration location of the selected local variable in the
Source Viewer (see Source Viewer on page 62).
View Data
Displays the data location of the selected local variable in either the Memory Window
(see Memory Window on page 87) or the Register Window (see Register Window
on page 90).
Display (All) As
Changes the display format of the selected symbol or of all symbols (see Display
Format on page 36).
Expand / Collapse All
Expands or collapses all top-level nodes.
Auto Mode
Specifies whether the "auto mode" display option is active (see Auto Mode on
page 93).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
95
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
96 CHAPTER 4 Debug Information Windows
4.16.2 Expressions
The Watched Data Window is provided to evaluate and monitor arbitrary C-style
expressions (see Expressions on page 152). An expression can be watched, i.e.
added to the Watched Data Window, in any of the following ways:
Via the context menu item "Watch" of any symbol window.
Via the user action Window.Add (see Window.Add on page 169).
By dragging a symbol onto the window.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
97
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
98 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
99
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
100 CHAPTER 4 Debug Information Windows
4.18.1 Requirements
The hardware requirements for the Timeline Window are the same as those for
instruction tracing (see "Hardware Requirements" on page 69). In order to obtain a
consistent output when debugging multi-threaded applications, an OS-awareness-
plugin must have been specified (see "RTOS-Awareness-Plugin" on page 114). When
no program download is performed on debug session start, the J-Link firmwares
trace cache must be initialized manually in order for instruction tracing to work cor-
rectly (see "Initializing the Trace Cache" on page 132).
4.18.2 Overview
Each call frame of the timeline stack resembles a function invocation. A call frame
starts at a particular instruction index and ends at a greater instruction index. The
difference is the amount of instructions executed between entry to and exit from the
function. The current program execution point (PC) is located at the right side of the
timeline plot at instruction index 0. Instruction indexes grow negative to the left and
are displayed on bottom of the timeline plot.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
101
position and then scrolling the mouse wheel, users can quickly and precisely zoom
into the call stack context of the selected instruction. The instruction index of the
zoom cursor is displayed on top of it.
Figure 4.32. The timline cursor is synchronized with Ozones code and instruction windows.
The default color used for backtrace highlighting is yellow and can be adjusted via
the user action Edit.Color (see Edit.Color on page 166) or via the User Preference
Dialog (see User Preference Dialog on page 44).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
102 CHAPTER 4 Debug Information Windows
4.18.8 Panning
The timeline plot can be shifted horizontally or vertically by using the scrollbars or by
clicking on a window position and dragging the clicked position to a new location.
4.18.9 Zooming
The horizontal scale of the timeline plot is given as the amount of instructions that fit
between adjacent grid labels (time per div). The "time per divisor" can be increased
or decreased in any of the following ways:
by scrolling the mouse wheel up or down
by using the drop-down list displayed within the toolbar
by using the plus and minus buttons displayed within the toolbar
The vertical scale of the timeline plot is fixed.
4.18.12 Toolbar
The Timeline Windows toolbar hosts a drop-down list and two buttons that can like-
wise be used to control the horizontal scale of the timeline plot.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
103
4.19.1 Overview
The Data Graph Window employs SEGGERs High Speed Sampling (HSS) feature to
trace the values of user-defined expressions at time resolutions of up to 1 microsec-
onds. Sampling of expressions starts automatically each time the program is
resumed and stops automatically each time the program halts. Users simply have to
add expressions to the window, similarly to the use case of the Watched Data Win-
dow. For further information on HSS, please consult the J-Link user manual.
4.19.2 Requirements
The Data Graph Window requires the connected MCU to support background memory
access (BMA).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
104 CHAPTER 4 Debug Information Windows
Add Symbol
Opens an input box that lets users add an expression to
the window.
Remove All
Removes all expression from the window.
Clear Data
Clears the HSS sampling data, i.e resets the window to its initial state.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
105
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
106 CHAPTER 4 Debug Information Windows
4.19.5.4 Timeline
The signal plot displays a vertical timeline below the mouse
cursor that updates its position whenever the mouse is moved
over the plot. At the intersection point of the timeline with each
graph, a value box is displayed that indicates the graphs signal
value at the timeline position. Each value box has got an
expansion indicator that can be clicked to show or hide the
value box.
Clear Event
The debugging event upon which HSS sampling data is
cleared (see "Clear Event" on page 108).
Draw Points
When checked, sampling data is visualized as points instead of continuous signal
graphs.
Goto Time
Opens an input dialog that allows users to set the zoom cursor on a particular time
position.
Export
Opens a file dialog that allows users to export the sampling data to a CSV file.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
107
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
108 CHAPTER 4 Debug Information Windows
4.19.7 Toolbar
The Data Graph Windows toolbar provides quick access to the most important win-
dow settings (see Figure "Data Graph Window Layout" on page 103). The settings
affiliated with each toolbar element are described below, going from left to right on
the toolbar.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
109
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
110 CHAPTER 4 Debug Information Windows
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
111
Chapter 5
This chapter explains how to debug an embedded application using Ozones basic and
advanced debugging features. The chapter covers all activities that incur during a
typical debugging session from opening the project file to closing the debug ses-
sion.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
112 CHAPTER 5 Debugging with Ozone
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
113
5.2 Projects
A Ozone project (.jdebug) stores settings that configure the debugger so that it is
ready to debug an application program on a particular hardware setup (microcontrol-
ler and debug interface). When a project is opened or created, the debugger is ini-
tialized with the project settings.
/*********************************************************************
*
* OnProjectLoad
*
* Function description
* Executed when the project file is opened. Required.
*
**********************************************************************
*/
void OnProjectLoad (void) {
Project.SetDevice ("STM32F103ZE");
Project.SetHostIF ("USB", "0");
Project.SetTargetIF ("SWD");
Project.SetTIFSpeed ("2 MHz");
File.Open ("C:/Examples/Blinky_STM32F103_Keil/Blinky/RAM/Blinky.axf");
}
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
114 CHAPTER 5 Debugging with Ozone
5.2.4.4 RTOS-Awareness-Plugin
The user action Project.SetOSPlugin specifies the file path or name of the plugin that
adds RTOS awareness to the debugger (see Project.SetOSPlugin on page 183).
Ozone currently ships with two RTOS-awareness-plugins - one for SEGGERs embOS
and one for FreeRTOS.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
115
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
116 CHAPTER 5 Debugging with Ozone
Flow Chart
Appendix 7.6 provides a flow chart of the "Download & Reset" startup sequence. This
chart can be used as a reference when reprogramming the sequence via the scripting
interface.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
117
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
118 CHAPTER 5 Debugging with Ozone
Disassembly Window
The PC line can be brought into view via the windows context menu entry "Goto PC"
or by executing the user action View.PC (see View.PC on page 173).
5.5.2.1 Debug.RunTo
Debug.RunTo advances program execution to a particular function, source code line
or instruction address, depending on the command line parameter given (see
Debug.RunTo on page 179). All instructions between the current PC and the desti-
nation are executed. Both code windows provide a context menu entry "Run To Cur-
sor" that advance program execution to the selected code line.
5.5.2.2 Debug.SetNextStatement
Debug.SetNextStatement advances program execution to a particular source code
line or function. The action sets the execution point directly, i.e. all instructions
between the current execution point and the destination location will be skipped (see
Debug.SetNextStatement on page 178)
5.5.2.3 Debug.SetNextPC
Debug.SetNextPC advances program execution to a particular instruction address.
The action sets the execution point directly, i.e. all instructions between the current
execution point and the destination execution point will be skipped.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
119
5.6.1 Reset
The program can be reset via the user action Debug.Reset (see Debug.Reset on
page 176). The action can be executed from the Debug Menu or by pressing F4.
5.6.2 Step
Ozone provides three user actions that step the program in defined ways. The debug-
gers stepping behaviour also depends on whether the Source Viewer or the Disas-
sembly Window is the active code window (see Active Code Window on page 37).
Table 5.7 considers each situation and describes the resulting behaviour.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
120 CHAPTER 5 Debugging with Ozone
5.6.3 Resume
The program can be resumed via the user action Debug.Continue (see page 176).
The action can be executed from the Debug Menu or by pressing the hotkey F5.
5.6.4 Halt
The program can be halted via the user action Debug.Halt (see page 176). The action
can be executed from the Debug Menu or by pressing the hotkey F6.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
121
5.7 Breakpoints
Ozone provides many alternative ways of setting, clearing, enabling and disabling
breakpoints on machine instructions, source code lines, functions and program vari-
ables.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
122 CHAPTER 5 Debugging with Ozone
Address
Memory address that is monitored for IO (access) events.
Address Mask
Specifies which bits of the address are ignored when monitoring access events. By
means of the address mask, a single data breakpoint can be set to monitor accesses
to several individual memory addresses. More precisely, when n bits are set in the
address mask, the data breakpoint monitors 2n many memory addresses.
Symbol
Variable or function parameter whose data location corresponds to the memory
address of the data breakpoint.
On
Indicates if the data breakpoint is enabled or disabled.
Access Type
Type of IO access that is monitored by the data breakpoint (see Access Types on
page 145).
Access Size
Number of bytes that need to be accessed in order to trigger the data breakpoint
(see Memory Access Widths on page 145). As an example, a data breakpoint with
an access size of 4 bytes (word) will only be triggered when a word is written to one
of the monitored memory locations. It will not be triggered when, say, a byte is writ-
ten.
Match Value
Value condition required to trigger the data breakpoint. A data breakpoint will only be
triggered when the match value is written to or read from one of the monitored
memory addresses.
Value Mask
Indicates which bits of the match value are ignored when monitoring access events.
A value mask of 0xFFFFFFFF disables the value condition.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
123
User Actions
Data breakpoints can be manipulated programatically via the user actions
Break.SetOn[X], Break.ClearOn[X], Break.EnableOn[X], Break.DisableOn[X],
Break.EditOn[X], and Break.ClearAllOnData, where [X] stands for either "Data" or
"Symbol" (see Breakpoint Actions on page 158).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
124 CHAPTER 5 Debugging with Ozone
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
125
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
126 CHAPTER 5 Debugging with Ozone
Limitation Description
No register IO Register values are not updated and cannot be edit.
Values within symbol windows are not updated and can-
Freezed symbol windows
not be edited.
No call stack and instruc- The Call Stack- and Instruction Trace Windows do not
tion trace information display content.
Table 5.8. Limitations on program inspection while the program is running
All other features, such as terminal-IO and breakpoint manipulation, remain opera-
tional while the application program is running.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
127
5.11.1.2 Workflow
To get an overview about the program functions in which most CPU time is spend, it
is usually good to start by looking at the Code Profile Window and to sort its func-
tions list according to CPU load:
Filtering Functions
In this example, the program is 99% of its CPU time in the idle loop, which is not rel-
evant for optimizations. To get a clear picture about where the rest of the CPU time is
spend, the idle loop can be filtered from the code profile statistic. This can be done
by selecting function OS_Idle and clicking on the context menu entry "Exclude".
After filtering, the Code Profile Window shows where the application spends the
remaining CPU time. All other functions which affect the CPU load and cannot be opti-
mized any further can be filtered accordingly, to find remaining functions worth opti-
mizing. In this example, a quarter of the remaining CPU time is spend in function
vTraceStoreEvent1. Lets now assume the user wants to optimize the runtime of this
function. By double-clicking on the function it is displayed within the Source Viewer.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
128 CHAPTER 5 Debugging with Ozone
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
129
5.12.1 Functions
Ozones Functions Window displays the functions defined within the application pro-
gram (see Functions Window on page 85). By double-clicking on a function, the
function is displayed within the Source Viewer (see Source Viewer on page 62).
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
130 CHAPTER 5 Debugging with Ozone
5.13.2 SWO
The Terminal Window can capture and display textual data that is sent by the appli-
cation program to the debugger via the MCUs Serial Wire Output (SWO) interface.
SWO is an unidirectional technology; it cannot be used to send data from the debug-
ger to a debugee.
5.13.3 Semihosting
Ozone is able to communicate with the application program via the Semihosting
mechanism. Next to providing bi-directional text I/O via the Terminal Window, the
application program can employ Semihosting to perform advanced operations on the
Host-PC such as reading from files. For a complete discussion on Semihosting, please
refer to the ARM Information Center.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
131
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
132 CHAPTER 5 Debugging with Ozone
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
133
Chapter 6
Scripting Interface
This chapter describes Ozones scripting interface. The scripting interface allows
users to reprogram key operations within Ozone.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
134 CHAPTER 6 Scripting Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
135
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
136 CHAPTER 6 Scripting Interface
6.2.1 DebugStart
When the script function "DebugStart" is present in the project file, the default star-
tup sequence of the debug session is replaced with the operation defined by the
script function.
Flow Chart
Appendix 7.6 provides a graphical flow chart of the startup sequence. Most notably,
the flow chart illustrates at what points during the startup sequence certain event
handler functions are called (see Event Handler Functions on page 134).
Breakpoint Phase
Phase 2 (Breakpoints) of the default startup sequence is always executed implicitly
after the connection to the MCU was established.
/**********************************************************************
*
* DebugStart
*
* Function description
* Custom debug session startup routine that skips phase 5
*
**********************************************************************
*/
void DebugStart (void) {
Exec.Connect();
Exec.Reset();
Exec.Download("c:/examples/keil/stm32f103/blinky.axf");
}
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
137
6.2.2 TargetConnect
When the script function "TargetConnect" is present in the project file, the debug-
gers default MCU connection behavior is replaced with the operation defined by the
script function.
6.2.3 TargetDownload
When the script function "TargetDownload" is present in the project file, the debug-
gers default program download behavior is replaced with the operation defined by
the script function.
/*********************************************************************
*
* TargetDownload
*
* Function description
* Downloads an additional program image to MCU memory
*
**********************************************************************
*/
void TargetDownload (void) {
Util.Log("Downloading Program.");
6.2.4 TargetReset
When the script function "TargetReset" is defined within the project file, the debug-
gers default MCU hardware reset operation is replaced with the operation defined by
the script function.
Problem
The J-Link firmware does not know about the application programs location in MCU
memory and assumes it is located at address 0 (or at address 0xFFFF0000 when high
vectors are enabled). As the application programs reset code (or the initial values of
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
138 CHAPTER 6 Scripting Interface
the PC and SP registers for Cortex-M MCUs) are stored within the first few data bytes
of the application program, the J-Link firmware is not able to reset the program cor-
rectly when it is not downloaded to memory address 0.
Solution
A custom reset routine for RAM debug typically first executes the default J-Link hard-
ware reset routine. This ensures that tasks such as pulling the MCUs reset pin and
halting the processor are performed. Next, a custom reset routine needs to initialize
the PC and SP registers so that the MCU is ready to execute the first program instruc-
tion.
Example
Figure 6.7 displays the typical implementation of a custom hardware reset routine for
RAM debug of an application program. This implementation is included in project files
generated by the Project Wizard, though it is out commented by default.
/*********************************************************************
*
* TargetReset
*
* Function description
* Resets a program downloaded to a Cortex-M MCUs RAM section
*
**********************************************************************
*/
void TargetReset (void) {
unsigned int SP;
unsigned int PC;
unsigned int ProgramAddr;
/* 2. Initialize SP */
SP = Target.ReadU32(ProgramAddr);
Target.SetReg("SP", SP);
/* 3. Initialize PC */
PC = Target.ReadU32(ProgramAddr + 4);
Target.SetReg("PC", PC);
}
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
139
1. The file name denotes the last part of a file path, i.e. "filename.c" for a file path that reads "/p1/p2/filename.c"
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
140 CHAPTER 6 Scripting Interface
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
141
Chapter 7
Appendix
The Appendix contains table and other large objects that did not fit into their respec-
tive chapters.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
142 CHAPTER 7 Appendix
File Name
The file name of the source file (e.g. "main.c") or its complete file path (e.g."c:/
examples/blinky/source/main.c").
Line Number
The line number of the source code location.
Column Number
The column number of the source code location. This parameter can be omitted in
situations where it suffices to specify a source code line.
Thus, any SVG color keyword name is a valid color descriptor. In addition, a color can
be blended manually by specifying three hexadecimal values for the red, green and
blue color components.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
143
Font Family
Ozone supports a wide variety of font families, including common families such as
Arial, Times New Roman and Courier New. When using font descriptors, the family
name must be capitalized correctly.
Point Size
The point size attribute specifies the point size of the font and must be followed by
the measurement unit. Currently, only the measurement unit "pt" is supported.
Font Style
Permitted values for the style attribute are: normal, bold and italic.
Values enclosed by "<>" denote numbers. These numbers are the fields of the ARM
MRC or MCR instruction that is used to read the coprocessor register. For details,
please refer to the ARM architecture reference manual applicable to your MCU.
The first format can be used to specify a CP15 register while the second format can
be used to specify any coprocessor register. The third format is just a more concise
version of the second format.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
144 CHAPTER 7 Appendix
Constant Description
Use this value when the J-Link debug probe is connected to the host-PC
USB
via USB.
Use this value when the J-Link debug probe is connected to the host-PC
IP
via Ethernet.
Table 7.3. Host Interfaces
Constant Description
Use this value when the J-Link debug probe is connected to the MCU via
JTAG
JTAG.
Use this value when the J-Link debug probe is connected to the MCU via
SWD
SWD.
Table 7.4. Target Interfaces
Constant Description
Yes, True, Active, On, Enabled The option is set.
No, Off, False, Inactive, Disabled The option is not set.
Table 7.5. Boolean Values
Constant Description
Displays values in the most appropriate display
DISPLAY_FORMAT_AUTO
format.
DISPLAY_FORMAT_BINARY Displays integer values in binary notation.
DISPLAY_FORMAT_DECIMAL Displays integer values in decimal notiation.
DISPLAY_FORMAT_HEXADECIMAL Displays integer values in hexadecimal notation.
DISPLAY_FORMAT_CHARACTER Displays the text representation of the value.
Table 7.6. Display formats
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
145
Constant Description
AW_AUTO Automatic access.
AW_BYTE Byte access.
AW_HALF_WORD Half word access.
AW_WORD Word access.
Table 7.7. Memory Access Widths
Constant Description
AT_READ_ONLY Read-only access.
AT_WRITE_ONLY Write-only access.
AT_READ_WRITE Read and write access.
AT_NO_ACCESS Access not permitted.
Table 7.8. Access Types
Constant Description
The debugger connects to the MCU and resets it. The
CM_DOWNLOAD_RESET program is downloaded to MCU memory and program
execution is advanced to the main function.
The debugger connects to the MCU and attaches itself to
CM_ATTACH
the executing program.
The debugger connects to the MCU, attaches itself to the
CM_ATTACH_HALT
executing program and halts program execution.
Table 7.9. Connection Modes
Constant Description
RM_RESET_HALT Resets the MCU and halts the program at the reset vector.
Resets the MCU and advances program execution to the
RM_BREAK_AT_SYMOL function specified by system variable
VAR_BREAK_AT_THIS_SYMBOL.
RM_RESET_AND_RUN Reset the MCU and starts executing the program.
Table 7.10. Reset Modes
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
146 CHAPTER 7 Appendix
Constant Description
BP_TYPE_ANY The debugger chooses the implementation type.
The breakpoint is implemented using the MCUs hardware
BP_TYPE_HARD
breakpoint unit.
The breakpoint is implemented by amending the program
BP_TYPE_SOFT
code with particular instructions.
Table 7.11. Breakpoint Implementation Types
Only one trace source can be active at any given time. The J-Link team plans to
remove this constraint in the near future. Please consult the J-Link user manual for
further information about tracing with J-Link or J-Trace debug probes.
Constant Description
Allows stepping operations to
SF_ALLOW_INVISIBLE_BREAKPOINTS enhance stepping performance by
employing invisible breakpoints.
Halts the program when a circular
SF_HALT_AT_CIRCULAR_INSTR_SEQUENCE instruction sequence is detected dur-
ing a stepping operation.
Allows stepping operations to enhance
SF_STEP_OVER_CIRCULAR_INSTR_SEQUENCE stepping performance by stepping over
circular instruction sequences.
Table 7.13. Stepping Flags
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
147
Constant Description
FONT_APP Default application font.
FONT_APP_MONO Default monospace application font.
FONT_ITEM_NAME Symbol name text font.
FONT_ITEM_VALUE Symbol value text font.
FONT_TABLE_HEADER Table header text font.
FONT_SRC_CODE Source code text font.
FONT_ASM_CODE assembly code text font.
FONT_CONSOLE Console Window text font.
FONT_LINE_NUMBERS Line number text font.
FONT_SRC_ASM_CODE Source-inlined assembly code font.
FONT_EXEC_COUNTERS Font used for execution counters.
Table 7.14. Font Identifiers
Constant Description
COLOR_HIGHLIGHT_DARK Dark selection highlight.
COLOR_HIGHLIGHT_LIGHT Light selection highlight.
Change Level 1 background color (See
COLOR_CHANGE_LEVEL_1_BG
Change Level Highlighting on page 36).
Change Level 2 background color (See
COLOR_CHANGE_LEVEL_2_BG
Change Level Highlighting on page 36).
Change Level 3 background color (See
COLOR_CHANGE_LEVEL_3_BG
Change Level Highlighting on page 36).
Change Level 1 foreground color (See
COLOR_CHANGE_LEVEL_1_FG
Change Level Highlighting on page 36).
Change Level 2 foreground color (See
COLOR_CHANGE_LEVEL_2_FG
Change Level Highlighting on page 36).
Change Level 3 foreground color (See
COLOR_CHANGE_LEVEL_3_FG
Change Level Highlighting on page 36).
COLOR_PC_ACTIVE PC Line highlight (active window).
COLOR_PC_INACTIVE PC Line highlight (inactive window).
Color used for highlighting the PC line when
COLOR_PC_BACKTRACE
the instruction trace window is focused.
COLOR_CALL_SITE_ACTIVE Function call site highlight (active window).
COLOR_CALL_SITE_INACTIVE Function call site highlight (inactive window).
COLOR_SIDEBAR_BACKGROUND Sidebar background color.
COLOR_TABLE_GRID_LINES Table grid color.
Syntax color of assembly code register oper-
COLOR_SYNTAX_REGNAME
ands.
COLOR_SYNTAX_LABEL Syntax color of assembly code labels.
COLOR_SYNTAX_MNEMONIC Syntax color of assembly code mnemonics.
COLOR_SYNTAX_IMMEDIATE Syntax color of assembly code immediates.
COLOR_SYNTAX_INTEGER Syntax color of assembly code integer values.
Table 7.15. Color Identifiers
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
148 CHAPTER 7 Appendix
Constant Description
COLOR_SYNTAX_KEYWORD Syntax color of source code keywords.
COLOR_SYNTAX_DIRECTIVE Syntax color of source code directives.
COLOR_SYNTAX_STRING Syntax color of source code strings.
COLOR_SYNTAX_COMMENT Syntax color of source code comments.
COLOR_SYNTAX_TEXT Source code text color.
COLOR_LINE_NUMBERS Color of source code line numbers.
COLOR_LINE_NUMBER_SEPARATOR Color of the line number separator bar.
Console Window script message color
COLOR_LOGGING_SCRIPT
(See Console Window on page 75).
Console Window command feedback message
COLOR_LOGGING_USER
color (See Console Window on page 75).
Console Window error message color
COLOR_LOGGING_ERROR
(See Console Window on page 75).
Console Window J-Link message color
COLOR_LOGGING_JLINK
(See Console Window on page 75).
Color used for drawing a progress bars
COLOR_PROGRESS_BAR_PROGRESS
progress portion.
Color used for drawing a progress bars
COLOR_PROGRESS_BAR_REMAINING
remaining portion.
COLOR_TABLE_ITEM_INACTIVE Text color of inactive table items.
COLOR_EXEC_PROFILE_GOOD_INST Code profile highlighting - good instruction.
COLOR_EXEC_PROFILE_GOOD_INST Code profile highlighting - bad instruction.
COLOR_INLINE_ASM_BACKG Source Viewer - assembly code fill color.
Source Viewer - alternate assembly code fill
COLOR_INLINE_ASM_BACKG_ALT
color.
COLOR_ASM_LABEL_BACKG Disassembly Window - symbol label fill color.
Table 7.15. Color Identifiers
Constant Description
Specifies whether the Source Viewer dis-
PREF_SHOW_LINE_NUMBERS
plays line numbers.
Specifies the Source Viewers line number
frequency. Possible values are: off (0), cur-
PREF_LINE_NUMBER_FREQ
rent line (1), all lines (2), every 5 lines (3)
and every 10 lines (4).
Specifies whether the Source Viewer dis-
PREF_SHOW_EXPANSION_BAR
plays source line expansion indicators.
Specifies whether the Source Viewer dis-
PREF_SHOW_SIDEBAR_SRC
plays its sidebar.
Specifies whether the Disassembly Window
PREF_SHOW_SIDEBAR_ASM
displays its sidebar.
Specifies whether the Source Viewer header
PREF_LOCK_HEADER_BAR
bars auto-hide feature is disabled.
Specifies whether the Disassembly Window
PREF_ASM_SHOW_SOURCE augments assembly code with source code
(see Mixed Mode on page 66).
Specifies whether the Disassembly Window
PREF_ASM_SHOW_LABELS
augments assembly code with symbol labels.
Table 7.16. User Preference Identifiers
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
149
Constant Description
Specifies weather the Source Viewer aligns
PREF_INDENT_INLINE_ASSEMBLY inline assembly code to source code state-
ments.
Specifies whether the Terminal Window out-
PREF_TERMINAL_NO_CONTROL_CHARS
puts printable ascii characters only.
PREF_TAB_SPACING Source Viewer tabulator spacing.
Indicates if a checkbox should be added to
PREF_DIALOG_SHOW_DNSA popup dialogs that allows users to prevent
the dialog from popping up.
Specifies if the most recent project is auto-
PREF_START_WITH_MOST_RECENT_PROJ
matically opened on application start.
Specifies if the class name should be
PREF_PREPEND_FUNC_CLASS_NAMES
prepended to C++ member functions.
Specifies whether values of (u)char-type
PREF_SHOW_CHAR_TEXT
symbols are display as "value (character)".
Specifies whether values of (u)short-type
PREF_SHOW_SHORT_TEXT
symbols are display as "value (character)".
Specifies whether values of (u)int-type sym-
PREF_SHOW_INT_TEXT
bols are display as "value (character)".
Specifies whether values of (u)char*-type
PREF_SHOW_CHAR_PTR_TEXT
symbols are display as "value (text)".
Specifies whether values of (u)short*-type
PREF_SHOW_SHORT_PTR_TEXT
symbols are display as "value (text)".
Specifies whether values of (u)int*-type
PREF_SHOW_INT_PTR_TEXT
symbols are display as "value (text)".
Specifies whether symbol tooltips are
PREF_SHOW_SYMBOL_TOOLTIPS
enabled.
Specifies whether large hexadecimal num-
PREF_SHOW_HEX_BLOCKS bers are divided into two blocks for better
readability.
Table 7.16. User Preference Identifiers
Constant Description
Program reset mode (see Reset Modes on page 145
VAR_RESET_MODE
for permitted values).
Connection mode (see Connection Modes on
VAR_CONNECT_MODE
page 145 for permitted values).
Specifies whether the Terminal Window captures
VAR_SEMIHOSTING_ENABLED Semihosting IO (see Inspecting a Running Program
on page 126).
Specifies whether the Terminal Window captures
VAR_SWO_ENABLED SWO output (see Inspecting a Running Program on
page 126).
Specifies whether the Terminal Window captures
VAR_RTT_ENABLED Real Time Transfer IO (see Inspecting a Running
Program on page 126).
Table 7.17. System Variable Identifiers
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
150 CHAPTER 7 Appendix
Constant Description
Target interface speed (see Project Wizard on
VAR_TIF_SPEED page 23 for details and Frequency Descriptor on
page 142 for permitted values).
Position of the target device on the JTAG scan chain. 0
VAR_TIF_SCAN_CHAIN_POS
is closest to TDO.
Sum of IR-Lens of devices that are positioned closer to
VAR_TIF_SCAN_CHAIN_LEN
TDO on the JTAG scan chain. IRLen of ARM MCUs is 4.
SWO calibration parameter: MCU processor
VAR_SWO_CPU_SPEED frequency (see Frequency Descriptor on page 142
for permitted values).
SWO calibration parameter: data transmission fre-
VAR_SWO_SPEED quency (see Frequency Descriptor on page 142 for
permitted values).
Memory access width (see Memory Access Widths
VAR_ACCESS_WIDTH
on page 145 for permitted values).
Specifies the default breakpoint implementation
VAR_BREAKPOINT_TYPE
type to use when setting breakpoints.
Specifies if a program data should be read-back
VAR_VERIFY_DOWNLOAD from MCU memory and compared to original file
contents to detect download errors.
Specifies the function where program execution
VAR_BREAK_AT_THIS_SYMBOL should be stopped when reset mode "Reset & Break
at Symbol" is used.
Specifies the sampling frequency of expressions
added to the Data Graph Window (see Data Graph
VAR_HSS_SPEED Window on page 103). The allowed value range is 1
Hz to 10 kHz. When set to 0, the maximum fre-
quency supported by the hardware is used.
Selects the trace source to use. See Trace Sources
VAR_TRACE_SOURCE
on page 146 for the list of valid values.
Configures the trace port width in bits. Permitted
VAR_TRACE_PORT_WIDTH
values are 1, 2 and 4.
Configures the sampling delay of trace pin n
VAR_TRACE_PORT_DELAY_n (n=1...4). The valid value range is -5000 to +5000
picoseconds at steps of 50 ns.
Configures the trace port width in bits. Permitted
VAR_TRACE_PORT_WIDTH
values are 1, 2 and 4.
Specifies wether Ozone should initialize the trace
instruction cache when attaching to a program that
already resides in target memory. The trace
VAR_TRACE_INIT_ON_ATTACH
instruction cache is automatically initialized by J-
Link at the moment the program file is down-
loaded.
Table 7.17. System Variable Identifiers
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
151
Parameter Description
--device <device> Selects the target device (for example STM32F407IG).
--if <IF> Assigns the target interface (SWD or JTAG).
--speed <speed> Specifies the target interface speed in kHz.
Assigns the host interface. <hostif> can be set to either
--select <hostif>[=<ID>] USB or IP. The optional parameter <ID> can be set to the
serial number or SP address of the J-Link to connect to.
Sets the host interface to USB and optionally specifies
--usb [<SN>]
the serial number of the J-Link to connect to.
Sets the host interface to IP and specifies the IP address
--ip <IP>
of the J-Link to connect to.
--programfile Sets the program file to open on startup
Specifies the file path of the generated project. If the
--project project already exists, the new settings are applied to it.
If the project does not exist, it is created.
Table 7.18. Projet Generation Command Line Arguments
Parameter Description
Sets Ozones GUI theme. Possible values for <style> are
--style <style> "windows", "cleanlooks", "plastique", "motif" and "macin-
tosh"
When set, Ozone outputs logging information to the
--logfile <filepath>
specified text file.
--loginterval <bytes> The byte interval at which the log file is updated.
--debug Opens a debug console window along with Ozone.
Table 7.19. Appearance and Logging Command Line Arguments
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
152 CHAPTER 7 Appendix
7.4 Expressions
In Ozone, an expression is a term that combines symbol identifiers or numbers via
arithmetic and non-arithmetic operators and that computes to a single value or sym-
bol. Ozone-style expressions are for the most part C-language conformant with cer-
tain limitations as described below.
7.4.2 Operands
The following list gives an overview of valid expression operands:
7.4.3 Operators
The following list gives an overview of valid expression operators:
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
153
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
154 CHAPTER 7 Appendix
Debug.Start
Debug.Connect
BeforeTargetConnect
AfterTargetConnect
Target.Reset
BeforeTargetReset
Reset
AfterTargetReset
Debug.Download
BeforeTargetDownload
Download
AfterTargetDownload
End
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
155
Action Description
File.NewProject Creates a new project.
File.NewProjectWizard Opens the Project Wizard.
File.Open Opens a file.
File.Load Loads a file.
File.Close Closes a source code document.
File.CloseAll Closes all open source code documents.
File.CloseAllButThis Closes all but the active source code document.
File.Find Searches for a text pattern.
File.SaveProjectAs Saves the project file under a new file path.
File.SaveAll Saves all modified files.
File.Exit Closes the application.
Table 7.21. File Actions
Action Description
Edit.JLinkSettings Opens the J-Link Settings Dialog.
Edit.TraceSettings Opens the Trace Settings Dialog.
Edit.TerminalSettings Opens the Terminal Settings Dialog.
Edit.Preferences Opens the User Preference Dialog.
Edit.SysVars Displays the System Variable Editor.
Edit.Preference Edits a user preference.
Edit.SysVar Edits a system variable.
Edit.Color Edits an application color.
Edit.Font Edits an application font.
Edit.DisplayFormat Edits an objects value display format.
Edit.RefreshRate Edits a watched expressions refresh rate.
Edit.Find Displays the Find Dialog.
Table 7.22. Edit Actions
Action Description
Elf.GetBaseAddr Returns the program files download address.
Elf.GetEntryPointPC Returns the initial value of the program counter.
Elf.GetEntryFuncPC Returns the first PC of the programs entry function.
Elf.GetExprValue Evaluates a symbol expression.
Elf.GetEndianess Returns the program files byte order.
Table 7.23. ELF Actions
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
156 CHAPTER 7 Appendix
Action Description
Util.Sleep Pauses the current operation for a given amount of time.
Util.Log Prints a message to the console window.
Table 7.24. Utility Actions
Action Description
View.Data Displays the data location of a program variable.
View.Source Displays the source code location of an object.
View.Disassembly Displays the assembly code of an object.
View.CallGraph Displays the call graph of a function.
View.InstrTrace Displays a position in the instruction execution history.
View.Memory Displays a memory location.
View.Line Displays a text line in the active document.
View.PC Displays the PC instruction in the Disassembly Window.
View.PCLine Displays the PC line in the Source Viewer.
View.NextResult Displays the next search result item.
View.PrevResult Displays the previous search result item.
Table 7.25. View Actions
Action Description
Toolbar.Show Displays a toolbar.
Toolbar.Close Hides a toolbar.
Table 7.26. Toolbar Actions
Action Description
Window.Show Shows a window.
Window.Close Closes a window.
Window.SetDisplayFormat Sets a window's item display format.
Window.Add Adds a symbol to a window.
Window.Remove Removes a symbol from a window.
Window.Clear Clears a window.
Window.ExpandAll Expands all items of a window.
Window.CollapseAll Collapses all items of a window.
Table 7.27. Window Actions
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
157
Action Description
Debug.Start Starts the debug session.
Debug.Stop Stops the debug session.
Debug.Connect Establishes a J-Link connection to the MCU.
Debug.Disconnect Disconnects the J-Link connection to the MCU.
Debug.Download Downloads the program file to the MCU.
Debug.Continue Resumes program execution.
Debug.Halt Halts program execution.
Debug.Reset Reset the program.
Debug.StepInto Steps into the current function.
Debug.StepOver Steps over the current function.
Debug.StepOut Steps out of the current function.
Debug.SetNextPC Sets the next machine instruction to be executed.
Debug.SetNextStatement Sets the next source statement to be executed.
Debug.RunTo Advances program execution to a particular location.
Debug.SetResetMode Sets the reset mode.
Debug.SetConnectMode Sets the connection mode.
Debug.SetSteppingMode Sets the stepping mode.
Debug.ReadIntoTraceCache Initializes the trace cache with target memory data.
Table 7.28. Debug Actions
Action Description
Exec.Connect Establishes a J-Link connection to the MCU.
Exec.Reset Executes a J-Link firmware hardware reset of the MCU.
Exec.Download Downloads a program or a data file to MCU memory.
Exec.Command Executes a J-Link command.
Table 7.29. J-Link Actions
Action Description
Help.About Shows the About Dialog.
Help.Commands Prints the command help to the Console Window.
Help.Manual Displays the user manual.
Table 7.30. Help Actions
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
158 CHAPTER 7 Appendix
Action Description
Target.SetReg Writes a MCU register.
Target.GetReg Reads a MCU register.
Target.WriteU32 Writes a word to MCU memory.
Target.WriteU16 Writes a half word to MCU memory.
Target.WriteU8 Writes a byte to MCU memory.
Target.ReadU32 Reads a word from MCU memory.
Target.ReadU16 Reads a half word from MCU memory.
Target.ReadU8 Reads a byte from MCU memory.
Target.FillMemory Fills a block of MCU memory with a particular value.
Target.SaveMemory Saves a block of MCU memory to a binary data file.
Target.LoadMemory Downloads the contents of a data file to MCU memory.
Target.SetAccessWidth Specifies the memory access width.
Target.SetEndianess Configures the debugger for a particular data endianess.
Table 7.31. Target Actions
Action Description
Break.Set Sets an instruction breakpoint.
Break.SetEx Sets an instruction breakpoint.
Break.Clear Clears an instruction breakpoint.
Break.Enable Enables an instruction breakpoint.
Break.Disable Disables an instruction breakpoint.
Break.SetOnSrc Sets a code breakpoint.
Break.SetOnSrcEx Sets a code breakpoint.
Break.ClearOnSrc Clears a code breakpoint.
Break.EnableOnSrc Enables a code breakpoint.
Break.DisableOnSrc Disables a code breakpoint.
Break.ClearAll Clears all instruction and code breakpoints.
Break.Edit Edits a breakpoints advanced properties.
Break.SetType Sets a breakpoints implementation type.
Break.SetOnData Sets a data breakpoint.
Break.ClearOnData Clears a data breakpoint.
Break.EnableOnData Enables a data breakpoint.
Break.DisableOnData Disables a data breakpoint.
Break.EditOnData Edits a data breakpoint.
Break.SetOnSymbol Sets a data breakpoint on a symbol.
Break.ClearOnSymbol Clears a data breakpoint on a symbol.
Break.EnableOnSymbol Enables a data breakpoint on a symbol.
Break.DisableOnSymbol Disables a data breakpoint on a symbol.
Break.EditOnSymbol Edits a data breakpoint on a symbol.
Break.ClearAllOnData Clears all data breakpoints.
Table 7.32. Breakpoint Actions
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
159
Action Description
Project.SetDevice Specifies the MCUs model name.
Project.AddSvdFile Adds a register set description file.
Project.SetHostIF Specifies the host interface.
Project.SetTargetIF Specifies the target interface.
Project.SetTIFSpeed Specifies the target interface speed.
Project.SetTIFScanChain Specified the JTAG scan chain parameters.
Project.SetTraceSource Selects the trace source to use.
Project.SetTracePortWidth Specifies the number of trace pins comprising the TP.
Project.SetTraceTiming Configures the trace pin sampling delays.
Project.ConfigSWO Configures the Serial Wire Output (SWO) interface.
Project.SetSemihosting Configures the Semihosting IO interface.
Project.SetRTT Configures the Real Time Transfer IO interface.
Project.AddFileAlias Sets a file path alias.
Project.AddPathSubstitute Replaces substrings within source file paths.
Project.AddRootPath Specifies the programs root path.
Project.AddSearchPath Adds a path to the programs list of search paths.
Project.SetOSPlugin Specifies the RTOS-awareness plugin to be used.
Project.SetBPType Sets the allowed breakpoint implementation type.
Project.SetJLinkScript Sets the J-Link-Script to be executed on debug start.
Project.SetJLinkLogFile Sets the text file that receives J-Link logging output.
Project.RelocateSymbols Relocates one or multiple symbols.
Table 7.33. Project Actions
Action Description
Profile.Exclude Filters program entities from the code profile statistic.
Profile.Include Re-adds program entities to the code profile statistic.
Coverage.Exclude Filters program entities from the code coverage statistic.
Coverage.Include Re-adds program entities to the code coverage statistic.
Table 7.34. Code Profile Actions
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
160 CHAPTER 7 Appendix
7.8.1.1 File.NewProject
Creates a new project (see File Menu on page 31)
Prototype
int File.NewProject();
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) New ) New Project (Ctrl+N)
7.8.1.2 File.NewProjectWizard
Opens the Project Wizard (see Project Wizard on page 23).
Prototype
int File.NewProjectWizard();
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) New ) New Project Wizard (Ctrl+Alt+N)
7.8.1.3 File.Open
Opens a file (see File Menu on page 31).
Prototype
int File.Open(const char* FileName);
Argument Meaning
A project-, source- or program- file path. It is possible to specify the
FileName file path relative to any of the directories listed in section Directory
Macros on page 153.
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) Open (Ctrl+O)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
161
7.8.1.4 File.Find
Searches a text pattern in source code documents (see Find Dialog on page 53).
Prototype
int File.Find(const char* FindWhat);
Return Value
-1: error
0: success
GUI Access
Source Viewer ) Context Menu ) Find (Ctrl+F)
7.8.1.5 File.Load
Loads a data file. This essentially performs the same operation as File.Open, but does
not reset the MCU prior to downloading the data contents and does not perform the
initial program operation after the data contents where downloaded.
Prototype
int File.Load(const char* FileName, U32 Address);
Argument Meaning
Path to a program or data file. It is possible to specify the file path rel-
FileName ative to any of the directories listed in section Directory Macros on
page 153.
Memory address to download the data contents to. In case the address
Address
is provided by the file itself, an empty string can be specified.
Return Value
-1: error
0: success
GUI Access
None
7.8.1.6 File.Close
Closes a document (see Source Viewer on page 62).
Prototype
int File.Close(const char* FileName);
Argument Meaning
FileName Fully qualified Path or name of a source file.
Return Value
-1: error
0: success
GUI Access
Document Tab ) Context Menu ) Close (Ctrl+F4)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
162 CHAPTER 7 Appendix
7.8.1.7 File.CloseAll
Closes all open documents (File Menu on page 31).
Prototype
int File.CloseAll();
Return Value
-1: error
0: success
GUI Access
Hotkey (Ctrl+Alt+F4)
7.8.1.8 File.CloseAllButThis
Closes all but the active document (see Source Viewer on page 62).
Prototype
int File.CloseAllButThis();
Return Value
-1: error
0: success
GUI Access
Document Tab ) Context Menu ) Close All But This (Ctrl+Shift+F4)
7.8.1.9 File.SaveProjectAs
Saves the project file under a new file path.
Prototype
int File.SaveProjectAs(const char* FileName);
Argument Meaning
FileName Fully qualified file path that points to a .jdebug file
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) Save Project as (Ctrl+Shift+S)
7.8.1.10 File.SaveAll
Saves all modified files.
Prototype
int File.SaveAll();
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) Save all
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
163
7.8.1.11 File.Exit
Closes the application (see File Menu on page 31).
Prototype
int File.Exit();
Return Value
-1: error
0: success
GUI Access
Main Menu ) File ) Exit (Alt+F4)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
164 CHAPTER 7 Appendix
7.8.2.2 Edit.TraceSettings
Opens the Trace Settings Dialog (see Terminal Settings Dialog on page 59).
Prototype
int Edit.TraceSettings();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Trace-Settings (Ctrl+Alt+T)
7.8.2.3 Edit.TerminalSettings
Opens the Terminal Settings Dialog (see Terminal Settings Dialog on page 59).
Prototype
int Edit.TerminalSettings();
Return Value
-1: error
0: success
GUI Access
Terminal Window ) Context Menu ) Configure (Ctrl+Alt+C)
7.8.2.4 Edit.Preferences
Displays the User Preference Dialog (see User Preference Dialog on page 44).
Prototype
int Edit.Preferences();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Preferences (Ctrl+Alt+P)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
165
7.8.2.5 Edit.SysVars
Displays the System Variable Editor (see System Variable Editor on page 48).
Prototype
int Edit.SysVars();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
7.8.2.6 Edit.Preference
Edits a user preference.
Prototype
int Edit.Preference(int ID, int Value);
Argument Meaning
User preference identifier (See User Preference Identifiers on
ID
page 148).
User preference value. Certain user preferences are specified in a pre-
Value
defined format (See Value Descriptors on page 142).
Return Value
-1: error
0: success
GUI Access
None.
7.8.2.7 Edit.SysVar
Edits a system variable (see System Variable Identifiers on page 149).
Prototype
int Edit.SysVar(int ID, int Value);
Argument Meaning
System variable identifier (See System Variable Identifiers on
ID
page 149).
System variable value. Certain system variables are specified in a pre-
Value
defined format. Please refer to (See Value Descriptors on page 142).
Return Value
-1: error
0: success
GUI Access
None.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
166 CHAPTER 7 Appendix
7.8.2.8 Edit.Color
Edits an application color (see Color Identifiers on page 147).
Prototype
int Edit.Color(int ID, int Value);
Argument Meaning
ID Color identifier (See Color Identifiers on page 147).
Value Color descriptor (See Color Descriptor on page 142).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Preferences ) Appearance
7.8.2.9 Edit.Font
Edits an application font (see Font Identifiers on page 147).
Prototype
int Edit.Font(int ID, const char* Font);
Argument Meaning
ID Font identifier (See Font Identifiers on page 147).
Font Font descriptor (See Font Descriptor on page 143).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Preferences ) Appearance
7.8.2.10 Edit.DisplayFormat
Edits an objects value display format.
Prototype
int Edit.DisplayFormat(const char* sObject, int Format);
Argument Meaning
sObject Name of a debug information window, program variable or register.
Format Value display format (See Value Display Formats on page 144).
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Display As
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
167
7.8.2.11 Edit.RefreshRate
Sets the refresh rate of a watched expression (see Live Watches on page 96).
Prototype
int Edit.RefreshRate (const char* sExpression, int Freqency);
Argument Meaning
sExpression C-Language expression (see Expressions on page 96).
Frequeny Update frequency in Hz (see Frequency Descriptor on page 142).
Return Value
-1: error
0: success
GUI Access
Watched Data Window ) Context Menu ) Refresh Rate
7.8.2.12 Edit.Find
Searches a text pattern in the active document (see Source Viewer on page 62).
Prototype
int Edit.Find(const char* FindWhat);
Return Value
-1: error
0: success
GUI Access
Source Viewer ) Context Menu ) Find (Ctrl+F)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
168 CHAPTER 7 Appendix
7.8.3.1 Window.Show
Shows a window (see Window Layout on page 36).
Prototype
int Window.Show(const char* WindowName);
Argument Meaning
Name of the window (e.g. Source Files). See see View Menu on
WindowName
page 32.
Return Value
-1: error
0: success
GUI Access
Main Menu ) View ) Window Name (Shift+Alt+Letter)
7.8.3.2 Window.Close
Closes a window (See Window Layout on page 36).
Prototype
int Window.Close(const char* WindowName);
Argument Meaning
Name of the window (e.g. Source Files). See View Menu on
WindowName
page 32.
Return Value
-1: error
0: success
GUI Access
Close handle on window title bar (Alt+X)
7.8.3.3 Window.SetDisplayFormat
Sets a windows value display format (see Display Format on page 36).
Prototype
int Window.SetDisplayFormat(const char* WindowName, int Format);
Argument Meaning
WindowName Name of the window (e.g. Source Files). See View Menu on page 32.
Format Value display format (See Value Display Formats on page 144).
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Display All As (Alt+Number)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
169
7.8.3.4 Window.Add
Adds a variable to a window (see Watched Data Window on page 96).
Prototype
int Window.Add(const char* WindowName, const char* VariableName);
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Add (Alt+Plus)
7.8.3.5 Window.Remove
Removes a variable from a window (see Watched Data Window on page 96).
Prototype
int Window.Remove(const char* WindowName, const char* VariableName);
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Remove (Del)
7.8.3.6 Window.Clear
Clears a window.
Prototype
int Edit.TerminalSettings();
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Clear (Alt+Del)
7.8.3.7 Window.ExpandAll
Expands all expandable window items.
Prototype
int Window.ExpandAll();
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Expand All (Shift+Plus)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
170 CHAPTER 7 Appendix
7.8.3.8 Window.CollapseAll
Collapses all collapsible window items.
Prototype
int Window.CollapseAll();
Return Value
-1: error
0: success
GUI Access
Window ) Context Menu ) Clear (Shift+Minus)
7.8.4.1 Toolbar.Show
Displays a toolbar (see Showing and Hiding Toolbars on page 34).
Prototype
int Toolbar.Show(const char* ToolbarName);
Return Value
-1: error
0: success
GUI Access
Main Menu ) View ) Toolbars ) Toolbar Name
7.8.4.2 Toolbar.Close
Hides a toolbar (see Showing and Hiding Toolbars on page 34).
Prototype
int Toolbar.Show(const char* ToolbarName);
Return Value
-1: error
0: success
GUI Access
Main Menu ) View ) Toolbars ) Toolbar Name
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
171
7.8.5.2 View.Source
Displays the source code location of a variable, function or machine instruction within
the Source Viewer (see Source Viewer on page 62).
Prototype
int View.Source(const char* GenValStr);
Return Value
-1: error
0: success
GUI Access
Symbol Windows ) Context Menu ) View Source (Ctrl+U)
7.8.5.3 View.Data
Displays the data location of a global or local program variable within the Register
Window (see Register Window on page 90) or the Memory Window (see Memory
Window on page 87).
Prototype
int View.Data(const char* VariableName);
Return Value
-1: error
0: success
GUI Access
Symbol Windows ) Context Menu ) View Data (Ctrl+T)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
172 CHAPTER 7 Appendix
7.8.5.4 View.Disassembly
Displays the assembly code of a function or source code statement within the Disas-
sembly Window (see Disassembly Window on page 66).
Prototype
int View.Disassembly(const char* GenValStr);
Return Value
-1: error
0: success
GUI Access
Symbol Windows ) Context Menu ) View Disassembly (Ctrl+D)
7.8.5.5 View.CallGraph
Displays the call graph of a function.
Prototype
int View.CallGraph (const char* sFuncName);
Argument Meaning
sFuncName Function name.
Return Value
-1: error
0: success
GUI Access
) Source Viewer ) Context Menu ) View Call Graph (Ctrl+H)
7.8.5.6 View.InstrTrace
Displays a position in the history (stack) of executed machine instructions.
Prototype
int View.InstrTrace (int StackPos);
Argument Meaning
StackPos Position 1 = most recently executed machine instruction
Return Value
-1: error
0: success
GUI Access
) Context Menu ) Goto Position
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
173
7.8.5.7 View.Line
Displays a text line in the active document.
Prototype
int View.Line(unsigned int Line);
Return Value
-1: error
0: success
GUI Access
Source Viewer ) Context Menu ) Goto Line (Ctrl+L)
7.8.5.8 View.PC
Displays the programs execution point within the Disassembly Window (see Disas-
sembly Window on page 66).
Prototype
int View.PC();
Return Value
-1: error
0: success
GUI Access
Disassembly Window ) Context Menu ) Goto PC (Ctrl+P)
7.8.5.9 View.PCLine
Displays the programs execution point within the Source Viewer (see Source
Viewer on page 62).
Prototype
int View.PCLine();
Return Value
-1: error
0: success
GUI Access
Source Viewer ) Context Menu ) Goto PC (Ctrl+P)
7.8.5.10 View.NextResult
Displays the next search result.
Prototype
int View.NextResult();
Return Value
-1: error
0: success
GUI Access
None.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
174 CHAPTER 7 Appendix
7.8.5.11 View.PrevResult
Displays the previous search result.
Prototype
int View.PrevResult();
Return Value
-1: error
0: success
GUI Access
None.
7.8.6.1 Util.Sleep
Pauses the current operation for a given amount of time.
Prototype
int Util.Sleep(int milliseconds);
Return Value
-1: error
0: success
GUI Access
None
7.8.6.2 Util.Log
Prints a message to the Console Window (see Console Window on page 75)
Prototype
int Util.Log(const char* Message);
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
175
7.8.7.2 Debug.Stop
Stops the debug session (see Stopping the Debug Session on page 132).
Prototype
int Debug.Stop();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Stop Debugging (Shift+F5)
7.8.7.3 Debug.Disconnect
Disconnects the debugger from the MCU.
Prototype
int Debug.Disconnect();
Return Value
-1: error
0: success
GUI Access
None
7.8.7.4 Debug.Connect
Establishes a J-Link connection to the MCU and starts the debug session in the
default way. A reprogramming of the startup procedure via script function Target-
Connect is ignored.
Prototype
int Debug.Connect();
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
176 CHAPTER 7 Appendix
7.8.7.5 Debug.SetConnectMode
Sets the connection mode (see Connection Mode on page 116).
Prototype
int Debug.SetConnectMode(int Mode);
Argument Meaning
Mode Connection mode (See Connection Modes on page 145).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
7.8.7.6 Debug.Continue
Resumes program execution (see Resume on page 120).
Prototype
int Debug.Continue();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Continue (F5)
7.8.7.7 Debug.Halt
Halts program execution (see Halt on page 120).
Prototype
int Debug.Halt();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Halt (Ctrl+F5)
7.8.7.8 Debug.Reset
Resets the MCU and the application program (see Reset on page 119). The reset
operation can be customized via the scripting interface (see TargetReset on
page 137).
Prototype
int Debug.Reset();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Reset (F4)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
177
7.8.7.9 Debug.SetResetMode
Sets the reset mode. The reset mode determines how the program is reset (see
Reset Mode on page 119).
Prototype
int Debug.SetResetMode(int Mode);
Argument Meaning
Mode Reset mode (See Reset Modes on page 145).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
7.8.7.10 Debug.StepInto
Steps into the current subroutine (see Step on page 119).
Prototype
int Debug.StepInto();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Step Into (F11)
7.8.7.11 Debug.StepOver
Steps over the current subroutine (see Step on page 119).
Prototype
int Debug.StepOver();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) Step Over (F12)
7.8.7.12 Debug.StepOut
Steps out of the current subroutine. (see Step on page 119).
Prototype
int Debug.StepOut();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Debug ) StepOut (Shift+F11)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
178 CHAPTER 7 Appendix
7.8.7.13 Debug.SetSteppingMode
Sets the program stepping behaviour (see Stepping Behaviour Flags on page 146).
Prototype
int Debug.SetSteppingMode(int Mode);
Argument Meaning
Combination of stepping options (See Stepping Behaviour Flags on
Mode
page 146)
Return Value
-1: error
0: success
GUI Access
None
7.8.7.14 Debug.SetNextPC
Sets the execution point to a particular machine instruction (see Setting the Execu-
tion Point on page 118).
Prototype
int Debug.SetNextPC(unsigned int Address);
Return Value
-1: error
0: success
GUI Access
Disassembly Window ) Context Menu ) Set Next PC (Shift+F10)
7.8.7.15 Debug.SetNextStatement
Sets the execution point to a particular source code line (see Setting the Execution
Point on page 118).
Prototype
int Debug.SetNextStatement(const char* Statement);
Return Value
-1: error
0: success
GUI Access
Source Viewer ) Context Menu ) Set Next Statement (Shift+F10)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
179
7.8.7.16 Debug.RunTo
Advances the program execution point to a particular source code line, function or
instruction address (see Setting the Execution Point on page 118).
Prototype
int Debug.RunTo(const char* sLocation);
Return Value
-1: error
0: success
GUI Access
Code Window ) Context Menu ) Run To Cursor (Ctrl+F10)
7.8.7.17 Debug.Download
Downloads the application program to the MCU (see Program Files on page 115).
The download operation can be reprogrammed (see TargetDownload on page 137).
Prototype
int Debug.Download();
Return Value
-1: error
0: success
GUI Access
None
7.8.7.18 Debug.ReadIntoTraceCache
Initializes the J-Link firmwares trace cache with target memory data (see Initializ-
ing the Trace Cache on page 132).
Prototype
int Debug.ReadIntoTraceCache(U32 Address, U32 Size);
Argument Meaning
Address Start address of target memory block to be read into the trace cache.
Size Byte size of target memory block to be read into the trace cache.
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
180 CHAPTER 7 Appendix
7.8.8.1 Help.About
Shows the About Dialog.
Prototype
int Help.About();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Help ) About
7.8.8.2 Help.Manual
Opens Ozones user manual within the default PDF viewer.
Prototype
int Help.Manual();
Return Value
-1: error
0: success
GUI Access
Main Menu ) Help ) User Manual (F1)
7.8.8.3 Help.Commands
Prints the command help to the Console Window (see Command Help on page 76)
Prototype
int Help.Commands();
Return Value
-1: error
0: success
GUI Access
Console Window ) Context Menu ) Help (Shift+F1)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
181
7.8.9.1 Project.SetDevice
Specifies the model name of the MCU (see J-Link Settings Dialog on page 51).
Prototype
int Project.SetDevice(const char* DeviceName);
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link Settings (Ctrl+Alt+J)
7.8.9.2 Project.SetHostIF
Specifies the host interface (see Host Interfaces on page 144).
Prototype
int Project.SetHostIF(const char* HostIF, const char* HostID);
Argument Meaning
HostIF Host interface (See Host Interfaces on page 144).
HostID Host identifier (USB serial number or IP address).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link Settings (Ctrl+Alt+J)
7.8.9.3 Project.SetTargetIF
Specifies the target interface (see Target Interfaces on page 144).
Prototype
int Project.SetTargetIF(const char* TargetIF);
Argument Meaning
TargetIF Target interface (See Target Interfaces on page 144).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link Settings (Ctrl+Alt+J)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
182 CHAPTER 7 Appendix
7.8.9.4 Project.SetTIFSpeed
Specifies the target interface speed (see J-Link Settings Dialog on page 51).
Prototype
int Project.SetTIFSpeed(const char* Frequency);
Argument Meaning
Frequency Frequency descriptor (See Frequency Descriptor on page 142).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link Settings (Ctrl+Alt+J)
7.8.9.5 Project.SetTIFScanChain
Configures the target interface JTAG scan chain parameters.
Prototype
int Project.SetTIFScanChain(int DRPre, int IRPre);
Argument Meaning
DRPre Position of the MCU in the JTAG scan chain. 0 is closest to TDO.
IRLen Sums of IR-Lens of MCUs closer to TDO. IRLen of ARM devices is 4.
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link Settings (Ctrl+Alt+J)
7.8.9.6 Project.SetBPType
Specifies the default breakpoint implementation type.
Prototype
int Project.SetBPType(int Type);
Argument Meaning
Breakpoint implementation type (see Breakpoint Implementation
type
Types on page 146)
Return Value
-1: error
0: success
GUI Access
Code Window ) Context Menu ) Edit Breakpoint (F8)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
183
7.8.9.7 Project.SetOSPlugin
Specifies the file path or name of the plugin that adds RTOS-awareness to the debug-
ger.
Prototype
int Project.SetOSPlugin(const char* FilePathOrName);
Argument Meaning
File path or name of the plugin that adds RTOS-awareness to
FilePathOrName Ozone. Use argument "embosPlugin" to configure embOS-Aware-
ness and "freeRTOSPlugin" to configure FreeRTOS-awareness.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.8 Project.SetRTT
Configures the Real Time Transfer (RTT) IO interface (see Real Time Transfer on
page 130).
Prototype
int Project.SetRTT(int OnOff);
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
7.8.9.9 Project.SetTraceSource
Selects the trace source to be used.
Prototype
int Project.SetTraceSource(const char* sTraceSrc);
Argument Meaning
Display name of the trace source to be used (see Trace Sources on
sTraceSrc
page 146)
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Trace Settings (Ctrl+Alt+T)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
184 CHAPTER 7 Appendix
7.8.9.10 Project.SetTracePortWidth
Specifies the number of trace pins (data lines) comprising the connected MCUs trace
port. This setting is only relevant when the selected trace source is "Trace Pins" /
ETM (see Project.SetTraceSource on page 183).
Prototype
int Project.SetTracePortWidth(int PortWidth);
Argument Meaning
Number of trace data lines provided by the connected MCU.
PortWidth
Possibly values are 1, 2 or 4.
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Trace Settings (Ctrl+Alt+T)
7.8.9.11 Project.SetTraceTiming
This command adjusts the trace pin sampling delays. The delays may be neccessary
in case the target hardware does not provide sufficient setup and hold times for the
trace pins. In such cases, delaying TCLK can compensate this and make tracing pos-
sibly anyhow. This setting is only relevant when the selected trace source is "Trace
Pins" / ETM (see Project.SetTraceSource on page 183).
Prototype
int Project.SetTraceTiming(int d1, int d2, int d3, int d4);
Argument Meaning
Trace data pin n sampling delay in picoseconds. Only the first parame-
dn
ters are relevant when your hardware has less than 4 trace pins.
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Trace Settings (Ctrl+Alt+T)
7.8.9.12 Project.SetSemihosting
Configures the Semihosting IO interface (see Semihosting on page 130).
Prototype
int Project.SetSemihosting(int OnOff);
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
185
7.8.9.13 Project.ConfigSWO
Configures the Serial Wire Output (SWO) IO interface (see SWO on page 130). This
setting is only relevant when the selected trace source is SWO (see Project.Set-
TraceSource on page 183).
Prototype
int Project.ConfigSWO(const char* SWOFreq, char* CPUFreq);
Argument Meaning
Specifies the data transmission speed on the SWO interface (See Fre-
SWOFreq
quency Descriptor on page 142).
Specifies the MCUs processor frequency (See Frequency Descriptor
CPUFreq
on page 142).
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) Trace Settings (Ctrl+Alt+T)
7.8.9.14 Project.AddSvdFile
Adds a register set description file to be loaded by the Registers Window (see SVD
Files on page 90).
Prototype
int Project.AddSvdFile(const char* FileName);
Argument Meaning
Path to a CMSIS-SVD file. Both .svd and .xml file extensions are sup-
FileName ported. It is possible to specify the file path relative to any of the direc-
tories listed in section Directory Macros on page 153.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.15 Project.AddFileAlias
Adds a file path alias (see File Path Resolution Sequence on page 139).
Prototype
int Project.AddFileAlias(const char* FilePath, const char* AliasPath);
Argument Meaning
FilePath Original file path as it appears within the program file or elsewhere.
AliasPath Replacement for the original file path.
Return Value
-1: error
0: success
GUI Access
Source Files Window ) Context Menu ) Locate File (Space)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
186 CHAPTER 7 Appendix
7.8.9.16 Project.AddRootPath
Adds a root path to the debuggers file path resolution settings (see File Path Reso-
lution on page 139).
Prototype
int Project.SetRootPath(const char* RootPath);
Argument Meaning
RootPath Fully qualified path of a file system directory.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.17 Project.AddPathSubstitute
Replaces a substring within unresolved file path arguments (see File Path Resolu-
tion on page 139).
Prototype
int Project.AddPathSubstitute(const char* SubStr, const char* Alias);
Argument Meaning
SubStr Substring (directory name) within original file paths.
AliasPath Replacement for the given substring.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.18 Project.AddSearchPath
Adds a directory to the list of search directories. Search directories help the debug-
ger resolve invalid file path arguments (see File Path Resolution on page 139).
Prototype
int Project.AddSearchPath(const char* SearchPath);
Argument Meaning
SearchPath Fully qualified path of a file system directory.
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
187
7.8.9.19 Project.SetJLinkScript
Specifies the J-Link script file that is to be executed at the moment the debug session
is started.
Prototype
int Project.SetJLinkScript(const char* FileName);
Argument Meaning
Path to a J-Link script file. It is possible to specify the file path relative
to any of the directories listed in section Directory Macros on
FileName
page 153. Please refer to the J-Link user manual for further infor-
mation on J-Link script files.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.20 Project.SetJLinkLogFile
Specifies the text file that receives J-Link logging output.
Prototype
int Project.SetJLinkLogFile(const char* FileName);
Argument Meaning
Path to a text file. It is possible to specify the file path relative to any of
FileName
the directories listed in section Directory Macros on page 153.
Return Value
-1: error
0: success
GUI Access
None
7.8.9.21 Project.RelocateSymbols
Relocates one or multiple symbols.
Prototype
int Project.RelocateSymbols(const char* sSymbols, int Offset);
Argument Meaning
Specifies the symbols to be relocated. The wildcard character "*"
sSymbols selects all symbols. A symbol name specifies a single symbol. A sec-
tion name such as ".text" specifies a particular ELF data section.
Offset The offset that is added to the base addresses of all specified symbols.
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
188 CHAPTER 7 Appendix
7.8.10.1 Profile.Exclude
Filters program entities from the code profile (load) statistic. The code profile statis-
tic is re-evaluted as if the filtered items had never belonged to the program.
Prototype
int Profile.Exclude (const char* sFilter);
Argument Meaning
Specifies the items to be filtered. All items that exactly match the
filter string are moved to the filtered set. Wildcard (*) characters
FilterStr
can be placed at the front or end of the filter string to perform par-
tial match filtering.
Return Value
-1: error
0: success
GUI Access
Code Profile Window ) Context Menu ) Exclude...
7.8.10.2 Profile.Include
Re-adds filtered items to the code profile load statistic.
Prototype
int Profile.Include (const char* sFilter);
Argument Meaning
Specifies the items to be unfiltered. All items that exactly match
the filter string are removed from the filtered set. Wildcard (*)
FilterStr
characters can be placed at the front or end of the filter string to
perform partial match unfiltering.
Return Value
-1: error
0: success
GUI Access
Code Profile Window ) Context Menu ) Include...
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
189
7.8.10.3 Coverage.Exclude
Filters program entities from the code coverage statistic. The code coverage statistic
is re-evaluted as if the filtered items had never belonged to the program.
Prototype
int Profile.Exclude (const char* sFilter);
Argument Meaning
Specifies the items to be filtered. All items that exactly match the
filter string are moved to the filtered set. Wildcard (*) characters
FilterStr
can be placed at the front or end of the filter string to perform par-
tial match filtering.
Return Value
-1: error
0: success
GUI Access
Code Profile Window ) Context Menu ) Exclude...
7.8.10.4 Coverage.Include
Re-adds filtered items to the code coverage statistic.
Prototype
int Profile.Include (const char* sFilter);
Argument Meaning
Specifies the items to be unfiltered. All items that exactly match
the filter string are removed from the filtered set. Wildcard (*)
FilterStr
characters can be placed at the front or end of the filter string to
perform partial match unfiltering.
Return Value
-1: error
0: success
GUI Access
Code Profile Window ) Context Menu ) Include...
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
190 CHAPTER 7 Appendix
7.8.11.1 Target.SetReg
Writes an MCU register (see MCU Registers on page 125).
Prototype
int Target.SetReg(const char* RegName, unsigned int Value);
Argument Meaning
Name of a core, FPU or coprocessor register (see Coprocessor Register
RegName
Descriptor on page 143).
Value Register Value to write
Return Value
-1: error
0: success
GUI Access
None
7.8.11.2 Target.GetReg
Reads an MCU register (see MCU Registers on page 125).
Prototype
U32 Target.GetReg(const char* RegName);
Argument Meaning
Name of a core, FPU or coprocessor register (see Coprocessor Register
RegName
Descriptor on page 143).
Return Value
-1: error
register value: success
GUI Access
None
7.8.11.3 Target.WriteU32
Writes a word to MCU memory (see MCU Memory on page 125).
Prototype
int Target.WriteU32(U32 Address, U32 Value);
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
191
7.8.11.4 Target.WriteU16
Writes a half word to MCU memory (see MCU Memory on page 125).
Prototype
int Target.WriteU16(U32 Address, U16 Value);
Return Value
-1: error
0: success
GUI Access
None
7.8.11.5 Target.WriteU8
Writes a byte to MCU memory (see MCU Memory on page 125).
Prototype
int Target.WriteU8(U32 Address, U8 Value);
Return Value
-1: error
0: success
GUI Access
None
7.8.11.6 Target.ReadU32
Reads a word from MCU memory (see MCU Memory on page 125).
Prototype
U32 Target.ReadU32(U32 Address);
Return Value
-1: error
Memory Value: success
GUI Access
None
7.8.11.7 Target.ReadU16
Reads a half word from MCU memory (see MCU Memory on page 125).
Prototype
U16 Target.ReadU16(U32 Address);
Return Value
-1: error
Memory Value: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
192 CHAPTER 7 Appendix
7.8.11.8 Target.ReadU8
Reads a byte from MCU memory (see MCU Memory on page 125).
Prototype
U32 Target.ReadU8(U32 Address);
Return Value
-1: error
Memory Value: success
GUI Access
None
7.8.11.9 Target.SetAccessWidth
Specifies the memory access width (see Target.SetAccessWidth on page 192).
Prototype
int Target.SetAccessWidth(U32 AccessWidth);
Argument Meaning
AccessWidth Memory access width (See Memory Access Widths on page 145)
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) System Variables (Ctrl+Alt+V)
7.8.11.10 Target.FillMemory
Fills a block of MCU memory with a particular value (see Target.FillMemory on
page 192).
Prototype
int Target.FillMemory(U32 Address, U32 Size, U8 FillValue);
Argument Meaning
Address Start address of the memory block to fill.
Size Size of the memory block to fill.
FillValue Value to fill the memory block with.
Return Value
-1: error
0: success
GUI Access
Memory Window ) Context Menu ) Fill (Ctrl+F)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
193
7.8.11.11 Target.SaveMemory
Saves a block of MCU memory to a binary data file (see Target.SaveMemory on
page 193).
Prototype
int Target.SaveMemory(const char* FilePath, U32 Address, U32 Size);
Argument Meaning
FilePath Fully qualified path of the destination binary data file (*.bin).
Address Start address of the memory block to save to the destination file.
Size Size of the memory block to save to the destination file.
Return Value
-1: error
0: success
GUI Access
Memory Window ) Context Menu ) Save (Ctrl+E)
7.8.11.12 Target.LoadMemory
Downloads the contents of a binary data file to MCU memory (see Target.LoadMem-
ory on page 193).
Prototype
int Target.LoadMemory(const char* FileName, U32 Address);
Argument Meaning
Path to the binary data file (*.bin). It is possible to specify the file path
FileName relative to any of the directories listed in section Directory Macros on
page 153.
Address Download address.
Return Value
-1: error
0: success
GUI Access
Memory Window ) Context Menu ) Load (Ctrl+L)
7.8.11.13 Target.SetEndianess
Sets the endianess of the selected MCU.
Prototype
int Target.SetEndianess(int BigEndian);
Argument Meaning
BigEndian When 0, little endian is selected. Otherwise, big endian is selected.
Return Value
-1: error
0: success
GUI Access
Main Menu ) Edit ) J-Link-Settings ) Target Device (Ctrl+Alt+J)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
194 CHAPTER 7 Appendix
7.8.12.2 Exec.Reset
Performs a hardware reset of the MCU (see Reset on page 119).
Prototype
int Exec.Reset();
Return Value
-1: error
0: success
GUI Access
None
7.8.12.3 Exec.Download
Downloads the contents of a program or data file to MCU memory (see Downloading
Program Files on page 131).
Prototype
int Exec.Download(const char* FilePath);
Return Value
-1: error
0: success
GUI Access
None
7.8.12.4 Exec.Command
Executes a J-Link command.
Prototype
int Exec.Command(const char* sCommand);
Argument Meaning
J-Link command to execute (please refer to the J-Link user manual for
sCommand
further information).
Return Value
-1: error
0: success
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
195
7.8.13.1 Break.Set
Sets an instruction breakpoint (see Instruction Breakpoints on page 121).
Prototype
int Break.Set(U32 Address);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Set / Clear (Alt+Plus)
7.8.13.2 Break.SetEx
Sets an instruction breakpoint of a particular implementation type (see Instruction
Breakpoints on page 121).
Prototype
int Break.SetEx(U32 Address, int Type);
Argument Meaning
Address Instruction address.
Breakpoint implementation type (see Breakpoint Implementation
Type
Types on page 146).
Return Value
-1: error
0: success
GUI Access
None
7.8.13.3 Break.SetOnSrc
Sets a code breakpoint (see Code Breakpoints on page 121).
Prototype
int Break.SetOnSrc(const char* GenValStr);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Set / Clear (Alt+Plus)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
196 CHAPTER 7 Appendix
7.8.13.4 Break.SetOnSrcEx
Sets a code breakpoint of a particular implementation type (see Code Breakpoints
on page 121).
Prototype
int Break.SetOnSrc(const char* sLocation, int Type);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Set / Clear (Alt+Plus)
7.8.13.5 Break.SetType
Sets a breakpoints implementation type (see Breakpoint Implementation on
page 123).
Prototype
int Break.SetType(const char* sLocation, int Type);
Argument Meaning
Location of the breakpoint as displayed within the first column of the
sLocation
Breakpoint Window (see Breakpoint Window on page 77).
Breakpoint implementation type (see Breakpoint Implementation
Type
Types on page 146).
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Edit (F8)
7.8.13.6 Break.Clear
Clears an instruction breakpoint (see Instruction Breakpoints on page 121).
Prototype
int Break.Clear(U32 Address);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Set / Clear (F9)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
197
7.8.13.7 Break.ClearOnSrc
Clears a code breakpoint (see Code Breakpoints on page 121).
Prototype
int Break.ClearOnSrc(const char* GenValStr);
Parameter Description
Please refer to Break.SetOnSrc on page 195.
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Set / Clear (F9)
7.8.13.8 Break.Enable
Enables an instruction breakpoint (see Instruction Breakpoints on page 121).
Prototype
int Break.Enable(U32 Address);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Enable (Shift+F9)
7.8.13.9 Break.Disable
Disables an instruction breakpoint (see Instruction Breakpoints on page 121).
Prototype
int Break.Disable(U32 Address);
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Disable (Shift+F9)
7.8.13.10 Break.EnableOnSrc
Enables a code breakpoint (see Code Breakpoints on page 121).
Prototype
int Break.EnableOnSrc(const char* GenValStr);
Parameter Description
Please refer to Break.SetOnSrc on page 195.
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Enable (Shift+F9)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
198 CHAPTER 7 Appendix
7.8.13.11 Break.DisableOnSrc
Disables a code breakpoint (see Code Breakpoints on page 121).
Prototype
int Break.DisableOnSrc(const char* GenValStr);
Parameter Description
Please refer to Break.SetOnSrc on page 195.
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Disable (Shift+F9)
7.8.13.12 Break.Edit
Edits a breakpoints advanced properties.
Prototype
int Break.Edit(const char* sLocation, const char* sCondition,
int DoTriggerOnChange, int SkipCount,
const char* sTaskFilter, const char* sConsoleMsg,
const char* sMsgBoxMsg);
Argument Meaning
Location of the breakpoint as displayed within the Breakpoint
sLocation
Window.
C-Expression evaluating to a number or boolean value. The
sCondition expression can include local and global program variable
names as well as their members (f.ex. "pTask->ID == 3").
Indicates weather the condition is met when the expression
value has changed since the last time it was evaluated (DoT-
DoTriggerOnChange
riggerOnChange=1) or when it does not equal zero (DoTrig-
gerOnChange=0).
Indicates how many times the breakpoint is skipped, i.e. how
SkipCount
many times the MCU is resumed when the breakpoint is hit.
The name or ID of the RTOS task that triggers the breakpoint.
When empty, all RTOS tasks trigger the breakpoint. The task
sTaskFilter
filter is only operational when an RTOS plugin was specified
using command Project.SetOSPlugin.
Message printed to the Console Window when the breakpoint
sConsoleMsg
is triggered.
Message displayed in a message box when the breakpoint is
sMsgBoxMsg
triggered.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Edit (F8)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
199
7.8.13.13 Break.SetOnData
Sets a data breakpoint (see Data Breakpoints on page 122).
Prototype
int Break.SetOnData(U32 Address, U32 AddressMask, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Argument Meaning
Address Memory address that is monitored for IO (access) events.
Specifies which bits of the address are ignored when monitoring
access events. By means of the address mask, a single data break-
AddressMask
point can be set to monitor accesses to several individual memory
addresses.
Type of access that is monitored by the data breakpoint (See Con-
AccessType
nection Modes on page 145).
Access size condition required to trigger the data breakpoint. As an
example, a data breakpoint with an access size of 4 bytes (word)
AccessSize will only be triggered when a word is written to one of the moni-
tored memory locations. It will not be triggered when, say, a byte is
written.
Value condition required to trigger the data breakpoint. A data
MatchValue breakpoint will only be triggered when the match value is written to
or read from one of the monitored memory addresses.
Indicates which bits of the match value are ignored when monitor-
ValueMask ing access events. A value mask of 0xFFFFFFFF means that all bits
are ignored, i.e. the value condition is disabled.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Set (Alt+Plus)
7.8.13.14 Break.ClearOnData
Clears a data breakpoint (see Data Breakpoints on page 122).
Prototype
int Break.ClearOnData(U32 Address, U32 AddressMask, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnData on page 199.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Clear (F9)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
200 CHAPTER 7 Appendix
7.8.13.15 Break.ClearAll
Clears all breakpoints (see Data Breakpoints on page 122).
Prototype
int Break.ClearAll();
Return Value
-1: error
0: success
GUI Access
Breakpoint Window ) Context Menu ) Clear All (Alt+Del)
7.8.13.16 Break.ClearAllOnData
Clears all data breakpoints (see Data Breakpoints on page 122).
Prototype
int Break.ClearAllOnData();
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Clear All (Alt+Del)
7.8.13.17 Break.EnableOnData
Enables a data breakpoint (see Data Breakpoints on page 122).
Prototype
int Break.EnableOnData(U32 Address, U32 AddressMask, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnData on page 199.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Enable (Shift+F9)
7.8.13.18 Break.DisableOnData
Disables a data breakpoint (see Data Breakpoints on page 122).
Prototype
int Break.DisableOnData(U32 Address, U32 AddressMask, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnData on page 199.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Disable (Shift+F9)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
201
7.8.13.19 Break.EditOnData
Edits a data breakpoint (see Data Breakpoints on page 122).
Prototype
int Break.EditOnData(U32 Address, U32 AddressMask, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnData on page 199.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Edit (F8)
7.8.13.20 Break.SetOnSymbol
Sets a data breakpoint on a symbol (see Data Breakpoints on page 122).
Prototype
int Break.SetOnSymbol(const char* SymbolName, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Argument Meaning
SymbolName Name of the symbol that is monitored by the data breakpoint.
Type of access that is monitored by the data breakpoint (See Con-
AccessType
nection Modes on page 145).
Access size condition required to trigger the data breakpoint. As an
example, a data breakpoint with an access size of 4 bytes (word)
AccessSize will only be triggered when a word is written to one of the moni-
tored memory locations. It will not be triggered when, say, a byte is
written.
Value condition required to trigger the data breakpoint. A data
MatchValue breakpoint will only be triggered when the match value is written to
or read from one of the monitored memory addresses.
Indicates which bits of the match value are ignored when monitor-
ValueMask ing access events. A value mask of 0xFFFFFFFF means that all bits
are ignored, i.e. the value condition is disabled.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Set (Alt+Plus)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
202 CHAPTER 7 Appendix
7.8.13.21 Break.ClearOnSymbol
Clears a data breakpoint on a symbol (see Data Breakpoints on page 122).
Prototype
int Break.ClearOnSymbol(const char* SymbolName, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnSymbol on page 201.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Clear (F9)
7.8.13.22 Break.EnableOnSymbol
Enables a data breakpoint on a symbol (see Data Breakpoints on page 122).
Prototype
int Break.EnableOnSymbol(const char* SymbolName, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnSymbol on page 201.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Enable (Shift+F9)
7.8.13.23 Break.DisableOnSymbol
Disables a data breakpoint on a symbol (see Data Breakpoints on page 122).
Prototype
int Break.DisableOnSymbol(const char* SymbolName, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnSymbol on page 201.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Disable (Shift+F9)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
203
7.8.13.24 Break.EditOnSymbol
Edits a data breakpoint on a symbol (see Data Breakpoints on page 122).
Prototype
int Break.EditOnSymbol (const char* SymbolName, U8 AccessType,
U8 AccessSize, U32 MatchValue, U32 ValueMask);
Parameter Description
Please refer to Break.SetOnSymbol on page 201.
Return Value
-1: error
0: success
GUI Access
Data Breakpoint Window ) Context Menu ) Edit (F8)
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
204 CHAPTER 7 Appendix
7.8.14.1 Elf.GetBaseAddr
Returns the program files download address.
Prototype
int Elf.GetBaseAddr();
Return Value
Program file download address.
GUI Access
None
7.8.14.2 Elf.GetEntryPointPC
Returns the initial PC of program execution.
Prototype
int Elf.GetEntryPointPC();
Return Value
Initial PC of program execution.
GUI Access
None
7.8.14.3 Elf.GetEntryFuncPC
Return the initial PC of the programs entry (or main) function.
Prototype
int Elf.GetEntryFuncPC();
Return Value
Initial PC of the program entry function.
GUI Access
None
7.8.14.4 Elf.GetExprValue
Evaluates a C-language expression.
Prototype
int Elf.GetExprValue(const char* sExpression);
Return Value
Expression value (0 on error)
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
205
7.8.14.5 Elf.GetEndianess
Returns the program files data encoding scheme.
Prototype
int Elf.GetEndianess(const char* sExpression);
Return Value
0: Little Endian, 1: Big Endian
GUI Access
None
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
206 CHAPTER 7 Appendix
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
207
Index
A E
Access Edit
Type ............................................. 145 Menu .............................................. 31
Width ............................................ 145 Execution Point ..................................118
B F
Breakpoint ........................................ 121 File
Dialog .............................................77 Alias ..............................................132
Manipulation .................................. 121 Menu .............................................. 31
Window ...........................................77 Missing ..........................................131
Types (supported) ............................ 16
C Find
Dialog .............................................. 53
Change Level ......................................29
Font
Code
Descriptor ......................................143
Breakpoint ..................................... 121
Identifiers ......................................147
Windows ..........................................37
Function
Color
Call Sites .......................................124
Descriptor ...................................... 142
Calling Hierachy ..............................124
Identifiers ...................................... 147
Inline Expansion .............................. 85
Connection
Window .......................................... 85
Mode ............................................. 116
State ...............................................35
Command H
Help ................................................76 Hardware
Prompt ............................................75 Reset .............................................137
State .............................................125
D Help
Menu .............................................. 33
Data
Location ........................................ 124
Breakpoint ...................................... 122 I
Breakpoint Dialog .............................49 Instruction
Breakpoint Window ...........................77 Breakpoint .....................................121
Debug Rows .............................................. 66
Controls ........................................ 119 Trace Window .................................. 69
Information Window ..........................36 Interface
Menu ..............................................32 Host ..............................................144
Work Flow ...................................... 112 Target ............................................144
IO
File ................................................ 31
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
208 Index
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
209
Chapter 9
Glossary
This chapter explains the meanings of key terms and abbreviations used throughout
this manual.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
210 CHAPTER 9 Glossary
Big-endian
Memory organization where the least significant byte of a word is at a higher address
than the most significant byte. See Little-endian.
Command Prompt
The console windows command input field.
Debugger
Ozone.
Device
The Microcontroller on which the application program is running.
Halfword
A 16-bit unit of information.
Host
The PC that hosts and executes Ozone.
ID
Identifier.
Joint Test Action Group (JTAG)
The name of the standards group which created the IEEE 1149.1 specification.
Little-endian
Memory organization where the least significant byte of a word is at a lower address
than the most significant byte. See also Big-endian.
MCU
Microcontroller Unit. A small computer on a single integrated circuit containing a pro-
cessor core, memory, and programmable input/output peripherals.
Memory coherency
A memory is coherent if the value read by a data read or instruction fetch is the
value that was most recently written to that location. Obtaining memory coherency is
difficult when there are multiple possible physical locations that are involved, such as
a system that has main memory, a write buffer, and a cache.
J-Link OB
A J-Link debug probe that is integrated into MCU hardware ("on-board").
PC
Program Counter. The program counter is the address of the machine instruction that
is executed next.
Processor Core
The part of a microprocessor that reads instructions from memory and executes
them, including the instruction fetch unit, arithmetic and logic unit, and the register
bank. It excludes optional coprocessors, caches, and the memory management unit.
Program
Application Program that is beeing debugged and that is running on the Target
Device.
Remapping
Changing the address of physical memory or devices after the application has started
executing. This is typically done to make RAM replace ROM once the initialization has
been done.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
211
RTOS
Real Time Operating System.
Target
Same as Device. Sometimes also refered to as "Target Device".
Target Application
Same as Program.
User Action
A particular operation of Ozone that can be triggered via the user interface or pro-
grammatically from a script function.
Window
One of Ozones debug information windows.
Word
A 32-bit unit of information. Contents are taken as being an unsigned integer unless
otherwise stated.
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG
212 CHAPTER 9 Glossary
Ozone User Guide (UM08025) 2013 - 2017 SEGGER Microcontroller GmbH & Co. KG