Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. CodeWarrior is a trademark or registered trademark of Freescale Semiconductor, Inc. in the United States and/or other countries. All other product or service names are the property of their respective owners.
Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.
Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale
Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product
or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and
do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customer's technical experts. Freescale Semiconductor does
not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other
applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use
Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold
Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all
claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of
personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale
Semiconductor was negligent regarding the design or manufacture of the part.
How to Contact Us
Corporate HeadquartersFreescale Semiconductor, Inc.
39 HC(S)08 Full-Chip Simulator Components No Longer
Supported869
List of HC(S)08 FCS Components No Longer Supported . . . . . . . . . . . . . . . . 869
Index871
Microcontrollers Debugger Manual
19
Table of Contents
20
Microcontrollers Debugger Manual
Introduction
Manual Contents
The Microcontrollers Debugger Manual consists of the following books:
Book 1: Debugger engine - defines the HC08 and HC(S)08 common and base features,
their functionality, and a description of the components that are available in the debugger.
• Introduction
• Debugger Interface
• Debugger Components
• Control Points
• Real Time Kernel Awareness
• How To...
• CodeWarrior IDE Integration
• Debugger DDE Capabilities
• Synchronized Debugging Through DA-C IDE
Book 2: HC08 Debugger Connections - defines the connections available for debugging
code written for HC08 CPUs.
• Microcontroller Debugging First Steps
• HC08 Full Chip Simulation
• MON08 Interface Connection
• ICS MON08 Interface Connection
• HC08 P&E Multilink/Cyclone Pro Connection
• HC08 ICS P&E Multilink/Cyclone Pro Connections
• SofTec HC08 Connection
• HC08 FSICEBASE Emulator
Book 3: HCS08 Debugger Connections - defines the connections available for debugging
code written for HCS08 CPUs
• HCS08 Full Chip Simulation
• HCS08 P&E Multilink/Cyclone Pro Connection
• HCS08 Open Source BDM Connection
• HCS08 Serial Monitor Connection
• SofTec HCS08 Connection
Microcontrollers Debugger Manual
21
Manual Contents
Book 4: RS08 Debug Connections
Book 5: ColdFire V1.0 Debug Connections
Book 6: Connection Common Features
Book 7: Commands
Book 8: Environment Variables
Book 9: Debugger Legacy
• HCS08 On-Chip DBG Module
• RS08 Full Chip Simulation
• RS08 P&E Multilink/Cyclone Pro Connection
• RS08 Open Source BDM Connection
• SofTec RS08 Connection
• ColdFire V1 Full Chip Simulation Connection
• ColdFire P&E Multilink/Cyclone Pro Connection
• SofTec ColdFire Connection
• ColdFire On-Chip DBG Module
• Flash Programming
• Debugging Memory Map
• Debugger Engine Commands
• Debugger Engine Environment Variables
• Connection-Specific Environment Variables
• Legacy PEDebug Target Interface
• Legacy Target Interfaces Removed
• HC(S)08 Full-Chip Simulator Components No Longer Supported
22
NOTEThe Flexis series of devices is the 8- to 32-bit connection point on the Freescale
Controller Continuum, where complementary families of HCS08 and ColdFire
V1 microcontrollers share a common set of peripherals and development tools
to deliver migration flexibility.
These devices include the MC9S08QE128, MC9S08QE64, MC9S08QE96,
MCF51QE128, MCF51QE64, and MCF51QE96, which are covered in Book 3
and Book 5 respectively.
Microcontrollers Debugger Manual
Book I - Debugger Engine
Book I Contents
Each section of the Debugger manual includes information to help you become more
familiar with the Debugger, to use all its functions and help you understand how to use the
environment. This book, the Debugger engine, defines the HC(S)08, RS08, and
ColdFire® common and base features and their functionality, and gives a description of
the components that are available in the debugger.
This book is divided into the following chapters:
• This chapter describes the manual and special features of the Debugger.
•The Introduction
•The Debugger Interface
interface environment i.e., menus, toolbars, status bars and drag and drop facilities.
•The Debugger Components
and visualization utility.
•The Control Points
windows.
•The Real Time Kernel Awareness Chapter contains descriptions of the Real Time
concept and related applications.
•The How To...
to use advanced features of the Debugger.
•The CodeWarrior IDE Integration
for use with the CodeWarrior IDE.
•The Debugger DDE Capabilities chapter describes the debugger DDE features.
•The Synchronized Debugging Through DA-C IDE
with the DA-C IDE from RistanCase
Chapter introduces the Debugger concept.
Chapter provides all details about the Debugger user
Chapter contains descriptions of each basic component
Chapter is dedicated to the control points and associated
Chapter provides answers for common questions and describes how
chapter explains how to configure the Debugger
chapter explains the use of tools
Microcontrollers Debugger Manual
23
Book I Contents
24
Microcontrollers Debugger Manual
Introduction
This section is an introduction to the Debugger from Freescale used in 8/16 bit embedded
applications.
Freescale Debugger
The Debugger is a member of the tool family for Embedded Development. It is a
Multipurpose Tool that you can use for various tasks in the embedded system and
industrial control world. Some typical tasks are:
• Simulation and debugging of an embedded application.
• Simulation and debugging of real-time embedded applications.
• Simulation and/or cross-debugging of an embedded application.
• Multi-Language Debugging: Assembly, C and C++
• True-Time Simulation
• User Components creation with the Peripheral Builder
• Simulation of a hardware design (e.g., board, processor, I/O chip).
• Building a target application using an object oriented approach.
• Building a host application controlling a plant using an object oriented approach.
1
Debugger Application
A Debugger Application contains the Debugger Engine and a set of debugger components
bound to the task that the components must perform (for example a simulation and
debugging session). The Debugger Engine is the heart of the system. It monitors and
coordinates the tasks of the components. Each Debugger Component has its own
functionality (e.g., source level debugging, profiling, I/O stimulation).
You can adapt your Debugger application to your specific needs. Integrating or removing
the Debugger Components is very easy. You can add additional Debugger Components
(for example, for simulation of a specific I/O peripheral chip) and integrate them with
your Debugger Application.
You can also open several components of the same type.
Microcontrollers Debugger Manual
25
Introduction
Debugger Features
Debugger Features
• True 32-bit application
• Powerful features for embedded debugging
• Special features for real time embedded debugging
• Powerful features for True Time Simulation
• Various and Same look Target Interfaces
• User Interface
• Versatile and intuitive drag and drop functions between components
• Folding and unfolding of objects like functions, structures, classes
• Graphical editing of user defined objects
• Visualization functions
• Smart interactions with objects
• Extensibility function
• Both Powerful Simulation & Debugger
• Show Me How Tool
• GUI (graphical user interface) version including command line
• Context sensitive help
• Configurable GUI with Tool Bar
• Smooth integration into third party tools
• Supports both Freescale and ELF/DWARF Object File Format and S-Records.
26
Demo Version Limitations on Components
When the Debugger is started in demo mode or with an invalid engine license, then all
components that are protected with FLEXlm are in demo mode. The limitations of all
components are described in their respective chapter.
Microcontrollers Debugger Manual
Debugger Interface
This chapter describes the Debugger Graphical User Interface (GUI). Topics include:
• Introduction
• Application Programs
• Starting the Debugger
• Debugger Main Window
• Component Associated Menus
• Highlights of the User Interface
Introduction
The CodeWarrior™ IDE main window acts as a container for windows of debugger
components. The main window provides a main menu bar, a tool bar, a status bar for
status information, and object information bars for several components.
The Debugger main window allows you to manage the layout of the different component
windows (Window menu of the Debugger application). Component windows are
organized as follows:
• Tiled arrangement - Auto tiled, component windows are automatically resized when
the main window is resized
• Component windows are overlapped
• Component windows that are currently minimized are Debugger Main window
icons.
2
Application Programs
The CodeWarrior IDE installer places executable programs in the prog subdirectory of
the CodeWarrior IDE installation directory. For example, installing the CodeWarrior IDE
software in C:\Program Files\Freescale, locates all program files in the folder
C:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog.
Microcontrollers Debugger Manual
27
Debugger Interface
Starting the Debugger
The following list is an overview of files that the CodeWarrior IDE uses for C/C++
debugging:
• hiwave.exeDebugger executable file
• hibase.dllDebugger main function dll
• elfload.dllDebugger loader dll
• *.wndDebugger component
• *.tgtDebugger target file
• *.cpuDebugger CPU awareness file
Starting the Debugger
This section explains how you can start the debugger from within the CodeWarrior IDE or
from a DOS command line.
Starting from within the IDE
There are two ways to start the debugger from within the IDE, from a Project window
icon, or from the IDE Main Window menu bar.
Starting Debug from the Project Window
To start the debugger from the Project window, click the Debug icon (Figure 2.1), at the
top of the Project window.
Figure 2.1 Project Window Make and Debug Icons
28
Microcontrollers Debugger Manual
Starting Debug from the Main Window Menu Bar
You can also start the debugger from the main menu bar of the CodeWarrior IDE. To start
the debugger from the main menu bar, select Debug from the Project menu:
(Project > Debug.)
Figure 2.2 Main Window Project Menu
Debugger Interface
Starting the Debugger
Debugger Command Line Start
You can start the debugger from a DOS command line. The command syntax is as
follows:
HIWAVE.EXE [<AbsFileName> {-<options>}]
where AbsFileName is the name of the application to load in the debugger. Precede
each option with a dash.
Microcontrollers Debugger Manual
29
Debugger Interface
Starting the Debugger
Command Line Options
DOS command line options are:
-T=<time>: Test mode
The debugger terminates after the specified time (in seconds). The default value is 300
seconds. For example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe -T=10
The above example instructs the debugger to terminate after 10 seconds.
-Target=<targetname>
This option sets the specified connection. For example:
C:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe c:\Program Files\Freescale\CodeWarrior
for Microcontrollers V6.1\demo\hc12\sim\fibo.abs -w
Target=sim
The command in the above example starts the debugger and loads fibo.abs file.
-W: Wait mode
Debugger waits even when a <exeName> is specified.
-
30
-Instance=%currentTargetName
This option defines a build instance name. Once you define a build instance, the debugger
uses same build instance the next time you start the debugger. For example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe
If you attempt to start the debugger again, the existing instance of the debugger is brought
to the foreground.
-Instance=%currentTargetName
-Prod= <fileName>
This option specifies the project directory and/or project file to be used at start-up. For
example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe
-Prod=c:\demoproject\test.pjt
Microcontrollers Debugger Manual
Debugger Interface
Starting the Debugger
-Nodefaults
This prevents the debugger from loading the default layout. For example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe
-nodefaults
-Cmd = <Command>
This option specifies a command to be executed at start-up: -cmd = {command}. For
example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe -cmd="open recorder"
-C <cmdFile>
This option specifies a command file to be executed at start-up. For example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe -c c:\temp\mycommandfile.txt
This option sets an environment variable. This environment variable may be used to
overwrite system environment variables. For example:
c:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\prog\hiwave.exe -EnvOBJPATH=c:\sources\obj
NOTEOptions are not case sensitive.
Order of Commands
Commands specified by options are executed in the following order:
1. Load (activate) the project file (see below). If the project file is not specified,
project.ini is used by default.
2. Load <exeFile> if available and start running unless option |(W) was specified
3. Execute command file <cmdFile> if specified
4. Execute command if specified
5. Start running unless option |(W) was specified
NOTEIn version 6.1 of the debugger, the loaded program starts after all command and
command files are executed.
Microcontrollers Debugger Manual
31
Debugger Interface
Debugger Main Window
NOTEThe function Open in the File menu interprets any file without an .ini
extension as a command file and not a project file.
Example
C:\Program Files\Freescale\CodeWarrior for Microcontrollers
V6.1\PROG\DEMO\TEST.ABS -w -d
Debugger Main Window
Once you start the debugger, the True Time Simulator & Real Time Debugger window
opens in the right side of the IDE Main Window.
Figure 2.3 Debugger Main Window
32
Microcontrollers Debugger Manual
Debugger Main Window Toolbar
The Debugger Main Window toolbar is the default toolbar. Most of the Main Window
menu commands have a related shortcut icon on this toolbar. Figure 2.4
default icon.
Figure 2.4 Debugger Main Window Toolbar
Debugger Interface
Debugger Main Window
identifies each
Ne
w
Open
Save
Cut
y
Cop
A tool tip is available when you point the mouse at an icon.
Debugger Main Window Status Bar
The status bar at the bottom of the Debugger Main Window, shown in Figure 2.5 contains
a context sensitive help line for connection specific information, e.g., number of CPU
cycles for the Simulator connection and execution status.
Figure 2.5 The Debugger Status Bar
Main Window Menu Bar
The Debugger Main Window Menu Bar, shown in Figure 2.6 is associated with the main
function of the debugger application, connection, and selected windows.
Figure 2.6 Debugger Window Menu Bar
t
as
He
P
t
on
p
el
H
un
pi
o
ep
t
R
s
Step over
Step out
em
s
s
A
S
ingle
alt
ep
t
H
s
bly
Reset target
c
p
e
l
NOTEYou can select menu commands by pressing the ALT key to select the menu
bar then press the key corresponding to the underlined letter in the menu
command.
Table 2.1
describes menu entries available in the menu bar.
Microcontrollers Debugger Manual
33
Debugger Interface
Debugger Main Window
Table 2.1 Description of the Main Menu Toolbar Entries
Menu entryDescription
FileContains entries to manage debugger configuration files.
ViewContains entries to configure the toolbar.
RunContains entries to monitor a simulation or debug session.
ConnectionContains entries to select the debugger connection. Once a
connection has been selected, the name of this heading
changes.
ComponentContains entries to select and configure extra component
DataContains entries to select Data component functions.
WindowContains entries to set the component windows.
HelpA standard Windows Help menu.
File Menu
The File menu shown in Figure 2.7 is dedicated to the debugger project.
Figure 2.7 File Menu
window.
34
Microcontrollers Debugger Manual
Table 2.2 describes File Menu entries.
Table 2.2 File Menu Entry Description
Menu EntryDescription
NewCreates a new project.
Load ApplicationLoads an executable file (or debugger connection if nothing is
selected).
Debugger Interface
Debugger Main Window
...\restart.abs
...\await.abs
...
Open ConfigurationOpens the debugger project window. You can load a project file
Save ConfigurationSaves the project file.
Save Project AsOpens the debugger project window to save the project file
ConfigurationOpens the Preferences window to set environment variables for
1.Project.ini
2.Test.ini
3...
ExitQuits the Debugger.
Recent applications list
.PJT or .INI. Additionally you can load an existing .HWC file
corresponding to a debugger configuration file. You can load a
project .INI file containing component names, associated
window positions and parameters, window parameters (fonts,
background colors, etc.), connection name (e.g., Simulator)
and the .ABS application file to load.
under a different path and name, and format (PJT; INI...).
current project.
Recent project file list.
You can shortcut some of these functions by clicking toolbar icons (refer to the Debugger
Main Window Toolbar section).
Microcontrollers Debugger Manual
35
Debugger Interface
Debugger Main Window
Configuration Window
Open the Configuration window by selecting Configuration from the Files menu. With
this window (Figure 2.8
project. New variables are saved in the current project file when you click the OK button.
NOTEThe corresponding menu entry (File > Configuration) is only enabled if a
project file is loaded.
Figure 2.8 Configuration Window - Environment Tab
) it is possible to set up environment variables for the current
36
The Configuration Window - Environment tab contains the following controls:
• A list box containing all available environment variables. You can select a variable
with the mouse or Up/Down buttons.
• Command Line Arguments are displayed in the text box. You can add, delete, or
modify options, and specify a directory with the browse button (...).
• A second list box contains the arguments for all of the environment variables defined
in the corresponding Environment section. Select a variable with the mouse or Up/
Down buttons.
Microcontrollers Debugger Manual
Command Buttons:
• OK: Changes are confirmed and saved in current project file.
• Cancel: Closes dialog box without saving changes.
• Help: Opens the help file.
Figure 2.9 Configuration Window - Load Tab
Debugger Interface
Debugger Main Window
The Configuration Window - Load tab contains the following controls:
• Automatically erase and program into FLASH and EEPROM checkbox.
• A Verify memory image after loading code checkbox, with two radio buttons that let
you define the memory image.
• Run after successful load checkbox.
• A Stop at Function checkbox with a textbox that lets you define the function.
Command Buttons:
OK: Changes are confirmed and saved in current project file.
Cancel: Closes dialog box without saving changes.
Help: Opens the help file.
Microcontrollers Debugger Manual
37
Debugger Interface
Debugger Main Window
View Menu
In the Main Window View menu (Figure 2.10) you can choose to show or hide the toolbar,
status bar, window component titles and headlines (see the Component Windows Object
Info Bar). You can select smaller window borders and customize the toolbar. Table 2.3
describes the View Menu entries.
Figure 2.10 View Menu
Table 2.3 View Menu Description
Menu EntryDescription
ToolbarCheck / uncheck Toolbar if you want to display or hide it.
Status BarCheck / uncheck Status Bar if you want to display or hide it.
38
Hide TileCheck / uncheck Hide Title if you want to hide or display the
Hide HeadlineCheck / uncheck Hide Headline if you want to hide or display the
Small BordersCheck / uncheck Small Border if you want to display or hide
CustomizeOpens the debugger Customize Toolbar window.
window title.
headline.
small window borders.
Customizing the Toolbar
When you select Customize from the View menu, the Customize Toolbar dialog box
appears. You can customize the toolbar of the Debugger, adding and removing component
shortcuts and action shortcuts in this dialog box. You can also insert separators to separate
icons. Almost all functions in View, Run and Window menus are available as shortcut
buttons, as shown in Figure 2.11
.
Microcontrollers Debugger Manual
Figure 2.11 Customize Toolbar Dialog Box
• Select the desired shortcut button in the Available buttons list box and click Add to
install it in the toolbar.
• Select a button in the Toolbar buttons list box and click Remove to remove it from
the toolbar.
Demo Version Limitations
The default toolbar cannot be configured.
Examples of View Menu Options
Figure 2.12 shows a typical component window display.
Debugger Interface
Debugger Main Window
Figure 2.12 Typical Component Window Display
Figure 2.13
Microcontrollers Debugger Manual
shows a component window without a title and headline.
39
Debugger Interface
Debugger Main Window
Figure 2.13 Component Window without Title and Headline
Figure 2.14
border.
Figure 2.14 Component Window without Title and Headline, and with Small Border
Figure 2.15
shows a component window without a title and headline, and with a small
shows a component window without headline and small border
40
Microcontrollers Debugger Manual
Debugger Main Window
Figure 2.15 Component Window without Headline and Small Border
Run Menu
The Main Window Run menu, shown in Figure 2.16 is associated with the debug session.
You can monitor a simulation or debug session from this menu. Run menu entries are
described in Table 2.4.
Figure 2.16 Run Menu
Debugger Interface
Microcontrollers Debugger Manual
41
Debugger Interface
Debugger Main Window
Table 2.4 Run Menu Description
Menu entryDescription
Start/ContinueStarts or continues execution of the loaded application from the
current program counter (PC) until a breakpoint or watchpoint is
reached, runtime error is detected, or user stops the application by
selecting
Shortcut: F5 key
RestartStarts execution of the loaded application from its entry point.
Shortcut: CTRL + Shift + F5 keys
HaltInterrupts and halts a running application. You can examine the state
of each variable in the application, set breakpoints, watchpoints, and
inspect source code.
Shortcut: F6 key
Run > Halt
.
Single StepIf the application is halted, this command performs a single step at the
Step OverSimilar to the Single Step command, but does not step into called
Step OutIf the application is halted inside of a function, this command continues
Assembly
Step
source level. Execution continues until the next source reference is
reached. If the current statement is a procedure call, the debugger
“steps into” that procedure. The Single Step command does not treat
a function call as one statement, therefore it steps into the function.
Shortcut: F11 key
functions. A function call is treated as one statement.
Shortcut: F10 key
execution and then stops at the instruction following the current
function invocation. If no function calls are present, then the Step Out
command is not performed.
Shortcut:
If the application is halted, this command performs a single step at the
assembly level. Execution continues for one CPU instruction from the
point it was halted. This command is similar to the Single Step
command, but executes one machine instruction rather than a high
level language statement.
Shortcut: CTRL + F11 keys
Shift + F11 keys
42
Microcontrollers Debugger Manual
Debugger Interface
Debugger Main Window
Table 2.4 Run Menu Description (
Menu entryDescription
Assembly
Step Over
Assembly
Step Out
Control PointsOpens the Controlpoints Configuration Window that contains tabs that
Similar to the Step Over command, but steps over subroutine call
instructions.
Shortcut: CRTL + F10 keys
If the application is halted inside a function, this command continues
execution and stops on the CPU instruction following the current
function invocation. This command is similar to the Step Out
command, but stops before the assignment of the result from the
function call.
Shortcut:
allow you to control Breakpoints, Watchpoints and Markpoints (refer to
Control Points
You can provide shortcuts for some of these functions using the toolbar. Refer to the
Debugger Main Window Toolbar
You can also set breakpoints and watchpoints from within the Source and Assembly
component windows.
NOTEFor more information about breakpoints and watchpoints, refer to the Control
Points chapter.
continued
)
CTRL + Shift + F11 keys
chapter).
and Customizing the Toolbar sections for details.
Connection Menu
This menu entry (Figure 2.17) appears between the Run and Component menus when no
connection is specified in the PROJECT.INI file and no connection has been set. The
Connection name is replaced by an actual connection name when the connection is set. If
a connection has been set, the number of menu entries is expanded, depending on the
connection. To set the connection, select Component > Set Connection. Refer to the
Component Menu
Figure 2.17 Connection Menu
Table 2.5
describes the Connection Menu entries.
Microcontrollers Debugger Manual
section for details.
43
Debugger Interface
Debugger Main Window
Table 2.5 Connection Menu Common Option Description
Menu EntryDescription
LoadLoads a connection.
ResetResets the current connection.
Loading an Executable File
Use the Connection menu to load a debugger connection:
• Choose Connection > Load
The Load Executable File window shown in Figure 2.18
Load Executable File Window
From the Load Executable File window, set the load options and choose a Simulation
Execution Framework (an .ABS application file).
Figure 2.18 Load Executable File Window
appears.
44
Open Button
Pressing this button loads the application code and symbols.
Microcontrollers Debugger Manual
Debugger Interface
Debugger Main Window
Load Options Buttons
These three buttons allow you to select which part of the executable file to load:
• Load Code Button: Loads the application code only. Loads only the application into
the target system. Use this button if no debugging is needed.
• Load Symbols Button: Loads symbols only. Loads only debugging information.
This button can be used if the code is already loaded into the target system or
programmed into a non-volatile memory device (ROM/FLASH).
• Verify Code Button: Loader loads no data into memory. However, it reads back
current data matching the same areas from the target memory and compares all data
with the data from the selected file.
Open and Load Code Options Area
The checkboxes and buttons of this area of the Load Executable File window offer the
following options:
• A checkbox to Automatically erase and program into FLASH and EEPROM.
• A Verify memory image after loading code checkbox, with two radio buttons that let
you define the memory image.
• Run after successful load checkbox.
• A Stop at Function checkbox with a textbox that lets you define the function.
Command Buttons:
OK: Changes are confirmed and saved in current project file.
Cancel: Closes dialog box without saving changes.
Help: Opens the help file.
Connection Command FileWindow
From the Connection menu, choose Command File to open the Connection Command
File window. Each tab of this window, shown in Figure 2.19
which a command file can be automatically run.
See the Startup Command File
Postload Command File
generated automatically, you can install them when installing a new connection. However,
the Debugger recognizes these command files and executes them. Depending on the
connection used, other command files can be recognized by the Debugger. Refer to the
appropriate connection chapter for command file information and properties.
Microcontrollers Debugger Manual
corresponds to an event on
, Reset Command File, Preload Command File, and
, sections that follow. Although these command files are not
45
Debugger Interface
Debugger Main Window
Figure 2.19 Connection Command File Window
The command file in the edit box is executed when the corresponding event occurs. Click
the Browse button to set the path and name of the command file.
The Enable Command File check box allows you to enable/disable a command file on an
event. By default, all command files are enabled:
• The default Startup command file is STARTUP.CMD
• The default Reset command file is RESET.CMD
• The default Preload command file is PRELOAD.CMD
• The default Postload command file is POSTLOAD.CMD
46
NOTEStartup settings performed in this dialog box are stored for subsequent
debugging sessions in the [Simulator] section of the PROJECT file using the
variable CMDFILE0.
NOTEWhen a CPU is set, the settings performed in this dialog box are stored for
subsequent debugging sessions in the [Simulator XXX] (where XXX is the
processor) section of the PROJECT file using variables CMDFILE0, CMDFILE1 ... CMDFILEn.
Startup Command File
The startup.cmd command file is a Debugger system command file. The Startup
command file executes after you load the connection (the target defined in the project.ini
file or when you select Component > Set Connection).
You can specify the Startup command file full name and status (enable/disable) either
with the CMDFILE STARTUP Command Line command or using the Startup property
tab of the Connection Command File Window
.
Microcontrollers Debugger Manual
Debugger Interface
Debugger Main Window
The default settings enable the STARTUP.CMD file located in the current project directory
as the current Startup command file.
Reset Command File
The reset.cmd command file is a Debugger system command file. The Reset
command file executes after clicking the reset button, selecting Connection Name > Reset
in the menu (Connection Name is the real name of the connection, such as MMDS0508
or SDI) reset.cmd or selecting Command Line command.
Specify the Reset command file full name and status (enable/disable) either with the
CMDFILE RESET Command Line command or using the Reset property tab of the
Connection Command File Window
The default settings enable the RESET.CMD file located in the current project directory as
the current Reset command file.
.
Preload Command File
The preload.cmd command file is a Debugger system command file. The Preload
command file executes before an application loads to the target system through the
connection, or by selecting Connection Name > Load.
Specify the Preload command file full name and status (enable/disable) either with the
CMDFILE PRELOAD Command Line command or using the Preload property tab of the
Connection Command File Window
The default settings enable the PRELOAD.CMD file located in the current project directory
as the current Preload command file.
.
Postload Command File
The postload.cmd command file is a Debugger system command file. Postload
executes after an application loads to the target system through the connection, or by
selecting Connection Name > Load.
Specify the Postload command file full name and status (enable/disable) either with the
CMDFILE POSTLOAD Command Line command or by using the Postload property tab
of the Connection Command File Window
The default settings enable the POSTLOAD.CMD file located in the current project
director as the current Postload command file.
Component Menu
The Component menu is shown in Figure 2.20.
Microcontrollers Debugger Manual
.
47
Debugger Interface
Debugger Main Window
Figure 2.20 Component Menu
Table 2.6 describes the Component Menu entries.
Table 2.6 Component Menu Description
Menu entryDescription
OpenLoads an extra component window that has not been loaded by
Set ConnectionSets the Debugger connection.
FontsOpens a standard Font Selection dialog box, where you can set
Background ColorOpens a standard Color Selection dialog box, where you can
the Debugger at startup. The context-sensitive dialog box
presents a set of different components that are introduced in the
Typical Component Window Display
the font used by Debugger components.
set the background color used by the Debugger component
windows.
section.
NOTEFor a readable display, we recommend using a proportional font (e.g., Courier,
Terminal, etc.).
Select Component > Open to load an extra component window that has not been loaded by
the Debugger at startup. The context-sensitive dialog box presents a set of different
components that are introduced in Debugger Components
.
Select Component > Set Connection and the Set Connection dialog box shown in Figure
2.21 is opened.
48
Microcontrollers Debugger Manual
Figure 2.21 Set Connection Dialog Box
6. Use the Processor list menu to select the desired processor.
7. Use the connection list menu to select the desired connection.
A text panel displays information about the selected connection.
NOTEWhen a connection cannot be loaded, the combo box displays the correct path
for you to install the missing DLL.
Debugger Interface
Debugger Main Window
8. Click OK to load connection in debugger.
NOTEFor more information about which connection to load and how to set/reset a
connection, refer to the other sections of this manual.
Microcontrollers Debugger Manual
49
Debugger Interface
Debugger Main Window
Window Menu
In this menu, shown in Figure 2.22, you can set the component windows general
arrangement. The Submenu Window > Options is shown in Figure 2.23Window > Layout in Figure 2.24
Figure 2.22 Window Menu
Figure 2.23 Window Menu Options SubMenu
Figure 2.24 Window Menu Layout SubMenu
.
and the Submenu
50
Table 2.7 specifies the Window Menu entries.
Microcontrollers Debugger Manual
Table 2.7 Window Menu Description
Menu entryDescription
CascadeOption to arrange all open windows in cascade (so they
overlap).
Debugger Interface
Debugger Main Window
TileOption to display all open windows in tile format (non
Arrange IconsArranges icons at the bottom of windows.
Options - AutosizeComponent windows always fit into the debugger window
Options Component Menu
Layout - Load/StoreOption to Load / Store your arrangements from a .HWL file.
NOTE Autosize and Component Menu are checked by default.
Help Menu
This is the Debugger Main window Help menu (Figure 2.25). Table 2.8 shows menu
entries.
Figure 2.25 Help Menu
overlapping).
whenever you modify the debugger window size.
When a component window is selected, the associated menu is
displayed in the main menu. For example if you select the
Source window, the Source menu is displayed in the main
menu.
Table 2.8 Help Menu Description
Menu entryDescription
Help TopicsChoose Help Topics in the menu for online help or if you need
AboutInformation about the debugger version and copyright, and
Microcontrollers Debugger Manual
specific information about a topic.
license information is displayed.
51
Debugger Interface
Component Associated Menus
About Box
Select Help > About to display the About box. The about box lists directories for the
current project, system information, program information, version number and copyright.
It contains information to send for Registration. You can copy this information and send to
license@freescale.com.
For more information on all components, click on the Extended Information button.
Two hypertext links allow you to send an E-mail for a license request or information, and
open the Freescale internet home page.
Click on OK to close this dialog box.
Component Associated Menus
Various Debugger Component windows are shown in Figure 2.3. Each component
window loaded by default or that you have loaded has two menus. One menu is in the
main menu and the other one is a context menu (also called Associated Context Menu) that
you can open by right-clicking in a window component. Note that before right-clicking,
the component window has to be active.
Component Main Menu
This menu, shown in Figure 2.26 is always between the Component entry and the Window
entry of the Debugger main window toolbar. It contains general entries of the current
active component. You can hide this menu by unchecking Window > Options > Component Menu.
Figure 2.26 Example of Component Main Menu
52
Microcontrollers Debugger Manual
Component Associated Menus
Component Files
Each component is a windows file with a .wnd extension
Component Windows Object Info Bar
The object info bar of the debugger window, as shown in Figure 2.27, provides
information about the selected object.
Figure 2.27 Object Info Bar of Debugger Component Windows
Component Context Menu
The context menu is a dynamic context sensitive menu. It contains entries for additional
facilities available in the current component. Depending on the position of the mouse in
the window and what is being pointed to, context menu entries differ.
Debugger Interface
Figure 2.28 Example of Component Context Menu
For example, if you click the mouse on a breakpoint, menu options allow you to delete,
enable, or disable the breakpoint.
Microcontrollers Debugger Manual
53
Debugger Interface
Highlights of the User Interface
Highlights of the User Interface
This section describes some of the main features of the Debugger user interface.
Activating Services with Drag and Drop
You can activate services by dragging objects from one component window to another.
This is known as drag and drop, an example is shown in Figure 2.29
Figure 2.29 Drag and Drop Example
When the dragged item is not allowed in the destination to which you are dragging the
item, the following cursor symbol is displayed:
Example:
You can activate the display of coverage information on assembler and C statements by
dragging the chosen procedure name from the Coverage component to the Source and
Assembly components (Figure 2.30
).
.
Figure 2.30 Dragging Procedure Name from Coverage to Source Component Window
You can display the memory layout corresponding to the address held in a register by
dragging the address from the Register Component to the Memory Component.
54
Microcontrollers Debugger Manual
Debugger Interface
Highlights of the User Interface
To Drag and Drop an Object
To drag an object from one component window to another:
1. Select the component containing the object you want to drag.
2. Make sure the destination component window where you want to drag the object is
visible.
3. Select the object you want.
4. Press and hold the left mouse button, drag the object into the destination component
window and then release the mouse button.
Drag and Drop Combinations
Dragging and dropping objects is possible between different component windows and are
introduced in each component description section.
See below, the possible combinations of drag and drop between components and
associated actions. When additional components are available, new combinations might
be possible and described in the component’s information manual.
Dragging from Assembly Component Window
Table 2.9 summarizes dragging from the Assembly Component.
Table 2.9 Dragging from the Assembly Component Window
Destination
Component Window
Command LineThe Command Line component appends the address of
MemoryDumps memory starting at the selected instruction PC.
RegisterLoads the destination register with the PC of the selected
SourceSource component scrolls up to the source statements
Microcontrollers Debugger Manual
Action
the “pointed to” instruction to the current command.
The PC location is selected in the memory component.
instruction.
and highlights it.
55
Debugger Interface
Highlights of the User Interface
Dragging from Data Component Window
Table 2.10 summarizes dragging from the Data Component.
Table 2.10 Dragging from the Data Component Window
Destination
Action
Component Window
Command LineDragging the name appends the address range of the
variable to the current command in the Command Line
Window. Dragging the value appends the variable value
to the current command in the Command Line Window.
MemoryDumps memory starting at the address where the
selected variable is located. The memory area where the
variable is located is selected in the memory component.
RegisterDragging the name loads the destination register with the
SourceDragging the name of a global variable in the source
address of the selected variable. Dragging the value
loads the destination register with the value of the
variable.
window displays the module where the variable is defined
and the source text is searched for the first occurrence of
the variable and highlighted.
NOTEIt is not possible to drag an expression defined with the Expression Editor. The
“forbidden” cursor is displayed.
56
Microcontrollers Debugger Manual
Dragging from Source Component Window
Table 2.11 summarizes dragging from the Source Component.
Table 2.11 Dragging from the Source Component Window
Debugger Interface
Highlights of the User Interface
Destination Component
Action
Window
AssemblyDisplays disassembled instructions starting at the first
RegisterLoads the destination register with the PC of the first
MemoryDisplays the memory area corresponding with the high
DataA selection in the Source window is considered an
high level language instruction selected. The assembler
instructions corresponding to the selected high level
language instructions are highlighted in the Assembly
component
instruction selected.
level language source code selected. The memory area
corresponding to the selected instructions are grayed in
the memory component.
expression in the Data window, as if it was entered
through the Expression Editor of the Data component.
(See Data Component
and Expression Editor.)
Microcontrollers Debugger Manual
57
Debugger Interface
Highlights of the User Interface
Dragging from the Memory Component Window
Table 2.12 summarizes dragging from the Memory Component.
Table 2.12 Dragging from the Memory Component Window
Destination
Action
Component Window
AssemblyDisplays disassembled instructions starting at the first
Command LineAppends the selected memory range to the Command
RegisterLoads the destination register with the start address of the
SourceDisplays high level language source code starting at the
address selected. Instructions corresponding to the
selected memory area are highlighted in the Assembly
component.
Line window.
selected memory block.
first address selected. Instructions corresponding to the
selected memory area are grayed in the source
component.
Dragging from Procedure Component Window
Table 2.13 summarizes dragging from the Procedure Component.
Table 2.13 Dragging from the Procedure Component Window
Destination
Component Window
Data > LocalDisplays local variables from the selected procedure in
Action
the data component.
58
SourceDisplays source code of the selected procedure. Current
instruction inside the procedure is highlighted in the
Source component.
AssemblyThe current assembly statement inside the procedure is
highlighted in the Assembly component.
Dragging from Register Component Window
Table 2.14 summarizes dragging from the Register Component Window.
Microcontrollers Debugger Manual
Table 2.14 Dragging from the Register Component Window
Debugger Interface
Highlights of the User Interface
Destination
Action
Component Window
AssemblyAssembly component receives an address range, scrolls
MemoryDumps memory starting at the address stored in the
to the corresponding instruction and highlights it.
selected register. The corresponding address is selected
in the memory component.
Dragging from Module Component Window
Table 2.15 summarizes dragging from the Register Component.
Table 2.15 Dragging from the Module Component Window
Destination
Component Window
Data > GlobalDisplays global variables from the selected module in the
MemoryDumps memory starting at the address of the first global
SourceDisplays source code from selected module.
Action
data component.
variable in the module. The memory area where this
variable is located is selected in the memory component.
Selection Dialog Box
This dialog box is used in the Debugger for opening general components or source files.
You can select the desired item with the arrow keys or mouse and then the OK button to
accept or CANCEL to ignore your choice. The HELP button opens this section in the
Help File.
This dialog box is used for the following selections:
• Set Connection
• Open IO component
• Open Source File
• Open Module
• Individual component window
Microcontrollers Debugger Manual
59
Debugger Interface
Highlights of the User Interface
60
Microcontrollers Debugger Manual
Debugger Components
This chapter explains how the different components of the Debugger work. This chapter
contains the following sections:
• Component Introduction
• Loading Component Windows
• General Debugger Components
• Visualization Utilities
Component Introduction
The Debugger kernel includes various components.
CPU Components
CPU components handle processor-specific properties such as register naming, instruction
decoding (disassembling), and stack tracing. A specific implementation of the CPU
module must be provided for each processor type that is supported in the debugger. The
CPU-related component is not introduced in this section. However, the Register
component, Memory component, and all other Connection-dependent components reflect
this system component. The appropriate CPU component loads automatically when
loading an application or executable file (.ABS file), therefore it is possible to mix
applications for different MCUs. The Debugger automatically detects the MCU type and
loads the appropriate CPU component, if available on your environment.
3
Window Components
The Debugger main window components are small applications loaded into the debugger
framework at run-time. Window components can access all global facilities of the
debugger engine, such as the connection (to communicate with different connections), and
the symbol table. The Debugger window components are implemented as dynamic link
libraries (DLLs) with extension .WND. These components are introduced in this section.
Microcontrollers Debugger Manual
61
Debugger Components
Component Introduction
Connection Components
Different debugger connections are available. For example, you can set a CPU awareness
to simulate your .ABS application files, and also set a background debugger.
Different connections are available to connect the target system (hardware) to the
debugger. For example, the connection may be connected using a Full Chip Simulator, an
Emulator, a ROM monitor, a BDM pod cable, or any other supported device.
NOTEConnection components are introduced in their respective manuals.
Loading Component Windows
In the Debugger Main Window Menu Bar, shown in Figure 3.1, you can use the
Component menu to load all framework components. Each Debugger component you
select appears as a window in the Debugger main window.
Figure 3.1 Debugger Window Menu Bar
62
To open the window that lets you choose one or more components:
1. Choose Component > Open
2. In the Open Window Component window shown in Figure 3.2
component.
NOTETo open more than one component, select multiple components.
Microcontrollers Debugger Manual
, select the desired
Figure 3.2 Open Window Component Window
3. In the Open Window Component window, use the mouse to select a component.
4. Click the OK button to open the selected component.
There are three tabs in the Open Window Component window:
•The Icon tab shows components with large icons.
•The List tab shows components with small icons.
•The Details tab shows components with their description.
Debugger Components
Component Introduction
Demo Version Limitations
The demo version limits the number of components you can open at a time. If you use the
demo version, you can open a maximum of eight components.
Microcontrollers Debugger Manual
63
Debugger Components
General Debugger Components
General Debugger Components
This section describes the various features and usage of the debugger components.
Assembly Component
The Assembly window, shown in Figure 3.3, displays program code in disassembled
form. It has a function very similar to that of the Source component window but on a much
lower abstraction level. Thus it is therefore possible to view, change, monitor and control
the current location of execution in a program.
Figure 3.3 Assembly Window
64
This window contains all on-line disassembled instructions generated by the loaded
application. Each displayed disassembled line in the window can show the following
information: the address, machine code, instruction and absolute address in case of a
branch instruction. By default, the user can see the instruction and absolute address.
If breakpoints have been set in the application, they are marked in the Assembly
component with a special symbol, depending on the kind of breakpoint.
If execution has stopped, the current position is marked in the Assembly component by
highlighting the corresponding instruction.
The Object Info Bar of the component window contains the procedure name, which
contains the currently selected instruction. When a procedure is double clicked in the
Procedure component, the current assembly statement inside this procedure is highlighted
in the Assembly component.
Microcontrollers Debugger Manual
Assembly Menu
The Assembly menu shown in Figure 3.4 contains all functions associated with the
assembly component. Table 3.1
Figure 3.4 Assembly Menu
Table 3.1 Assembly Menu Description
Menu EntryDescription
Debugger Components
General Debugger Components
describes these menu entries.
AddressOpens a dialog box prompting for an address: Show PC.
Display
CodeDisplays machine code in front of each disassembled instruction.
SymbolicDisplays symbolic names of objects.
AddressDisplays the location address at the beginning of each disassembled
FreezeBoth the Assembly and Source components can be frozon. These
In a branch instruction, displays the absolute address at the end of
the disassembled instruction.
or Unsigned Decimal
components usually display the code execution from the current PC.
When you freeze these components, they no longer follow the current
PC but are frozen to their current displays.
Microcontrollers Debugger Manual
65
Debugger Components
General Debugger Components
Setting Breakpoints
Breakpoints can be set, edited and deleted when using the context menu. Right-click on
any statement in the Source component window, then choose Set Breakpoint, Delete
Breakpoint, etc.
NOTEFor information on using breakpoints, see Control Points chapter.
Show PC Dialog Box
If a hexadecimal address is entered in the Show PC dialog box shown in Figure 3.5,
memory contents are interpreted and displayed as assembler instructions starting at the
specified address.
Figure 3.5 Show PC Dialog Box
Associated Context Menu
To open the context menu right-click in the text area of the Assembly component window.
The context menu contains default menu entries for the Assembly component. It also
contains some context dependent menu entries described in Table 3.2
current state of the debugger. Menu contents vary when the DBG module is available.
Figure 3.6 Assembly Context Menu
66
; depending on the
Microcontrollers Debugger Manual
Table 3.2 Assembly Context Menu Description
Menu EntryDescription
Set BreakpointAppears only in the context menu if no breakpoint is set or
disabled on the pointed to instruction. When selected, sets a
permanent breakpoint on this instruction. When program
execution reaches this instruction, the program is halted and the
current program state is displayed in all window components.
Debugger Components
General Debugger Components
Delete BreakpointAppears in context menu if a breakpoint is set or disabled on the
Enable BreakpointAppears only in context menu if a breakpoint is disabled on an
Disable BreakpointAppears in the context menu if a breakpoint is set on an
Run To CursorWhen selected, sets a temporary breakpoint on a specified
Show BreakpointsOpens the Controlpoints Configuration Window Breakpoints
Show LocationWhen selected, highlights the source statement that generated
Set MarkpointWhen selected, enables you to set a markpoint at this location.
Delete MarkpointAppears in the Context Menu only if a markpoint is set at the
specified instruction. When selected, deletes this breakpoint.
instruction. When selected, enables this breakpoint.
instruction. When selected, disables this breakpoint.
instruction and continues execution of the program. Disabling a
permanent breakpoint at this position disables the temporary
breakpoint as well and does not halt the program. Temporary
breakpoints are automatically removed when they are reached.
Tab and displays list of breakpoints defined in the application
(refer to Control Points
the pointed to assembler instruction. The assembler instruction
is also highlighted. The memory range corresponding to this
assembler instruction is also highlighted in the memory
component.
nearest code position (visible with marks). When selected,
disables this markpoint.
).
Show MarkpointsOpens the Controlpoints Configuration Window Markpoints Tab
AddressFor a description of the remaining context menu entries see
Microcontrollers Debugger Manual
and displays list of markpoints defined in the application (refer to
Control Points
Table 3.1
).
.
67
Debugger Components
General Debugger Components
Retrieving Source Statement
• Point to an instruction in the Assembly component window, drag and drop it into the
Source component window. The Source component window scrolls to the source
statement generating this assembly instruction and highlights it.
• Left clicking the mouse and clicking the L key Highlights a code range in the
Assembly component window corresponding to the first line of code selected in the
Source component window where the operation is performed. This line or code range
is also highlighted.
Drag Out
Table 3.3 shows the drag actions possible from the Assembly component.
Table 3.3 Assembly Component Drag Actions
Destination Component
Window
Command LineThe Command Line component appends the address of
MemoryDumps memory starting at the selected instruction PC.
RegisterLoads the destination register with the PC of the
SourceSource component scrolls to the source statements and
Action
the pointed to instruction to the current command.
The PC location is selected in the memory component.
selected instruction.
highlights it.
Drop Into
Table 3.4 shows the drop actions possible in the Assembly component
68
Microcontrollers Debugger Manual
Table 3.4 Drop Into Assembly Component
Debugger Components
General Debugger Components
Source Component
Action
Window
SourceDisplays disassembled instructions starting at the first high
MemoryDisplays disassembled instructions starting at the first
RegisterDisplays disassembled instructions starting at the address
ProcedureThe current assembly statement inside the procedure is
level language instruction selected. The assembler
instructions corresponding to the selected high level
language instructions are highlighted in the Assembly
component
address selected. Instructions corresponding to the
selected memory area are highlighted in the Assembly
component.
stored in the source register. The instruction starting at the
address stored in the register is highlighted.
highlighted in the Assembly component.
Demo Version Limitations
No limitation
Associated Commands
Following commands are associated with the Assembly component:
ATTRIBUTES
, SMEM, SPC.
Command Line Component
The Command Line window shown in Figure 3.7 interprets and executes all Debugger
commands and functions. The command entry always occurs in the last line of the
Command component. Characters can be input or pasted on the edit line.
Figure 3.7 Command Line Window
Microcontrollers Debugger Manual
69
Debugger Components
General Debugger Components
Keying In Commands
You can type Debugger commands after the in> terminal prompt in the Command Line
Component window.
Recalling a Line from the Command Line History
To recall a command in the DOS window use either the up or down arrow, or the F3
function key, to retype the previous command.
Scrolling the Command Component Window Content
Use the left and right arrow keys to move the cursor on the line, the HOME key to move
the cursor to the beginning of the line, or the END key to move the cursor to the end of the
line. To scroll a page, use the PgDn (scroll down a page) or PgUp keys (scroll up a page).
Clearing the Line or a Character of the Command Line
Selected text can be deleted by pressing the left arrow. To clear the current line, press the
ESC key.
Command Interpretation
The component executes the command entered and displays results or error messages, if
any. Ten previous commands can be recalled using the up arrow key to scroll up or the
down arrow key to scroll down. Commands are displayed in blue. Prompts and command
responses are displayed in black. Error messages are displayed in red.
When a command is executed and running from the Command Line component, the
component cannot be closed. In this case, if the Command Line component is closed with
the window close button (X) or with the Close entry of the system menu, the following
message is displayed:
Command Component is busy. Closing will be delayed
The Command Line component is closed as soon as command execution is complete. If
the CLOSE
another Command Line component), the component is closed as soon as command
execution is finished.
command is applied to this Command Line component (for example, from
70
Variable Checking in the Command Line
When specifying a single name as an expression in the command line, this expression is
first checked as a local variable in the current procedure. If not found, it is checked as a
global variable in the current module. If not found, it is checked as a global variable in the
application. If not found, it is checked as a function in the current module. If not found, it
is checked as a function in the application, finally if not found an error is generated.
Microcontrollers Debugger Manual
Closing the Command Line During Execution
When a command is executed from a Command Line component, it cannot be closed. If
the Command Line component is closed with the close button or with the 'Close' entry of
the system menu, the following message is displayed 'Command Component is busy. Closing will be delayed' and the Command component is closed as
soon as command execution is complete. If the 'Close' command is applied to this
Command component, the Command component is closed as soon as command execution
is complete.
Command Menu
Figure 3.8 shows the Command menu, which is identical to the Command Context menu.
Figure 3.8 Command Menu
Clicking Execute File opens a dialog box where you can select a file containing Debugger
commands to be executed. These files generally have a .cmd extension by default.
Selected text in the Command Line window can be copied to the clipboard by:
• Selecting the menu entry Command > Copy.
• Pressing the CTRL + C key.
Debugger Components
General Debugger Components
• Clicking the button in the toolbar.
The Command > Copy menu entry and the button are only enabled if something is
selected in the Command Line window.
The first line of text contained in the clipboard can be pasted where the caret is blinking
(end of current line) by:
• Selecting the menu entry Command > Paste
• Pressing CTRL + V simultaneously.
• Clicking the icon in the toolbar.
Microcontrollers Debugger Manual
71
Debugger Components
General Debugger Components
Cache Size
Select Cache Size in the menu to bring up the Size of the Cache dialog box and set the
cache size in lines for the Command Line window, as shown in Figure 3.9
Figure 3.9 Cache Size Dialog Box
This Cache Size dialog box is the same for the Terminal Component and the TestTerm
Component.
Drag Out
Nothing can be dragged out.
Drop Into
Memory range, address, and value can be dropped into the Command Line Component
window, as described in Table 3.5
items of the current command.
.
. The command line component appends corresponding
Table 3.5 Drop Into Command Component
Source Component
Window
AssemblyThe Command Line component appends the address of the
DataDragging the name appends the address range of the
MemoryAppends the selected memory range to the Command Line
RegisterThe address stored in the pointed to register is appended to
72
Action
pointed to instruction to the current command.
variable to the current command in the Command Line
Window. Dragging the value appends the variable value to
the current command in the Command Line Window.
window.
the current command.
Microcontrollers Debugger Manual
Debugger Components
General Debugger Components
Demo Version Limitations
Only 20 commands can be entered and then command component is closed and it is no
longer possible to open a new one in the same Debugger session.
Command files with more than 20 commands cannot be executed.
Associated Commands
BD, CF, E, HELP, NB, LS, SREC, SAVE.
NOTEFor more details about commands, refer to Debugger Engine Commands.
Coverage Component
The Coverage window, shown in Figure 3.10 contains source modules and procedure
names as well as percentage values representing the proportion of executed code in a
given source module or procedure.
NOTEIn cases of advanced code optimizations (like linker overlapping ROM/code
areas) the coverage output/data is affected. In such a case, it is recommended to
switch linker optimizations.
Figure 3.10 Coverage Window
The Coverage window contains percentage numbers and graphic bars. From this
component, you can split views in the Source window and Assembly window, as shown in
Figure 3.11
that has been executed. Split views are removed when the Coverage window is closed or
by selecting Delete in the split view context menu.
Microcontrollers Debugger Manual
. A red check mark is displayed in front of each source or assembler instruction
73
Debugger Components
General Debugger Components
Figure 3.11 Split Views
Coverage Operations
Click the folded/unfolded icons to unfold/fold the source module and display/hide
the functions defined.
Coverage Menu
The Coverage menu and submenus are shown in Figure 3.12.
Figure 3.12 Coverage Menu
Table 3.6 Coverage Menu Description
Menu EntryDescription
ResetResets all simulator statistic information.
DetailsOpens a split view in the chosen component (Source or Assembly).
GraphicsToggles the graphic bars.
Timer UpdateSwitches the periodic update on/off. If activated, statistics are
updated each second.
Output FileOpens the Output File options.
74
Microcontrollers Debugger Manual
Output File
You can redirect Coverage component results to an output file by selecting Output File >
Save As in the menu or context menu.
Output File Filter
Select Output Filter to display the dialog box shown in Figure 3.13. Select what you want
to display, i.e. modules only, modules and functions, or modules, functions and code lines.
You can also specify a range of coverage to be logged in your file.
Figure 3.13 Output File Filter Dialog Box
Debugger Components
General Debugger Components
Output File Save
The Save As entry opens a Save As dialog box where you can specify the output file name
and location, an example is shown in Listing 3.1
Listing 3.1 Example Output File with Modules and Functions:
94.4 % Application
FULL fibo.c
FULL Fibonacci()
FULL main()
86.0 % startup.c
80.5 % Init()
FULL _Startup()
Microcontrollers Debugger Manual
.
75
Debugger Components
General Debugger Components
Split View Associated Context Menu
The context menu for the split view (Figure 3.14) contains the Delete entry, which is used
to remove the split view.
Figure 3.14 Coverage Split View Associated Context Menu
Drag Out
All displayed items can be dragged into a Source or Assembly component. Destination
component displays marks in front of the executed source or assembler instruction.
Drop Into
Nothing can be dropped into the Coverage Component window.
Demo Version Limitations
Only modules are displayed and the Save function is disabled.
Associated Commands
DETAILS, FILTER, GRAPHICS, OUTPUT, RESET, TUPDATE
DA-C Link Component
The DA-C Link window shown in Figure 3.15 is an interface module between the DA-C
(Development Assistant for C - from RistanCASE GmbH) and the IDE, allowing
synchronized debugging features.
Figure 3.15 DA-C Link Window
76
Microcontrollers Debugger Manual
DA-C Link Operation
When you load the DA-C Link component, communication is established with DA-C (if
open) in order to exchange synchronization information.
The Setup entry of the DA-C Link main menu allows you to define the connection
parameters.
NOTEFor related information refer to the Chapter Synchronized Debugging Through
DA-C IDE.
DA-C Link Menu
Selecting Setup from the DA-C Link menu opens the Connection Specification dialog
box.
Figure 3.16 DA-C Link Menu
Table 3.7 DA-C Link Menu Description
Debugger Components
General Debugger Components
Menu EntryDescription
SetupOpens the Connection Specification dialog box.
Microcontrollers Debugger Manual
77
Debugger Components
General Debugger Components
Connection Specification Dialog Box
In the Connection Specification dialog box you can set the DA-C debugger name.
Figure 3.17 Connection Specification Dialog Box
The DA-C debugger name must be the same as the one selected in the DA-C IDE. Check
the Show Protocol checkbox to display the communication protocol in the Command
component of the Debugger. To validate the settings, click the OK button. A new
connection is established and the Connection Specification is saved in the current
Project.ini file. The HELP button opens the help topic for this dialog box.
NOTEIf problems exist, refer to the Troubleshooting section in the DA-C
documentation.
78
Drag Out
Nothing can be dragged out.
Drop Into
Nothing can be dropped into the DAC Component window.
Demo Version Limitations
None.
Microcontrollers Debugger Manual
Data Component
The Data window shown in Figure 3.18 contains the names, values and types of global or
local variables.
Figure 3.18 Data Window
The Data window shows all variables present in the current source module or procedure.
Changed values are in red.
The Component Windows Object Info Bar
variable. It also contains the module name or procedure name where the displayed
variables are defined, the display mode (automatic, locked, etc.), the display format
(symbolic, hex, bin, etc.), and current scope (global, local or user variables).
Various display formats, such as symbolic representation (depending on variable types),
and hexadecimal, octal, binary, signed and unsigned formats may be selected.
Structures can be expanded to display their member fields and pointers can be traversed to
display data they are pointing to.
Watchpoints can be set in this component. Refer to Control Points
Debugger Components
General Debugger Components
contains the address and size of the selected
chapter.
Data Operations
• Double-click a variable line to edit the value.
• Click the folded/unfolded icons to unfold/fold the structured variable.
• Double-click a blank line: Opens the Expression editor to insert an expression in the
Data Component window.
• Select a variable in the Data component, and left mouse button + R key to set a Read
watchpoint on the selected variable. A green vertical bar is displayed on the left side
of the variables on which a read watchpoint has been defined. If a read access on the
variable is detected during execution, the program is halted and the current program
state is displayed in all window components.
Microcontrollers Debugger Manual
79
Debugger Components
General Debugger Components
• Select a variable in the Data component, and left mouse button + W key to set a
Write watchpoint on the selected variable. A red vertical bar is displayed on the left
side of the variables on which a write watchpoint has been defined. If write access is
detected on the variable during execution, the program is halted and the current
program state is displayed in all window components.
• Select a variable in the Data component, and left mouse button + B key to set a Read/Write watchpoint on the selected variable. A yellow vertical bar is displayed for the
variables on which a read/write watchpoint has been defined. If the variable is
accessed during execution, the program is halted and the current program state is
displayed in all window components.
• Select a variable on which a watchpoint was previously defined in the Data
component, and left mouse button + D key to delete the watchpoint on the selected
variable. The vertical bar previously displayed for the variables is removed.
• Select a variable in the Data component, and left mouse button + S key to set a
watchpoint on the selected variable. The Watchpoints Setting dialog box opens. A
gray vertical bar displays for the variables on which an watchpoint has been defined.
Expression Editor
To add your own expression (in EBNF notation) double-click a blank line in the Data
component window to open the Edit Expression dialog box shown in Figure 3.19
point to a blank line as shown below and right-click to select Add Expression in the
context menu shown in the figure below.
You may enter a logical or numerical expression in the edit box, using the Ansi-C syntax.
In general, this expression is a function of one or several variables from the current Data
component window.
, or
Figure 3.19 Edit Expression Dialog Box
80
Microcontrollers Debugger Manual
Debugger Components
General Debugger Components
Example:
With two variables variable_1, variable_2;
expression entered: (variable_1<<variable_2)+ 0xFF) <= 0x1000 results in a boolean
type.
expression entered: (variable_1>>~variable_2)* 0x1000 results in an integer type.
NOTEIt is not possible to drag an expression defined with the Expression Editor. The
forbidden cursor is displayed.
Expression Command file
The Expression Command file is automatically generated when a new application is
loaded or exiting from the Debugger. User defined expressions are stored in this command
file. The name of the expression command file is the name of the application with a .xpr
extension (.XPR file). When loading a new user application, the debugger executes the
matching expression command file to load the user defined expression into the data
component.
Example: When loadingfibo.abs, the debugger executesFibo.xpr
Data Menu
Figure 3.20 shows the Data component menu, the Zoom submenu is shown in Figure 3.29,
the Scope submenu is shown in Figure 3.21
submenu in Figure 3.24
submenus in Figure 3.29
Figure 3.20 Data Menu
Microcontrollers Debugger Manual
, the Format submenu in Figure 3.22, the Mode
, the Options submenu in Figure 3.26 and the Zoom and Sort
. Table 3.8 describes the Data Menu entries.
81
Debugger Components
General Debugger Components
Table 3.8 Data Menu Entry Description
Menu EntryDescription
ZoomZooms in or out of the selected structure. The member field of
the structure replaces the variable list.
ScopeOpens a variable display submenu.
FormatSymb, Hex (hexadecimal), Oct (octal), Bin (binary), Dec (signed
ModeSwitches between Automatic, Periodical, Locked, and Frozen
OptionsOpens an options menu for data, for example, Pointer as Array
Scope Submenu
The Scope Submenu is activated by highlighting the Scope entry on the Data menu:
Figure 3.21 Scope Submenu
Table 3.9
Table 3.9 Scope Submenu Entries
describes the Scope submenu entries.
Menu EntryDescription
GlobalSwitches to Global variable display in the Data component.
LocalSwitches to Local variable display in the Data component.
decimal), UDec (unsigned decimal) display format.
update mode.
facility.
82
UserSwitches to User variable display in the Data component.
Displays user defined expression (variables are erased).
NOTEIf the data component mode is not automatic, entries are grayed (because it is
not allowed to change the scope).
Microcontrollers Debugger Manual
In Local Scope, if the Data component is in Locked or Periodical mode, values of the
displayed local variables may be invalid (since these variables are no longer defined in the
stack).
Format Submenu
The Format Submenu is activated by highlighting the format entry on the Data menu:
Figure 3.22 Format Submenu
Table 3.10 describes the Format submenu entries.
Table 3.10 Format Submenu Entries
Menu EntryDescription
SelectedApplies changes to the selection only
AllApplies changes to all items
Debugger Components
General Debugger Components
Format Selected and All Sub Menu
The Format Selected and All submenu is activated by highlighting this entry on the Data
Component menu:
Figure 3.23 Format Selected and All Submenus
Table 3.11
Microcontrollers Debugger Manual
describes the Format Selected Mode and Format All Mode Submenu entries.
83
Debugger Components
General Debugger Components
Table 3.11 Format Selected and All Submenu
Menu entryDescription
SymbolicSelect the Symbolic (display format depends on the variable
type) display format. This is the default display.
HexSelect the hexadecimal data display format
BinSelect the binary data display format
OctSelect the octal data display format
DecSelect the signed decimal data display format
UDecSelect the unsigned decimal data display format
Bit ReverseSelect the bit reverse data display format (each bit is reversed).
Mode Submenu
The Mode Submenu is activated by highlighting the Mode entry on the Data menu:
Figure 3.24 Mode Submenu
Table 3.12 describes the Mode submenu entries.
Table 3.12 Mode Submenu
Menu EntryDescription
AutomaticSwitches to Automatic mode (default); variables are updated
PeriodicalSwitches to Periodical mode; variables are updated at regular
84
when the connection is stopped. Variables from the currently
executed module or procedure are displayed in the data
component.
time intervals when the connection is running. The default
update rate is 1 second, but can be modified by steps of up to
100 ms using the associated dialog box (see below).
Microcontrollers Debugger Manual
Debugger Components
General Debugger Components
Table 3.12 Mode Submenu (
Menu EntryDescription
LockedSwitches to Locked mode; value from variables displayed in the
FrozenSwitches to Frozen mode; value from variables displayed in the
NOTEIn Locked and Frozen mode, variables from a specific module are displayed in
continued
the data component. The same variables are always displayed in the data
component.
Update Rate Dialog Box
The Update Rate dialog box shown in Figure 3.25 allows you to modify the default update
rate using steps of 100 ms.
Figure 3.25 Update Rate Dialog Box
)
data component are updated when the connection is stopped.
data component are not updated when the connection is
stopped.
Options Submenu
The Options submenu is activated by highlighting the Options entry on the Data menu:
Figure 3.26 Options Submenu
Microcontrollers Debugger Manual
85
Debugger Components
General Debugger Components
Pointer as Array Option
In the Data menu’s Options submenu, choose Options > Pointer as Array to open the
dialog box shown in Figure 3.27
Figure 3.27 Pointer as Array Dialog Box
Within this dialog box, you can display pointers as arrays, assuming that the pointer points
to the first item (pointer[0]). Note that this setup is valid for all pointers displayed in the
Data window. Check the Display Pointer as Array checkbox and set the number of items
that you want to be displayed as array items.
Name Width Option
In the Data Menu’s Options submenu, choose Options > Name Width to open the dialog
box shown in Figure 3.28
Figure 3.28 Edit Name Width Dialog Box
.
.
This dialog box allows you to adjust the width of the variable name displayed in the Data
window. This string is cut off if longer than 16 characters. Thus, by enlarging the value
you can adapt the window to longer names.
Zoom and Sort Submenus
Figure 3.29 Zoom and Sort Submenus
86
Microcontrollers Debugger Manual
Associated Context Menu
This section describes the context menus associated with each debug component. Menu
contents vary when the DBG module is available.
Figure 3.30 Data Context Menu
Debugger Components
General Debugger Components
Table 3.13
describes the Data Context Menu entries.
Table 3.13 Data Context Menu
Menu EntryDescription
Open ModuleOpens the Open Module dialog box.
Set
Watchpoint
Delete
Watchpoint
Enable
Watchpoint
Disable
Breakpoint
Appears only in the context menu if no watchpoint is set or disabled on
the pointed to variable. When selected, sets a read/write watchpoint on
this variable. A yellow vertical bar is displayed for the variables on
which a read/write watchpoint has been defined. If the variable is
accessed during execution, the program is halted and the current
program state is displayed in all window components.
Appears only in the context menu if a watchpoint is set or disabled on
the pointed to variable. When selected, deletes this watchpoint.
Appears only in the context menu if a watchpoint is disabled on the
pointed to variable. When selected, enables this watchpoint.
Appears only in the context menu if a breakpoint is set on the pointed to
instruction. When selected, disables this watchpoint.
Microcontrollers Debugger Manual
87
Debugger Components
General Debugger Components
Table 3.13 Data Context Menu (
continued
Menu EntryDescription
Show
Watchpoints
Show
location
Opens the Watchpoints Setting dialog box and allows you to view the
list of watchpoints defined in the application. (Refer to Control Points
Forces all open components to display information about the pointed to
variable (e.g., the Memory component selects the memory range where
the variable is located).
SUBMENU Open Module
The dialog box shown in Figure 3.31 lists all source files bound to the application. Global
variables from the selected module are displayed in the data component. This is only
supported when the component is in Global scope mode.
Figure 3.31 Open Modules Dialog Box
)
.)
Drag Out
Table 3.14 describes the drag actions possible from the Data component.
Table 3.14 Dragging Data Possibilities
Destination
Component Window
Command LineDragging the name appends the address of the variable to
MemoryDumps memory starting at the address where the selected
88
Action
the current command in the Command Line Window.
Dragging the value appends the variable value to the
current command in the Command Line Window.
variable is located. The memory area where the variable is
located is selected in the memory component.
Microcontrollers Debugger Manual
Debugger Components
General Debugger Components
Table 3.14 Dragging Data Possibilities (
Destination
Component Window
SourceDragging the name of a global variable in the source
RegisterDragging the name loads the destination register with the
NOTEIt is important to distinguish between dragging a variable name and dragging a
variable value. Both operations are possible. Dragging the name drags the
address of the variable. Dragging the variable value drags the value.
NOTEExpressions are evaluated at run time. They do not have a location address, so
you cannot drag an expression name into another component. Values of
expressions can be dragged to other components.
Drop Into
Table 3.15 describes the drop actions possible in the Data component.
continued
)
Action
Window displays the module where the variable is defined
and highlights the first occurrence of the variable.
address of the selected variable. Dragging the value loads
the destination register with the value of the variable.
Table 3.15 Data Drop Possibilities
Source Component
Window
SourceA selection in the Source window is considered an
ModuleDisplays the global variables from the selected module in
Demo Version Limitations
Only two variables can be displayed.
Only two members of a structure are visible when unfolded.
Only one expression can be defined.
Microcontrollers Debugger Manual
Action
expression in the Data window, as if it was entered through
the Expression Editor of the Data component. Refer to Data
The Memory window shown in Figure 3.32 displays unstructured memory content or
memory dump, that is continuous memory words without distinction between variables.
Figure 3.32 Memory Window
Various data formats (byte, word, double) and data displays (hexadecimal, binary, octal,
decimal, unsigned decimal) can be specified for display and editing of memory content.
Watchpoints can be defined in this component.
90
NOTE Refer to Control Points for more information about watchpoints.
Memory areas can be initialized with a fill pattern using the Fill Memory box.
An ASCII dump can be added/removed on the right side of the numerical dump when
checking/unchecking ASCII in the Display menu entry.
The location address may also be added/removed on the left side of the numerical dump
when checking/unchecking Address in the Display menu entry.
To specify the start address for the memory dump use the Address menu entry.
The Component Windows Object Info Bar
structure field and memory range matching the first selected memory word.
"uu" memory value means: not initialized.
"pp" memory value means: protected from being read, or protected from being read and
written.
"rr" memory value means: not accessible because the hardware is running.
"--" memory values mean: not configured (no memory available)
contains the procedure or variable name,
Microcontrollers Debugger Manual
General Debugger Components
NOTEMemory values that have changed since the last refresh status are displayed in
red. However, if a memory item is edited or rewritten with the same value, the
display for this memory item remains black.
Memory Address Spaces
Some devices might have one or more additional address spaces, and the Memory window
can display the different address spaces when selecting the Address Space menu entry.
When several address spaces are available, address numbers on the left side of the window
‘
are extended with the “
TIPHCS08 devices with Memory Management Unit (MMU) have two address spaces.
The Paged address space covers regular, that is, physical/local and logical displays
(see Banked/Window Paged Memory: Physical/Local vs. Logical display for
further details). The Flash address space covers the Extended Address range
(covering the Flash memory as one single linear range), as accessed by the Linear
Address Space Pointer of the chip MMU.
Figure 3.33 HCS08 device with MMU Address Space selection
” sign and the space letter, to avoid confusion.
Debugger Components
Microcontrollers Debugger Manual
91
Debugger Components
General Debugger Components
Banked/Window Paged Memory: Physical/Local
vs. Logical display
This section applies only to devices having on-chip program pages or data pages. For
Legacy reasons, the debugger provides two ways to display the banked/window paged
memory, such as the PPAGE window $8000-$BFFF range with HCS08 devices with onchip MMU, or EEPROM windows bit selectable:
• The default display is called the physical display in the Debugging Memory Map
(DMM) interface. It is sometimes called the local display in device specifications
and matches exactly what the CPU “sees” for silicon memory. This means that what
is displayed in the Memory window at a specific suspended time (debugger halted)
matches the current setup of Page registers (like PPAGE) or selection bit like
EPGSEL for EEPROM, etc. Changing the page registers or selection bit and then
refreshing the Memory window immediately shows changes in the window range.
• The logical display gives a constant Memory view at a specific address. For example,
if we define, in a window address range, the concatenation of PPAGE<<16 added
with the physical/local address, we obtain a 24-bit address that does not represent
anything for the CPU, but that is directly readable by the user in the Memory
window.
By default, for 8/16-bit devices, the debugger displays memory addresses above address
0xFFFF as logical. These addresses do not represent actual addresses anymore, but are
still required by the debugger to synchronize the program flow display and data accesses
within all windows.
The debugger defines page range accessibility in the DMM interface. Also, for 8/16-bit
devices, in the physical/local $0000-$FFFF, the window ranges can be also defined as
logical in the DMM interface, to make them constant at display. For example, the range
$8000-$BFFF program window can be changed from physical to paged (also EEPROM paged for paged EEPROM) in the DMM graphical user interface, and the debugger no
longer displays what the CPU “sees”, but always displays PPAGE $00 when looking at
addresses in the $008000-$00BFFF range.
The debugger provides by default a mixed display, that can be quickly changed when
editing the module setup in the DMM interface. Refer to Debugging Memory Map
further details.
for
92
Memory Operations
• Double-click a memory position to edit it. If the memory is not initialized, this
operation is not possible.
• Drag the mouse in the memory dump to select a memory range.
Microcontrollers Debugger Manual
Debugger Components
General Debugger Components
• Hold down the left mouse button + A key to jump to a memory address. The pointed
to value is interpreted as an address and the memory component dumps memory
starting at this address.
• Select a memory range, and hold down the left mouse button + R key to set a Read
watchpoint for the selected memory area. Memory ranges where a read watchpoint
has been defined are underlined in green. If read access on the memory area is
detected during execution, the program is halted and the current program state is
displayed in all window components.
• Select a memory range, and hold down the left mouse button + W key to set a Write
watchpoint on the selected memory area. Memory ranges where a write watchpoint
has been defined are underlined in red. If write access on the memory area is detected
during execution, the program is halted and the current program state is displayed in
all window components.
• Select a memory range, and hold down the left mouse button + B key to set a Read/Write watchpoint on the selected memory area. Memory ranges where a read/write
watchpoint has been defined are underlined in black. If the memory area is exceeded
during execution, the program is halted and the current program state is displayed in
all window components.
• Select a memory range on which a watchpoint was previously defined, and hold
down the left mouse button + D key to delete the watchpoint on the selected memory
area. The memory area is no longer underlined.
• Select a memory range, and hold down the left mouse button + S key to set a
watchpoint on the selected memory area. The Watchpoints Setting dialog box is
opened. Memory ranges where a watchpoint has been defined are underlined in
black.
Memory Menu
The Memory Menu shown in Figure 3.34 provides access to memory commands. Table
3.16 describes the menu entries.
Figure 3.34 Memory Menu
Microcontrollers Debugger Manual
93
Debugger Components
General Debugger Components
Table 3.16 Memory Menu Description
Menu EntryDescription
Word sizeOpens a submenu to specify the display unit size.
FormatOpens a submenu to select the format to display items.
ModeOpens a submenu to choose the update mode.
DisplayOpens a submenu to toggle the display of addresses and ASCII
dump.
FillOpens the Fill Memory
AddressOpens the memory dialog box and prompts for an address.
CopyMemOpens the CopyMem dialog box that allows you to copy memory
Search PatternOpens the Search Pattern dialog box.
range values to a specific location.
Word Size Submenu
With the Word Size submenu shown in Figure 3.35, you can set the memory display unit.
Table 3.17
Figure 3.35 Word Size Submenu
Table 3.17 Word Size Submenu Description
Menu EntryDescription
ByteSets display unit to byte size.
WordSets display unit to word size (=2 bytes).
describes the menu entries.
to fill a memory range with a bit pattern.
94
LwordSets display unit to Lword size (=4 bytes).
Microcontrollers Debugger Manual
Format Submenu
With the Format Submenu shown in Figure 3.36, you can set the memory display format.
Table 3.18
Figure 3.36 Format Submenu
Table 3.18 Format Submenu Description
Menu EntryDescription
HexSelects the hexadecimal memory display format
BinSelects the binary memory display format
OctSelects the octal memory display format
describes the menu entries.
Debugger Components
General Debugger Components
DecSelects the signed decimal memory display format
UDecSelects the unsigned decimal memory display format
Bit ReverseSelects the bit reverse memory display format (each bit is reversed).
Mode Submenu
With the Mode submenu shown in Figure 3.37, you can set the memory mode format.
Table 3.19
Figure 3.37 Mode Submenu
Microcontrollers Debugger Manual
describes the menu entries.
95
Debugger Components
General Debugger Components
Table 3.19 Mode Submenu Description
Menu EntryDescription
AutomaticSelects Automatic mode (default), memory dump is updated when
the connection is stopped.
PeriodicalSelects the Periodical mode, memory dump is updated at regular
FrozenSelects the Frozen mode, memory dump displayed in the memory
time intervals when the connection is running. The default update rate
is 1 second, but it can be modified by steps of up to 100 ms using the
associated dialog box (see below).
component is not updated when the connection is stopped.
Display Submenu
With the Display submenu shown in Figure 3.38, you can set the memory display
(address/ASCII). Table 3.20
Figure 3.38 Display Submenu
Table 3.20 Display Submenu Description
Menu EntryDescription
AddressAllows you to toggle the display of address dump.
ASCIIAllows you to toggle the display of ASCII dump.
describes the menu entries.
96
Microcontrollers Debugger Manual
Fill Memory
The Fill Memory dialog box shown in Figure 3.39 allows you to fill a memory range
(from Address edit box and to Address edit box) with a bit pattern (value edit box).
Figure 3.39 Fill Memory dialog box
NOTEIf Hex Format is checked, numbers and letters are interpreted as hexadecimal
numbers. Otherwise, type expressions and prefix Hex numbers with 0x or $.
Debugger Components
General Debugger Components
Display Address
With the Display Address dialog box, shown in Figure 3.40, the memory component
dumps memory starting at the specified address.
Figure 3.40 Display Address Dialog Box
NOTEThe Show PC dialog box is the same as the Display Address dialog box. In this
dialog box, the Assembly component dumps assembly code starting at the
specified address.
Microcontrollers Debugger Manual
97
Debugger Components
General Debugger Components
CopyMem Submenu
The CopyMem dialog box shown in Figure 3.41 allows you to copy a memory range to a
specific address.
Figure 3.41 CopyMem Dialog Box
To copy a memory range to a specific address, enter the source range and the destination
address. Press the OK button to copy the specified memory range. Press the Cancel
button to close the dialog box without changes. Press the Help button to open the help file
associated with this dialog box.
If Hex Format is checked, all given values are in Hexadecimal Format. You don't need to
add 0x. For instance, type 1000 instead of 0x1000.
NOTEIf you try to read or write to an unauthorized memory address, an error dialog
box appears.
Search Pattern
The Search Pattern dialog box shown in Figure 3.42 allows you to search memory or a
memory range for a specific expression.
Figure 3.42 Search Pattern Dialog Box
98
Microcontrollers Debugger Manual
Refresh
Select the Refresh menu entry to refresh the Memory window current data cache. The
debugger refreshes the data cache as if the debugger was halted or stepped.
Note that only memory ranges defined with the Refresh memory when halting option in
the Debugging Memory Map (DMM) interface are refreshed. The Refresh menu entry
addresses, by DMM factory setup, the volatile memory, i.e. the RAM and on-chip I/O
Registers.
TIPTo refresh other memory ranges, either set the Refresh memory when halting
option for wanted ranges in the DMM dialog, or type/enter the DMM RELEASECACHES command in the Command window. You can disable caching
for the debug session when typing/entering the DMM CACHINGOFF command in
the Command window.
Update Rate
This dialog box, shown in Figure 3.43, allows you to modify the update rate in steps of
100ms.
Figure 3.43 Update Rate Dialog Box
Debugger Components
General Debugger Components
NOTEPeriodical mode is not available for all hardware connections or some
additional configuration may be required in order to make it work.
When you check the Refresh memory periodically when halted checkbox, the debugger
keeps on refreshing caches even when it is not running. This allows you to see I/O
Register changes even if the CPU is not running.
Microcontrollers Debugger Manual
99
Debugger Components
General Debugger Components
Memory Context Menu
The Memory Context menu allows you to execute memory associated commands. Figure
3.44 shows the Memory Context menu and Table 3.21 describes the menu entries. Menu
contents vary when the DBG module is available.
Figure 3.44 Memory Context Menu
Table 3.21
explains the menu entries in the Memory Context menu.
Table 3.21 Memory Context Menu Description
Menu EntryDescription
Set WatchpointAppears in the context menu only if no watchpoint is set or disabled
Delete
Watchpoint
on the selected memory range. When selected, sets a Read/Write
watchpoint at this memory area. Memory ranges where a read/write
watchpoint has been defined are underlined in yellow. If the memory
area is accessed during execution of the application, the program is
halted and the current program state is displayed in all window
components.
Appears in the context menu only if a watchpoint is set or disabled
on the selected memory range. When selected, deletes this
watchpoint.
100
Microcontrollers Debugger Manual
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.