Beruflich Dokumente
Kultur Dokumente
Debug Features
TRACE32 Tools
11
11
12
Trace Features
12
TRACE32 Tools
13
NEXUS
15
NEXUS Features
15
16
18
19
19
Configuration File
19
Standard Parameters
20
21
Additional Parameters
24
25
26
About TRACE32
27
Version Information
27
28
29
29
30
31
Debug Scenarios
35
37
43
44
44
45
48
59
60
60
65
65
66
78
79
79
80
81
82
82
82
82
83
84
84
84
85
85
86
87
88
Overview
89
90
92
Window Area
94
Command Line
97
Command Structure
97
Command Examples
98
99
100
Message Line
101
Softkeys
102
State Line
103
1989-2013 Lauterbach GmbH
Registers ..................................................................................................................................
Display the Core Registers
104
104
105
106
107
Tree Display
107
Full Display
108
110
111
112
113
114
Basics
114
119
120
129
130
130
131
Breakpoints ..............................................................................................................................
Breakpoint Implementations
133
133
133
134
135
138
152
Breakpoint Types
155
Program Breakpoints
156
Read/Write Breakpoints
157
159
159
160
162
163
Implementations
165
Actions
166
Options
169
DATA Breakpoints
171
Advanced Breakpoints
174
TASK-aware Breakpoints
175
175
179
Counter
180
CONDition
184
CMD
187
memory/register/var
190
195
Delete Breakpoints
196
Enable/Disable Breakpoints
196
197
Debugging ................................................................................................................................
Basic Debug Control
198
198
201
Introduction
201
Standard Approach
202
Details
205
In-depth Result
205
(other)
206
207
207
209
System Concept
A single-core processor/multi-core chip can provide:
Depending on the debug resources different debug features can be provided and different TRACE32 tools
are offered.
System Concept
Debug Features
Depending on the single-core processor/multi-core chip different debug features are available.
Debug features provided by all single-core processors/multi-core chips:
System Concept
TRACE32 Tools
The TRACE32 debugger hardware always consists of:
System Concept
304 DMIPS
200 MHz
PC
Target
Debug Cable
USB
Cable
PODBUS IN
POWER
DEBUG CABLE
USB
POWER
7-9 V
LAUTERBACH
SELECT
EMULATE
DEBUG CABLE
TRIG
PODBUS OUT
JTAG
Connector
LAUTERBACH
AC/DC Adapter
System Concept
304 DMIPS
200 MHz
HUB
PC or
Workstation
Target
Debug Cable
PODBUS IN
POWER
COLLISION
DEBUG CABLE
ETHERNET
CON ERR
RECEIVE
POWER
7-9 V
LAUTERBACH
TRIGGER
TRANSMIT
DEBUG CABLE
USB
EMULATE
SELECT
RECORDING
PODBUS OUT
JTAG
Connector
TRIG
Ethernet
Cable
System Concept
POWER DEBUG II
1000 DMIPS
500 MHz
HUB
PC or
Workstation
1 GBit Ethernet
Target
PODBUS SYNC
Debug Cable
POWER DEBUG II
POWER
SELECT
ACTIVITY
ETHERNET
POWER
7-9 V
PODBUS OUT
LAUTERBACH
DEBUG CABLE
DEBUG CABLE
LINK
LAUTERBACH
RUNNING
USB
Ethernet
Cable
JTAG
Connector
TRIG
POWER DEBUG II
AC/DC Adapter
10
System Concept
On task/process switches.
In order to analyze and display the trace information the debug cable needs to provide a Trace License. The
name of the Trace License:
The display and the evaluation of the trace information is described in the following documents:
11
System Concept
Trace Features
The trace port exports in real-time trace information:
On task/process switches.
The display and the evaluation of the trace information is described in the following documents:
12
System Concept
TRACE32 Tools
For tracing the TRACE32 debugger has to be extended by:
HUB
PC or
Workstation
Target
Debug Cable
PODBUS IN
POWER
TRIG
POWER
7-9 V
COLLISION
PODBUS OUT
LAUTERBACH
JTAG
Connector
ETHERNET
CON ERR
RECEIVE
DEBUG CABLE
TRIGGER
TRANSMIT
LAUTERBACH
USB
EMULATE
RECORDING
DEBUG CABLE
SELECT
Ethernet
Cable
Trace
Connector
Preprocessor
AC/DC Adapter
13
System Concept
POWER DEBUG II can be extended by a POWER TRACE II with 1 GByte, 2 GByte or 4 GByte trace
memory.
HUB
PC or
Workstation
1 GBit Ethernet
Target
Debug Cable
PODBUS SYNC
POWER DEBUG II
POWER
TRIG
JTAG
Connector
SELECT
ACTIVITY
ETHERNET
POWER
7-9 V
PODBUS OUT
PODBUS IN
LAUTERBACH
POWER TRACE II
DEBUG CABLE
DEBUG CABLE
LINK
LAUTERBACH
RUNNING
USB
Ethernet
Cable
PODBUS EXPRESS IN
LAUTERBACH
POWER
RECORD
RUNNING
POWER
7-9V
PREPROCESSOR / NEXUS
SELECT
Trace
Connector
PODBUS OUT
POWER DEBUG II
POWER TRACE II
Preprocessor
AC/DC Adapter
14
System Concept
NEXUS
NEXUS is a standardized interface for on-chip debugging and real-time trace especially for the automotive
industry.
NEXUS Features
Debug features provided by all single-core processors/multi-core chips:
The display and the evaluation of the trace information is described in Nexus Training
(training_nexus.pdf).
15
System Concept
HUB
PC or
Workstation
Target
PODBUS IN
NEXUS Adapter
POWER
TRIG
SELECT
DEBUG CABLE
EMULATE
USB
RECORDING
TRIGGER
ETHERNET
Ethernet
Cable
CON ERR
TRANSMIT
RECEIVE
COLLISION
PODBUS OUT
LAUTERBACH
NEXUS
Connector
POWER
7-9 V
AC/DC Adapter
16
System Concept
POWER DEBUG II can be extended by a POWER TRACE II for NEXUS with 1 GByte, 2 GByte or 4 GByte
trace memory.
HUB
PC or
Workstation
1 GBit Ethernet
PODBUS SYNC
POWER DEBUG II
POWER
TRIG
SELECT
RUNNING
USB
Target
DEBUG CABLE
LINK
ACTIVITY
ETHERNET
Ethernet
Cable
POWER
7-9 V
PODBUS OUT
PODBUS IN
LAUTERBACH
POWER TRACE II
PODBUS EXPRESS IN
LAUTERBACH
POWER
RECORD
RUNNING
POWER
7-9V
PREPROCESSOR / NEXUS
SELECT
NEXUS
Connector
NEXUS Adapter
PODBUS OUT
POWER DEBUG II
POWER TRACE II
AC/DC Adapter
17
System Concept
POWER DEBUG II can be extended by a POWER TRACE II for NEXUS with 1 GByte, 2 GByte or 4 GByte
trace memory.
HUB
PC or
Workstation
1 GBit Ethernet
Target
Debug Cable
PODBUS SYNC
POWER DEBUG II
POWER
TRIG
ACTIVITY
ETHERNET
POWER
7-9 V
PODBUS OUT
PODBUS IN
LAUTERBACH
POWER TRACE II
DEBUG CABLE
DEBUG CABLE
LINK
LAUTERBACH
RUNNING
USB
Ethernet
Cable
JTAG
Connector
SELECT
PODBUS EXPRESS IN
LAUTERBACH
POWER
RECORD
RUNNING
PREPROCESSOR / NEXUS
SELECT
POWER
7-9V
Trace
Connector
PODBUS OUT
POWER DEBUG II
POWER TRACE II
Preprocessor
AC/DC Adapter
18
System Concept
Configuration File
Open the file config.t32 from the system directory ( default c:\T32\config.t32) with any ASCII editor.
19
Standard Parameters
Parameter
Syntax
Description
Host interface
PBI=
<host_interface>
Environment
variables
OS=
ID=<identifier>
TMP=<temp_directory>
SYS=<system_directory>
HELP=<help_directory>
Printer
definition
PRINTER=WINDOWS
License file
LICENSE=<license_directory>
20
; Environment variables
OS=
ID=T32
TMP=C:\temp
SYS=d:\t32\usb
HELP=C:\T32_MPC\pdf
; Printer settings
PRINTER=WINDOWS
21
IFCONFIG
22
; Host interface
PBI=
NET
NODE=training1
; Environment variables
OS=
ID=T32
TMP=C:\temp
SYS=d:\t32\eth
; Printer settings
PRINTER=WINDOWS
IFCONFIG
23
Additional Parameters
Changing the font size can be helpful for a more comfortable display of TRACE32 windows.
; Screen settings
SCREEN=
FONT=SMALL
24
Configuration File
Working Directory
Window Size
25
Parameters
26
About TRACE32
If you want to contact your local Lauterbach support, it might be helpful to provide some basis information
about your TRACE32 tool.
Version Information
2.
The debug licenses programmed into the debug cable and the expiration date of your software
guarantee respectively the expiration date of your software maintenance.
3.
VERSION.view
VERSION.HARDWARE
VERSION.SOFTWARE
27
To generate a system information report, choose Help > Support > Systeminfo.
2.
Preferred: click Save to File, and send the system information as an attachment to your e-mail.
3.
Click Save to Clipboard, and then paste the system information into your e-mail.
28
29
Modify memory-mapped
configuration register/on-chip
peripheral
30
2.
Refer to the compiler list provided by this manual. The Option column lists the supported output
formats.
31
The most important commands to load the code to be debugged and the debug symbols are:
Data.LOAD.Elf arm-flash.elf
Data.LOAD.AIF demo.axf
Data.LOAD.Elf *
Data.LOAD.Binary my_app.bin
A in-depth introduction to the Data.LOAD command is given in the chapter Load the Application Program
in training_hll.pdf.
32
33
2.
Open the TRACE32 manual for your operating system (RTOS Debugger).
If your OS is compiled with symbol and debug information, the adaptation to your OS can be activated in
most cases as follows:
TASK.CONFIG <file>
MENU.ReProgram <file>
HELP.FILTER.Add <filter>
All necessary files can be found on the TRACE32 software DVD under:
\demo\<architecture>\kernel\<OS>
34
Debug Scenarios
The necessary set-up for your debug session depends crucially on the debug scenario. The graphic below
shows you that there are mainly four debug scenarios.
YES
YES
Is the software
running out of
NOR flash?
Debug
Scenario 1
Is the software
running out of flash?
NO
NO
Debug
Scenario 2
YES
Debug
Scenario 3
Is a boot loader
available?
NO
Debug
Scenario 4
35
After the communication between the debugger and the core(s) is established, there a four debug
scenarios. Each debug scenario requires a different set-up.
Debug Scenario 1
The boot loader or the application (and/or the operating system) under debug is running out of
NOR flash.
Debug Scenario 2
The boot loader under debug is running out of a flash e.g. a NAND or serial flash.
Debug Scenario 3
The application (and/or the operating system) under debug are running out of RAM and a readyto-run boot loader configures the target system and especially the RAM for this debug scenario.
Debug Scenario 4
The application (and/or the operating system) under debug are running out of RAM. The target
configuration, especially the RAM configuration has to be done by TRACE32 commands,
because there is no ready-to-run boot loader.
36
37
1.
Inform the debugger about the core/chip on your target, if an automatic detection of the core/chip is
not possible. Wild card symbols * or ? are allowed.
SYStem.DETECT CPU
SYStem.CPU <cpu>
SYStem.CPU CortexR5
38
2.
if a fixed relation between the core clock and the JTAG clock is specified. E.g. for the Power
1
4
SYStem.JtagClock <frequency>
SYStem.JtagClock 1.MHz
SYStem.JtagClock 100.kHz
SYStem.JtagClock RTCK
39
3.
Additional settings
40
4.
SYStem.Up
41
A second useful way to establish the communication between the debugger and the core/chip is
Attach. Attach allows to connect the debugger to an already running core/chip.
SYStem.Mode Attach
SYStem.Mode Attach
Break
42
Debug Scenario 1
The boot loader or the application (and/or the operating system) under debug is running out of NOR flash.
YES
Is an OS used?
NO
*Considering the circumstance that a process has to be started manually e.g. via a TERMinal window
43
Debug Scenario 1
NOTE:
Flash programming requires that data cache is disabled for the address range
covered by the FLASH device.
44
Debug Scenario 1
\demo\<architecture>\flash\<CPU>.cmm
e.g. \demo\arm\flash\at91sam7s.cmm
e.g. \demo\powerpc\flash\jpc564xl.cmm
45
Debug Scenario 1
To program the software to the on-chip flash of your processor/chip proceed as follows:
1.
2.
TRACE32 PowerView informs you when all preparations are done. Please confirm that you are
ready to choose the boot loader or the application to be programmed.
46
Debug Scenario 1
3.
If the boot loader/application is compiled with debug symbols they are automatically loaded into TRACE32
PowerView with the flash programming.
For details on the on-chip flash programming open the flash programming script.
; ~~ represents the TRACE32 installation directory
PEDIT ~~\demo\powerpc\flash\jpc564xl.cmm
47
Debug Scenario 1
Tool-based programming
Tool-based programming means that the flash programming algorithm is part of the TRACE32
software. Tool-based programming is easy to configure but slow.
2.
Target-controlled programming
Target-controlled flash programming means that the underlying flash programming algorithm is
detached from the TRACE32 software. Target-controlled flash programming works as follows:
1. The flash algorithm is downloaded to the target RAM.
2. The programming data are downloaded to the target RAM.
3. The flash algorithm running in the target RAM programs the data to the flash devices.
Target-controlled flash programming minimizes the communication between the host and the
debugger hardware. This makes target-controlled flash programming fast.
NOTE:
Programming off-chip NOR flash requires the following steps (see next page):
48
Debug Scenario 1
NO
Is the watchdog
disabled?
YES
Disable watchdog
NO
YES
NO
NO
YES
YES
Program flash
49
Debug Scenario 1
1.
Example
; Display Watchdog Timer configuration registers, highlight changes
PER.view , "Watchdog Timer" /SpotLight
50
Debug Scenario 1
2.
The data cache has to be disabled for the address ranges of all flash devices to enable TRACE32
PowerView to read the flash status information.
Example
; Display the memory management configuration registers
; highlight changes
PER.view , "Core Registers,Memory Management Unit" /SpotLight
51
Debug Scenario 1
3.
Make sure that the core has write access to the flash
NOR flash programming requires that the core has write access to the flash device(s).
The following settings in the bus configuration have to be done for each NOR flash device:
Definition of the bus size that is used to access the NOR flash device
The write access has to be enabled for the NOR flash device
Definition of the timing (number of wait states for the write access to the NOR flash device)
Use the PER.view command to check the settings in the bus configuration registers.
52
Debug Scenario 1
In order to have write access to the used off-chip NOR flash device the Address Region 0 has to be
configured for the following characteristics:
Size 16 MByte
PER.view , /SpotLight
; ADDSEL0
; BUSCON0
53
Debug Scenario 1
FLASH.RESet
FLASH.List
FLASH.UNLOCK ALL
More details on the concepts of the TRACE32 NOR flash programming can be found in NOR FLASH
Programming Users Guide (norflash.pdf).
If your FLASH device doesnt provide CFI please refer to NOR FLASH Programming Users Guide
(norflash.pdf) for details on the FLASH programming procedure.
54
Debug Scenario 1
Example
FLASH.RESet
FLASH.List
FLASH.UNLOCK ALL
;
;
;
;
FLASH.ReProgram ALL
Data.LOAD.Elf demo.elf
FLASH.ReProgram OFF
IF FOUND()
PRINT "Verify error after FLASH programming"
ELSE
PRINT "FLASH programming completed successfully"
55
Debug Scenario 1
FLASH.RESet
FLASH.UNLOCK ALL
56
Debug Scenario 1
Details on <code_range>
Required size for the code is size_of(file) + 32 byte
Flash programming algorithm
32 byte
Details on <data_range>
The parameter <data_range> specifies the RAM location for the data, especially
the <data_buffer_size> for the programming data. Recommended buffer size is 4 KByte, smaller
buffer sizes are also possible. The max. buffer size is 16 KByte
the argument buffer for the communication between TRACE32 PowerView and the programming
algorithm
the stack
<data_buffer_size> =
size_of(<data_range>) - 64 byte argument buffer - 256 byte stack
64 byte argument buffer
57
Debug Scenario 1
4.
Target-controlled Flash Programming requires, that the core has access to the RAM locations specified for
<code_range> and <data_range>.
If this is not the case the following settings in the bus configuration have to be done for an off-chip RAM:
Definition of the timing (number of wait states for the RAM access)
58
Debug Scenario 1
Example
; reset the FLASH declaration table
FLASH.RESet
; set-up the FLASH declaration for target-controlled programming
; target RAM at address 0x20000000
FLASH.CFI 0x0 Word /TARGET 0x20000000++0xfff 0x20001000++0xfff
; display FLASH declaration table
FLASH.List
; unlock the FLASH device if required for a power-up locked device
; FLASH.UNLOCK ALL
; enable the programming for all declared FLASH devices
FLASH.ReProgram ALL
; specify the file that contains the code and the debug symbols
Data.LOAD.Elf demo.elf
; program the file and disable the FLASH programming afterwards
FLASH.ReProgram OFF
; verify the FLASH contents
Data.LOAD.Elf demo.elf /DIFF
IF FOUND()
PRINT "Verify error after FLASH programming"
ELSE
PRINT "FLASH programming completed successfully"
...
59
Debug Scenario 1
Debug Scenario 2
The boot loader under debug is running out of a flash e.g. a NAND flash.
In contrast to NOR flash, code can not be executed out of NAND or serial flash. The code has always to be
copied to RAM before it can be executed.
60
Debug Scenario 2
1.
Reset
At RESET the boot loader is copied from the flash to an on-chip SRAM, which is mapped to the reset
vector. The boot loader starts afterwards.
Please be aware, that some core(s) require a correct ECC for this copy procedure.
Chip
0x0
On-chip SRAM
SDRAM
Copied by hardware
at RESET
Kernel image
(compressed)
kernel.bin
Flash
61
Debug Scenario 2
2.
Chip
kernel.bin
Kernel image
(compressed)
Flash
62
Debug Scenario 2
3.
Chip
Kernel image
Boot loader (max. 4 kByte)
On-chip SRAM
SDRAM
kernel.bin
Kernel image
(compressed)
Flash
63
Debug Scenario 2
NO
YES
64
Debug Scenario 2
NOTE:
65
Debug Scenario 2
/demo/<architecture>/flash
Name scheme:
/demo/<architecture>/flash/<cpu_name>-<nand_flash_code>.cmm
Get <cpu_name> from the CPU column of the list of Supported NAND/Serial Flash Controller on the
Lauterbach home page (www.lauterbach.com) if the CONTROLLER column does not indicate generic.
66
Debug Scenario 2
Get <nand_flash_code> from the CODE column of the list of Supported Flash Devices on the
Lauterbach home page (www.lauterbach.com).
67
Debug Scenario 2
Start the script appropriate for your processor/chip and appropriate for your flash device.
2.
TRACE32 PowerView informs you when all preparations are done. Please confirm that you are
ready to choose the boot loader binary to be programmed.
3.
Detail on NAND flash programming can be found in NAND FLASH Programming Users Guide
(nandflash.pdf).
68
Debug Scenario 2
Programming script for generic NAND flash controller have to be written by the user.
69
Debug Scenario 2
Programming a flash device with the help of a generic NAND flash controller requires the following steps:
NO
YES
NO
Is the watchdog
disabled?
YES
Disable watchdog
Program flash
70
Debug Scenario 2
1.
Prepare the NAND FLASH Controller and the NAND FLASH for Programming
Programming a flash device requires a proper initialization of the flash controller and the bus interface. The
following settings might be necessary:
Inform the flash controller about the flash device (large/small page, ECC, spare, etc.).
Configure the flash pins if they are muxed with other functions of the processor/chip.
71
Debug Scenario 2
2.
TRACE32 PowerView runs the flash programming algorithm in target RAM. It requires at least 16 KByte of
RAM for this purpose.
This requires that the core has access to target RAM.
If the core has no access to target RAM, the access to target RAM has to be set-up.
Correct settings in the bus configuration registers are key for the RAM access. The following settings in the
bus configuration have to be done:
Definition of the timing (number of wait states for the write access to the RAM)
72
Debug Scenario 2
73
Debug Scenario 2
74
Debug Scenario 2
3.
Example (ARM920T):
; Display Watchdog Timer configuration registers, highlight changes
PER.view , "Watchdog Timer" /SpotLight
75
Debug Scenario 2
The following commands are useful, if a generic NAND flash controller is used to program a flash. For details
refer to NAND FLASH Programming Users Guide (nandflash.pdf).
FLASHFILE.RESet
FLASHFILE.Erase <range>
Its location on the TRACE32 software DVD is defined by the number of data I/O pins between the NAND
flash controller and the flash device. E.g. is there are 8 data I/O pins between the NAND flash controller and
the flash device the algorithm can be found under:
/demo/<architecture>/flash/byte/<nand_flash_code>.bin
76
Debug Scenario 2
This flash programming algorithm is downloaded to a target RAM when flash programming is performed.
Therefore TRACE32 PowerView needs to be informed about an appropriate RAM location by the
<code_range> parameter of the FLASH.TARGET program
required size for the code is size_of(file) + 32 byte
FLASH algorithm
32 byte
The parameter <data_range> specifies the RAM location for the data, especially
the <data_buffer_size> for the programming data. Recommended buffer size is 4 KByte, smaller
buffer sizes are also possible. The max. buffer size is 16 KByte
the argument buffer for the communication between TRACE32 PowerView and the programming
algorithm
the stack
<data_buffer_size> =
size_of(<data_range>) - 64 byte argument buffer - 256 byte stack
64 byte argument buffer
Example
FLASHFILE.RESet
FLASHFILE.CONFIG 0x4E000004 0x4E000008 0x4E00000C
FLASHFILE.TARGET 0x30000000++0x1FFF 0x30002000++0x3FFF
~~\demo\arm\flash\byte\nand5608.bin
FLASHFILE.Erase 0x0--0x1FFFF
FLASHFILE.LOAD boot.bin 0x0
77
Debug Scenario 2
Get <cpu_name> from the CPU column of the list of Supported NAND/Serial Flash Controller on the
Lauterbach home page (www.lauterbach.com).
78
Debug Scenario 2
If you want to debug only the second stage boot loader you can set an on-chip breakpoint to its start
address:
Break.Set start_boot2 /Onchip
79
Debug Scenario 2
Debug Scenario 3
The application (and/or the operating system) under debug are running out of RAM and a ready-to-run boot
loader configures the target system and especially the RAM for this debug scenario.
YES
YES
NO
Is an OS used?
NO
*Considering the circumstance that a process has to be started manually e.g. via a TERMinal window
1989-2013 Lauterbach GmbH
80
Debug Scenario 3
Go
Break
WAIT <time>
Go <address>
Break.Set <address>
Example 1
Go
Break
Example 2
; script example
Go
WAIT 0.5s
; wait 500. ms
Break
Example 3
Go 0xc0001000
Example 4
Break.Set 0xc0001000
Go
WAIT !STATE.RUN()
81
Debug Scenario 3
WAIT 0.5s
; wait 500. ms
Break
82
Debug Scenario 3
Debug Scenario 4
The application (and the operating system) under debug are running out of RAM. The target configuration,
especially the RAM configuration has to be done by TRACE32 commands, because there is no ready-to-run
boot loader.
YES
Is an OS used?
NO
*Considering the circumstance that a process has to be started manually e.g. via a TERMinal window
83
Debug Scenario 4
84
Debug Scenario 4
PEDIT my_startup
The debugger provides two commands, that allow you to convert debugger configuration information to a
script.
STOre <file> [<item>]
ClipSTOre [<item>]
PEDIT system_settings
ClipSTOre SYStem
;
;
;
;
;
;
85
DO <filename>
DO my_startup
86
1.
2.
87
TRACE32 PowerView
88
TRACE32 PowerView
Overview
Main Menu Bar
Main Tool Bar
Local Buttons
Local Menu
89
TRACE32 PowerView
Accelerators
90
TRACE32 PowerView
MENU.RESet
User Menu
For more complex changes to the main menu bar refer to Training Menu
(training_menu.pdf).
91
TRACE32 PowerView
MENU.RESet
User specific
button
92
TRACE32 PowerView
ChDir.DO ~~/demo/menu/internal_icons.cmm
For more complex changes to the main tool bar refer to Training Menu
(training_menu.pdf).
93
TRACE32 PowerView
Window Area
Save Page Layout
No information about the page layout is saved when you exit TRACE32 PowerView. To save the window
layout use the Store Window to command in the Window menu.
94
TRACE32 PowerView
95
TRACE32 PowerView
Modify Window
96
TRACE32 PowerView
Command Line
Command line
Command Structure
Device Prompt
TRACE32-IDE
B::
E::
F::
97
TRACE32 PowerView
Command Examples
Data
Data.dump
Data.Set
Modify memory
Data.LOAD.auto
Break
Break.Set
Sets a breakpoint
Break.List
Break.Delete
Deletes a breakpoint
Each command can be abbreviated. The significant letters are always written in upper case letters.
Option
Parameter
Subcommand
Command group
98
TRACE32 PowerView
99
TRACE32 PowerView
RADIX.Hex
Examples:
Decimal
Hex
Data.dump 100
100d
100h
Data.dump 100.
100d
100d
Data.dump 0x100
100h
100h
To see the currently used parameter syntax, enter RADIX. to the command line.
100
TRACE32 PowerView
Message Line
Message Area
Message Line
Message Area window for the display of the last system and error messages
101
TRACE32 PowerView
Softkeys
The softkey line allows to enter a specific command step by step.
Select an option
102
TRACE32 PowerView
State Line
Debug mode
103
TRACE32 PowerView
Registers
Register.view
104
Registers
SETUP.Var %SpotLight
105
Registers
Modify register
106
Registers
Tree Display
The individual configuration registers/on-chip peripherals are organized by TRACE32 PowerView in a tree
structure. On demand, details about a selected register can be displayed.
107
Registers
Full Display
Sometimes it might be useful to expand the tree structure from the start.
Useful commands:
; Display the functional unit "Display_Controller" in expanded mode
; "Display_Controller" is first level unit
PER.view , "Display_Controller"
; Display the functional unit "Memory Management Unit" in expanded mode
; "Memory Management Unit" is second level unit
PER.view , "Core Registers,Memory Management Unit"
; Display all functional units in expanded mode
PER.View , "*"
108
Registers
The following command sequence can be used to save the contents of all configuration registers/on-chip
peripheral registers to a file.
PRinTer.FileType ASCIIE
PRinTer.FILE Per.lst
WinPrint.Per.view , "*"
;
;
;
;
109
Registers
The access class, address, bit position and the full name of the selected item are
displayed in the state line; the full name of the selected item is taken from the
processor/chip manual.
110
Registers
PER.view C:\T32\perarm9t.per
111
Registers
By pressing the right mouse button and selecting one of the predefined values from the pulldown menu.
Modify memory
112
Registers
The Data.dump window, that displays a hex dump of a memory area, and
the Data.Set command that allows to modify the contents of a memory address.
The List (former Data.List) window, that displays the memory contents as source code listing.
A so-called access class is always displayed together with a memory address. The following access
classes are available for all processor architectures:
P:1000
D:6814
For additional access classes provided by your processor architecture refer to your Processor Architecture
Manual.
113
114
Use an Address to Specify the Start Address for the Data.dump Window
Please be aware, that TRACE32 permanently updates all windows. The default
update rate is 10 times per second.
115
Use an Address Range to Specify the Addresses for the Data.dump Window
If you enter an address range, only data for the specified address range are displayed. This is useful if a
memory area close to memory-mapped I/O registers should be displayed and you do not want TRACE32
PowerView to generate read cycles for the I/O registers.
Conventions for address ranges:
<start address>++<offset_in_byte>
116
Use a Symbol to Specify the Start Address for the Data.dump Window
117
Data.dump 0x6814
Data.dump 0x6814--0x6820
Data.dump 0x6814..0x6820
Data.dump 0x6814++0x8
Data.dump ast
118
119
120
Various cores allow a debugger to read and write physical memory (not cache) while the core is executing
the program. The debugger has in most cases direct access to the processor/chip internal bus, so no extra
load for the core is generated by this feature.
Open the SYStem window in order to check if your processor architecture allows a debugger to read/write
memory while the core is executing the program:
MemAccess CPU/NEXUS/DAP
indicates, that the core allows
the debugger to read/write the
memory while the core is
executing the program.
For more information on the non-intrusive run-time memory access refer to the description of the command
SYStem.MemAccess in your Processor Architecture Manual.
The usage of the non-intrusive run-time memory access has to be configured explicitly. Two methods are
provided:
Configure run-time memory access for all windows that display memory contents (not available
for all processor architectures).
121
If the E check box is enabled, the attribute E is added to the memory class:
EP:1000
ED:6814
122
SYStem.MemAccess CPU
Go
Data.dump E:0x6814
123
Configure the run-time memory access for all windows that display memory (not available for all
cores):
If MemAccess CPU/NEXUS/DAP is
selected and DUALPORT is selected,
run-time memory is configured for
all windows that display memory
124
SYStem.MemAccess CPU
SYStem.Option DUALPORT ON
Go
Data.dump 0x6814
125
If your processor architecture doesnt allow a debugger to read or write memory while the core is executing
the program, you can activate an intrusive run-time memory access if required.
If an intrusive run-time memory access is activated, TRACE32 stops the program execution periodically to
read/write the specified memory area. Each update takes at least 50 us.
core(s) is
executing the program
126
An intrusive run-time memory access is only possible for a specific memory area.
Enable the E check box to switch
the run-time memory access to ON
127
SYStem.CpuAccess Enable
Go
Data.dump E:0x6814
128
129
130
131
List
List E:
List *
List func17
132
Breakpoints
Breakpoint Implementations
A debugger has two methods to realize breakpoints: Software breakpoints and Onchip Breakpoints.
133
Breakpoints
134
Breakpoints
135
Breakpoints
Since Software breakpoints are used by default for Program breakpoints, TRACE32 PowerView has to be
informed explicitly where to use Onchip breakpoints. Depending on your memory layout, the following
methods are provided:
1.
If the code is completely located in read-only memory, the default implementation for the
Program breakpoints can be changed.
136
Breakpoints
2.
If the code is located in RAM and NOR FLASH/EEPROM/ROM you can define code ranges
where Onchip breakpoints are used.
MAP.BOnchip <range>
MAP.List
MAP.BOnchip 0x0++0x1FFF
MAp.BOnchip 0xA0000000++0x1FFFFF
137
Breakpoints
138
Breakpoints
Program breakpoints: Number of on-chip breakpoints that can be used to set Program breakpoints into FLASH/EEPROM/ROM.
Read/Write breakpoints: Number of on-chip breakpoints that stop the program when a read or
write to a certain address happens.
Data value breakpoint: Number of on-chip data breakpoints that stop the program when a specific data value is written to an address or when a specific data value is read from an address.
139
Breakpoints
A number of processor architectures provide only bit masks to mark an address range with on-chip
breakpoints. In this case the address range is always enlarged to the smallest bit mask that includes the
address range. It is recommended to control which addresses are actually marked with breakpoints by using
the Break.List /Onchip command:
Breakpoint setting:
Var.Break.Set flags
Break.List
Break.List /Onchip
140
Breakpoints
RISC/CISC Processors
Family
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
68k
6833x
6834x
68360
68HC12
68HC12A
up to 2
up to 2 single
address
up to 2 single
address
68HC16
78K0R
1 single address
1 single address
Andes
08
up to 8
up to 8
range as bit mask
up to 8
APS
3 instruction
3 single address
ARM7
ARM9
Janus
2 or
(1 if software
breakpoints are
used)
up to 2
range as bit mask
up to 2
range as bit mask
ARM10/
ARM11
2 16 instruction
2 16 read/write
2 16
single address
2 16
single address
ARMv8
2 16 instruction
2 16 read/write
2 16
single address
2 16
single address
ATOM
4
single address
4
single address or
very small ranges
AVR32
6 instruction
2 read/write
6
range as bit mask
2
range as bit mask
C166SV2
up to 4
up to 4 write
up to 1 read
up to 4 write
up to 1 read
Cortex-A5
3 instruction
2 read/write
3
single address
2
range as bit
mask, break
before make
141
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
Cortex-A8
6 instruction
2 read/write
6
range as bit mask
2
range as bit
mask, break
before make
Cortex-A7/
A9/A15
6 instruction
4 read/write
6
single address
4
range as bit
mask, break
before make
Cortex-M0/
M0+
1-4 (BU)
single address
(onchip flash only)
and
1-2 (DW unit)
range as bit mask
Cortex-M1
2 or 4 (BPU)
single address
(onchip flash only)
and
1 or 2 (DW unit)
range as bit mask
1 or 2 (DW unit)
range as bit mask
Cortex-M3
6 (FPB)
single address
(onchip flash only)
and
4 (DWT)
range as bit mask
4 (DWT)
range as bit mask
1
needs two
DWT
comparators
Cortex-M4
2 or 6 (FPB)
single address
(onchip flash only)
and
1 or 4 (DWT)
range as bit mask
1 or 4 (DWT)
range as bit mask
0 or 1
needs two
DWT
comparators
Cortex-R4/
R5
2-8 instruction
1-8 read/write
2-8
range as bit mask
1-8
range as bit
mask, break
before make
Cortex-R7
6 instruction
4 read/write
6
single address
4
range as bit
mask, break
before make
Family
142
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
ColdFire
4 instruction,
2 read/write
3 single address,
1 bit mask
2 single address
or 2 ranges
eTPU
up to 2 single
address
up to 2 read/write
range as bitmask
2
(only with write
breakpoints)
H8S
up to 2
up to 2
range as bit mask
GTM
(only MPC)
up to 4
up to 4
up to 4
H8SX
up to 4
up to 4
range as bit mask
M32R
4 instruction
2 read/write
4 single address
2 single address
or
2 ranges
MCORE
2 single address
or
1 range as bit
mask
2
range as bit mask
MCS8
up to 2 single
address
up to 2 single
address
(reduced to 1 if
combined with
data)
MCS12
MCS12C
up to 3
up to 3 single
address
up to 3 single
address
MCS12X
up to 4 single
address or 2
address ranges
up to 4 single
address or 2
address ranges
MGT5100
1 instruction
(No on-chip
breakpoint,
if software
breakpoints are
used)
1 read/write
1/0 single
address
1single address
Family
143
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
MIPS32
MIPS64
up to 15
instruction
up to 15
read/write
up to 15
range as bit mask
up to 15
range as bit mask
up to 15
MPC500
MPC800
4 instruction,
2 read/write
4 single address
or 2 breakpoint
ranges
2 single address
or 1 breakpoint
range
MPC5200
2 instruction
(reduced to 1 if
software
breakpoints are
used)
2 read/write
2/1
2 single address
or 1 breakpoint
range
2
2 single address
or 1 breakpoint
range
MPC55xx
4 instruction
2 read/write
4 single address
or 2 breakpoint
ranges
2 single address
or 1 breakpoint
range
MPC563x
4 instruction
2 read/write
4 single address
or 2 breakpoint
ranges
2 single address
or 1 breakpoint
range
MPC564x
MPC567x
8 instruction
2 read/write
8 single address
or
4 single address
and 2 breakpoint
ranges
2 single address
or 1 breakpoint
range
MPC74xx
MPC86xx
1 instruction
(No on-chip
breakpoint,
if software
breakpoints are
used)
1 read/write
1/0 single
address
1 single address
MPC8240
MPC8245
MPC825x
MPC826x
(PQ2)
1 instruction
(No on-chip
breakpoint, if
software
breakpoints are
used)
1/0 single
address
Family
144
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
2 instruction
(reduced to 1 if
software
breakpoints are
used)
2 read/write
2/1
2 single address
or
1 breakpoint
range
2
2 single address
or 1 breakpoint
range
MPC85xx
(PQ3)
2 instruction
(reduced to 1 if
software
breakpoints are
used)
2 read/write
2/1
2 single address
or 1 breakpoint
range
2
2 single address
or 1 breakpoint
range
MSP430
28
28
ranges require
2 breakpoints
28
ranges require
2 ...4 breakpoints
28
PPC401
PPC403
2 instruction,
2 read/write
2 single address
or 2 ranges
2 single address
or 2 ranges
PPC405
PPC44x
4 instruction,
2 read/write
4 single address
or 2 address
ranges
2 single address
or 1 address
range
PPC600
1 instruction
(no on-chip
breakpoint,
if software
breakpoints are
used)
1/0 single
address
PPC740
PPC750
1 instruction
(No on-chip
breakpoint,
if software
breakpoints are
used)
1 read/write
1/0 single
address
1 single address
PWRficient
2 instruction,
2 read/write
2 single address
or 1 breakpoint
range
2 single address
or 1 breakpoint
range
Family
MPC8247
MPC8248
MPC827x
MPC8280
(PQ27)
MPC83xx
(PQ2 Pro)
145
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
QORIQ
2 instruction,
2 read/write
2 single addr.,
or 1 large range,
or 2 ranges up to
4 kB,
or 1 single
address and 1
range up to 4 kB
2 single addr.,
or 1 large range,
or 2 ranges up to
4 kB,
or 1 single
address and 1
range up to 4 kB
RH850
12
12
range as bit mask
12
range as bit mask
12
RX
8 instruction
4 read/write
8
range as bit mask
4
1 breakpoint
range
others range as
bit mask
SH2A
ST4A
10
up to 10
up to 10
range as bit mask
SH3
up to 2
up to 2
range as bit mask
SH4
ST40
up to 6
up to 6
range as bit mask
SH7047
SH7144/45
up to 1
up to 1
SH7058
12
up to 12
up to 12
range as bit mask
up to 12
Super10
up to 8
up to 8
up to 8
TriCore
up to 4 instruction
up to 4 read/write
up to 4 single
address or
up to 2 ranges
up to 4 single
address or
up to 2 ranges
V850E1
4 or 8 single
address
2 single address
or 1 range
4
range as bit mask
Family
4 or 8 instruction
(onchip flash only)
V850E2
2 single address
or 1 range
8 single address
8 instruction
(onchip flash only)
4
range as bit mask
146
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
XC2000/
XE16x
up to 4
up to 4 write
up to 1 read
up to 4 write
up to 1 read
XC800
up to 4
up to 1 range
(2 single needed)
up to 1 single
address read or
address range
up to 1 single
address write or
address range
XSCALE
2 instruction/
2 read/write
2 single address
2 single address
or
1 range as bit
mask
Family
147
Breakpoints
DSP Processors
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoints
Data Value
Breakpoints
Blackfin
6 instruction
2 read/write
6 single address
or
3 ranges
2 single address
or
1 range
CEVA-X
4 instruction
4 read/write
4 single address
4 single address
or range
2
1
2
1
2
1
DSP
56300
56800E
up to 2 single
address
up to 1 single
address
MMDSP
2 instruction
1 read/write
2 single address
1 single address
OAK
TeakLite
TeakLite II
Teak
3 instruction
1 read/write
3 single address
1 single address
or
range as bit mask
StarCore
12
up to 12 single
address or up to 6
ranges
up to 6 single
address or
up to 3 ranges
STN8810
STN8815
STN8820
up to 2
up to 2
TeakLite III
2 instruction
1 read/write
2 single address
2 single address
or 1 range
TMS320
C28x
2 single address
TMS320
C54x
2 single address
TMS320
C55x
up to 4 single
address
up to 3 data,
1 breakpoint
range and 2 bit
masks
up to 3
Family
DSP56K
56k/56300/
56800
56100
148
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoints
Data Value
Breakpoints
TMS320
C62x
1 single address
TMS320
C64x
up to 4
up to 4 single
address
TMS320
C67x
1 single address
ZSP400
ZSP500
up to 4 single
address
up to 1
range as bit mask
Family
149
Breakpoints
Softcores
Family
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
MicroBlaze
0 4 instruction
0 4 read/write
04
range as bit mask
04
range as bit mask
NIOS2
0/4/8
(configurable)
up to 4
up to 4 single
address or
2 ranges
up to 4
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
0/2/4/8
up to 0/2/4/8
range as bit mask
up to 0/2/4/8
range as bit mask
up to 0/1/2/4
only writes,
only in full
mode
Configurable Cores
Family
ARC
600/700
ARC-EM
range as bit
mask
ARC
tangentA4
0/2/4/8
up to 0/2/4/8
range requires
2 breakpoints
up to 0/2/4/8
write only
range requires
2 breakpoints
ARC
tangentA5
Beyond
BA22
up to 0/1/2/4
only writes,
only in full
mode
range requires
2 breakpoints
up to 8
up to 8
range requires
2 breakpoints
up to 8
range requires
2 breakpoints
up to 8
range requires
2 breakpoints
150
Breakpoints
On-chip
Breakpoints
Instruction
Breakpoints
Read/Write
Breakpoint
Data Value
Breakpoints
Diamond
Cores
up to 2
range as bit mask
up to 2
range as bit mask
M8051EW
0, 1, 2 or 4
up to 4
up to 4 single
addresses for
read or write
range requires
2 breakpoints
or
2 single address
read/write,
max 1 read/write
range
same as
read/write
breakpoints
Family
151
Breakpoints
In most cases better feature can be provided, if ETM breakpoints are added to the Onchip breakpoints.
TRACE32 PowerView supports the usage of two ETM breakpoints.
ETM breakpoints can only be used by the TRACE32 debugger, if the ETM
provides address information on load/store operations (data address
information). For details refer to the chapter ETM Features and Settings in
training_arm_etm.pdf.
Since the ETM is configured via the JTAG interface, Read and Write
breakpoints from the ETM can be used by the TRACE32 debugger even if no
ETM AutoFocus preprocessor is connected.
152
Breakpoints
ReadWriteBreak ON
153
Breakpoints
154
Breakpoints
Breakpoint Types
TRACE32 PowerView provides the following breakpoint types for standard debugging.
Breakpoint Types
Possible Implementations
Program
Software (Default)
Onchip
Read, Write,
ReadWrite
Onchip (Default)
155
Breakpoints
Program Breakpoints
The red program breakpoint indicator marks all code lines for which a Program breakpoint is set.
The program stops before the instruction marked by the breakpoint is executed (break before make).
156
Breakpoints
Read/Write Breakpoints
Core stops at
a read access
to the variable
Core stops at
a write access
to the variable
On most core(s) the program stops after the read or write access (break after make).
157
Breakpoints
158
Breakpoints
Breakpoint Handling
Software breakpoints
If MemAccess and CPUAccess is Denied Software breakpoints can only be set when the
program execution is stopped.
The behavior of Onchip breakpoints is core dependent. E.g. on all ARM/Cortex cores Onchip breakpoints
can be set while the program execution is running.
159
Breakpoint Handling
Program restart
Program execution
Breakpoint hit
Perform
check
Check not ok
Check ok
Stop
Each stop to perform the check suspends the program execution for at least 1 ms.
The (short-time) display of a red S in the state line indicates that an intrusive breakpoint was hit.
160
Breakpoint Handling
161
Breakpoint Handling
or
162
Breakpoint Handling
(asm breakpoint)
HLL
Single Address
163
Breakpoint Handling
Complete Variable
HLL-Expression
164
Breakpoint Handling
Implementations
Implementation
Implementation
auto
SOFT
Onchip
165
Breakpoint Handling
Actions
By default the program execution is stopped when a breakpoint is hit (action stop). TRACE32 PowerView
provides the following additional reactions on a breakpoint hit:
Action (debugger)
Spot
Alpha
Beta
Charly
Delta
Echo
WATCH
Trigger the debug pin at the specified event (not available for all processor
architectures).
Alpha, Beta, Charly, Delta and Echo breakpoint are only used in very special cases. For this reason no
description is given in the general part of the training material.
166
Breakpoint Handling
Advise on-chip trace logic to generate trace information on the specified event.
TraceON
Advise on-chip trace logic to start with the generation of trace information at the
specified event.
TraceOFF
Advise on-chip trace logic to stop with the generation of trace information at the
specified event.
TraceTrigger
A detailed description for the Actions (on-chip and off-chip trace) can be found in the following manuals:
167
Breakpoint Handling
168
Breakpoint Handling
Options
Options
Temporary
DISable
DISableHIT
169
Breakpoint Handling
170
Breakpoint Handling
DATA Breakpoints
The DATA field offers the possibility to combine a Read/Write breakpoint with a specific data value.
Data breakpoints are implemented as real-time breakpoints if the core supports Data Value Breakpoints
(for details on your core refer to page 139). Otherwise an intrusive breakpoint is used (for details on the
intrusive DATA breakpoints refer to page 160)
171
Breakpoint Handling
172
Breakpoint Handling
If a hll expression is used TRACE32 PowerView gets the information if the data is written via a byte, word or
long access from the symbol information.
If an address or symbol is used the user has to specify the access width.
173
Breakpoint Handling
Advanced Breakpoints
174
Breakpoint Handling
TASK-aware Breakpoints
TASK-aware breakpoints allow to stop the program execution at a breakpoint if the specified task/process is
running.
TASK-aware breakpoints are implemented on most cores as intrusive breakpoints. A few cores support realtime TASK-aware breakpoints (e.g. ARM/Cortex). For details on the real-time TASK-aware breakpoints refer
to the description of the Break.Set command.
Intrusive TASK-aware Breakpoint
Processing:
Specified
task
running?
No
Yes
Each stop at the TASK-aware breakpoint takes at least 1.ms. This is why the red S is displayed in the
TRACE32 PowerView state line whenever the breakpoint is hit.
175
Breakpoint Handling
Example: Stop the program execution at the entry to the function Func_2 only if the task/process main is
running.
176
Breakpoint Handling
177
Breakpoint Handling
178
Breakpoint Handling
Example for ARM9: Stop the program execution at the entry to the function Func_2 only if main is running
(Onchip breakpoint).
179
Breakpoint Handling
Counter
Allows to stop the program execution on the n th hit of a breakpoint.
Software Counter
If the on-chip breakpoint logic of the core does not provide counters, counters are implemented as software
counters.
Processing:
Increment
counter
Counter
reached final
value?
No
Yes
Each stop at a Counter breakpoint takes at least 1.ms. This is why the red S is displayed in the TRACE32
PowerView state line whenever the breakpoint is hit.
180
Breakpoint Handling
Example: Stop the program execution after the function sieve was entered 1000. times.
181
Breakpoint Handling
182
Breakpoint Handling
On-chip Counter
The on-chip breakpoint logic of some cores e.g. MPC8xx, MPC5xx, MPC55xx, StarCore provides counters.
They are used together with Onchip breakpoints.
Example: Stop the program execution after the function sieve was entered 1000. times.
The counters run completely in real-time. No current counter value can be displayed while the program
execution is running. As soon as the counter reached its final value, the program execution is stopped.
183
Breakpoint Handling
CONDition
The program execution is stopped at the breakpoint only if the defined condition is true.
CONDition breakpoints are always intrusive.
Processing:
Evaluate
condition
Condition
is
true?
No
Yes
Each stop at a CONDition breakpoint takes at least 1.ms. This is why the red S is displayed in the TRACE32
PowerView state line whenever the breakpoint is hit.
184
Breakpoint Handling
Example: Stop the program execution on a write to flags[3] only if flags[12] is equal to 0 when the
breakpoint is hit.
185
Breakpoint Handling
186
Breakpoint Handling
CMD
The field CMD allows to specify one or more commands that are executed when the breakpoint is hit.
187
Breakpoint Handling
Example: Write the contents of flags[12] to a file whenever the write breakpoint at flags[12] is hit.
;open the file for writing
because the program execution is restarted before these commands are finished.
188
Breakpoint Handling
close #1
189
Breakpoint Handling
memory/register/var
The on-chip breakpoint logic of some CPUs allows to combine data accesses and instructions to form a
complex breakpoint (e.g. ARM or PowerArchitecture).
Preconditions
Harvard architecture.
The on-chip breakpoint logic supports a logical AND between Program and Read/Write
breakpoints.
Advantageous
190
Breakpoint Handling
Example: Stop the program execution when the function sieve writes a 1 to flags[3].
If your core does not support this feature, the radio buttons (MemoryWrite, MemoryRead etc.) are grey.
191
Breakpoint Handling
Exclude
192
Breakpoint Handling
193
Breakpoint Handling
If your TRACE32 PowerView does not accept the option EXclude, delete all other on-chip breakpoints, to
make sure that enough resources are available.
Set a breakpoint
194
Breakpoint Handling
address
types
impl
action
options
data
count
condition
cmd (command)
R (resume)
task
Break.List [/<option>]
195
Breakpoint Handling
Delete Breakpoints
Delete breakpoint
Enable/Disable Breakpoints
Enable breakpoint
Disable breakpoint
196
Breakpoint Handling
197
Breakpoint Handling
Debugging
Step
Over
Next
Next sets a temporary breakpoint to the next assembler or hll line and starts the
program execution. This command is useful to overstep a subroutine call or to
leave a loop.
Program Counter
198
Debugging
Return
Return sets a temporary breakpoint to the last instruction of a function and then
starts the program execution.
After pressing
Return the program
execution is stopped
at the last instruction
of the function
Up
This command is used to return to the function that called the current function.
For this a temporary breakpoint is set at the instruction directly after the function
call.
Press Up to return
to the function that
called the current
function
199
Debugging
Step <count>
Single step
Step.Change <expression>
Var.Step.Change <hll_expression>
Step.Over
Go [<address>|<label>]
Go.Next
Go.Return
Go.Up [<level>|<address>]
200
Debugging
Sample-based Profiling
Introduction
Task: get the percentage of time used by a high-level language function.
Measurement procedure: The Program Counter is sampled periodically. This is implemented in two ways.
Snoop: Processor architecture allows to read the Program Counter while the program execution
is running.
StopAndGo: The program execution is stopped shortly in order to read the Program Counter.
201
Sample-based Profiling
Standard Approach
Steps to be taken:
1.
PERF.state
The PERF METHOD Snoop is automatically selected, if the processor architecture supports reading
the Program Counter while the program execution is running. The default METHOD for all other
processor architectures is StopAndGo.
202
Sample-based Profiling
2.
PERF.OFF
3.
PERF.ListFunc
203
Sample-based Profiling
4.
The display of a red S in the TRACE32 state line indicates, that the program execution is periodically
interrupted by the sample-based profiling.
TRACE32 tunes the sampling rate so that more the 99% of the run-time is retained for the actual program
run (runtime). The smallest possible sampling rate is nevertheless 10 (snoops/s).
204
Sample-based Profiling
Details
In-depth Result
Push the Detailed button, to get more detailed information on the result.
PERF.ListFunc ALL
Name
Function name
WatchTIme
Ratio
DRatio
Address
Hits
205
Sample-based Profiling
(other)
TRACE32 assigns all samples that can not be assigned to a high-level language function to (other).
Especially if the ratio for (other) is quite high, it might be interesting what code is running there. In this case
pushing the button ListLABEL is recommended.
PERF.ListLABEL
206
Sample-based Profiling
207
WinPrint.Data.dump 0x1000--0x1fff
WinPrint.Trace.List (-1000.)--(-500.)
208
PRinTer.FileType <format>
209
WinPrint.Data.dump 0x1000++0xfff
210
If the file name includes a number, this number is automatically incremented after each output.
WinPrint.Data.dump 0x1000++0xfff
Go
Break
WinPrint.Data.dump 0x1000++0xfff
211
PRinTer.OPEN [<filename>]
PRinTer.CLOSE
PRinTer.OPEN outpd
WinPrint.Data.dump 0x1000++0xfff
Go
Break
WinPrint.Data.dump 0x1000++0xfff
PRinTer.CLOSE
212
213