Debugger m32r
Debugger m32r
Debugger m32r
M32R .........................................................................................................................................
Warning ..............................................................................................................................
Troubleshooting ................................................................................................................
SYStem.Up Errors
FAQ .....................................................................................................................................
10
Configuration .....................................................................................................................
12
13
13
13
13
SYStem.CPU
SYStem.CpuAccess
SYStem.JtagClock
SYStem.LOCK
SYStem.MemAccess
SYStem.Mode
SYStem.Option IMASKASM
14
15
15
16
16
16
17
17
SYStem.Option
SYStem.Option DBI
SYStem.Option IMASKHLL
17
SYStem.Option KEYCODE
Code protection
18
19
19
20
SYStem.Option TriState
SYStem.state
SYStem.Option BTM
SYStem.Option DTM
20
20
SYStem.Option STALL
20
SYStem.Option TRCLK
21
21
TrOnchip ............................................................................................................................
22
SYStem.Option TRDATA
TrOnchip.CONVert
22
23
23
23
24
TrOnchip.RESet
TrOnchip.VarCONVert
TrOnchip.view
Security Level
24
25
26
27
27
28
28
28
29
31
Support ...............................................................................................................................
32
Available Tools
32
Compilers
32
32
33
Products .............................................................................................................................
34
Product Information
34
Order Information
34
General Note
This documentation describes the processor specific settings and features for TRACE32-ICD for the
following Renesas M32R CPU families:
If some of the described functions, options, signals or connections in this Processor Architecture Manual are
only valid for a single CPU or for specific families, the names of the families are added in brackets.
Debugger Basics - Training (training_debugger.pdf): Get familiar with the basic features of a
TRACE32 debugger.
Architecture-specific information:
Processor Architecture Manuals: These manuals describe commands that are specific for the
processor architecture supported by your debug cable. To access the manual for your processor
architecture, proceed as follows:
-
RTOS Debugger (rtos_<x>.pdf): TRACE32 PowerView can be extended for operating systemaware debugging. The appropriate RTOS manual informs you how to enable the OS-aware
debugging.
General Note
Warning
NOTE:
Disconnect the debug cable from the target while the target power is
off.
2.
Connect the host system, the TRACE32 hardware and the debug
cable.
3.
4.
5.
6.
7.
Power down:
1.
2.
3.
4.
Warning
Quick Start
Starting up the debugger is done as follows:
Select the device prompt for the ICD Debugger and reset the system.
b::
RESet
The device prompt B:: is normally already selected in the command line. If this is not the case enter B:: to
set the correct device prompt. The RESet command is only necessary if you do not start directly after
booting the TRACE32 development tool.
5.
The default values of all other option are set in such a way that it should be possible to work without
modification. Please consider that this is probably not the best configuration for your target.
6.
Normally the default value is 10.0 MHz, but the it can be increased up to 25 MHz.
7.
Inform the debugger about read only and none-readable address ranges (ROM, FLASH).
MAP.DenyAccess
MAP.NoDenyAccess <range>
MAP.BOnchip <range>
The BreakOnchip information is necessary to decide where on-chip breakpoints must be used. Onchip breakpoints are necessary to set program breakpoints to FLASH/ROM. The sections of FLASH
and ROM depend on the specific CPU and its chip selects. Accesses to invalid addresses can cause
unrecoverable bus errors. To avoid bus errors from the debugger side use the subcommands of MAP
to define inaccessible memory areas. Bus errors can be removed by executing SYStem.Up. Make
sure that there isnt any T32 window open which accesses to a inaccessible memory that is not
masked out, otherwise the bus error can occur again.
Quick Start
8.
This command resets the CPU and enters debug mode. After this command is executed it is possible
to access memory and registers.
9.
10.
The format of the Data.LOAD command depends on the file format generated by the compiler. Refer
to Supported Compilers to find the command, that is necessary for your compiler. It is
recommended to use the option/verify that verifies all written data. This test discovers a problem with
the electrical connection, wrong chip configurations or linker command file settings.
For a detailed description of the Data.LOAD command and all available options see Data in
General Commands Reference Guide D (general_ref_d.pdf).
Quick Start
A typical start sequence for the MSC8101 is shown below. This sequence can be written to an ASCII file
(script file) and executed with the command DO <filename>. Other sequences can be found on the
TRACE32 Product Software CD in the DEMO directory ~~\demo\m32r.
b::
WinClear
SYS.CPU M32196
; Select CPU
SYS.JC 15000000.
SYS.UP
MAP.DENYACCESS
MAP.BONCHIP 0x0000--0x007FFF
; ROM
Go main
Data.List
Register /SpotLight
Var.Local
Quick Start
Troubleshooting
SYStem.Up Errors
The SYStem.Up command is the first command of a debug session where communication with the target is
required. If you receive error messages while executing this command this may have the following reasons.
The pull-up resistor between the JTAG[VCCS] pin and the target VCC is too large.
D:XXXXXXXX
and
bus error generated by CPU
When a unrecoverable bus error occurs the target processor has to be reset.
Troubleshooting
FAQ
Debugging via
VPN
10
FAQ
Setting a
Software
Breakpoint fails
M32R
Compiler
Option for
Debug
Information
Why can I get just symbols and no code information loading a DWARF/ELF
file generated by Greenhills Compiler?
Greenhills has (at least for some families) a special compiler switch to generate
debug info in
ELF/DWARF format. Usually this is called "-dual_debug".
11
FAQ
Configuration
HUB
PC or
Workstation
Target
Debug Cable
PODBUS IN
TRIG
POWER
LAUTERBACH
RECEIVE
COLLISION
PODBUS OUT
JTAG
Connector
ETHERNET
CON ERR
DEBUG CABLE
TRIGGER
TRANSMIT
POWER
7-9 V
LAUTERBACH
EMULATE
RECORDING
DEBUG CABLE
SELECT
USB
Ethernet
Cable
AC/DC Adapter
HUB
PC or
Workstation
Target
PODBUS IN
TRIG
NEXUS Adapter
SELECT
DEBUG CABLE
RECORDING
TRIGGER
TRANSMIT
NEXUS ADAPTER
LAUTERBACH
LAUTERBACH
PODBUS OUT
CABLE
CBA
COLLISION
LAUTERBACH
ETHERNET
CON ERR
RECEIVE
POWER
7-9 V
JTAG NEXUS
Connector
EMULATE
USB
Ethernet
Cable
POWER
AC/DC Adapter
12
Configuration
NOTE:
All trace related settings described here are only relevant, if the device provides
trace capabilities!
Trace features can only be used, if a special device and /or a special adapter board (Pitch-Converter) is
used. Both products are provided by Renesas.
SYStem.BdmClock
Obsolete command syntax. It has the same effect as SYStem.JtagClock. Use SYStem.JtagClock instead.
SYStem.CONFIG
SYStem.CPU
Format:
SYStem.CPU <cpu>
<cpu>:
13
SYStem.CpuAccess
Format:
SYStem.CpuAccess <mode>
<mode>:
Enable
Denied
Nonstop
Default: Denied.
Enable
Enable the CPU access to perform an update of the memory displayed in the
TRACE32 window. The debugger performs following: Stop program execution,
switch to debug mode, update memory, restart program execution. Stopping of
program execution is performed about 10 times/s. Each short stop takes
1 100 ms depending on the speed of the debug interface and on the size of
the read/write accesses required.
The run-time memory access has to be activated for each window by using the
memory class E: (e.g. Data.dump E:0x100) or by using the format option %E
(e.g. Var.View %E var1).
Denied
Nonstop
Stops the program execution. Debugger does not affect the real-time behavior
of the CPU.
Nonstop reduces the functionality of the debugger to:
Run-time access to memory and variables
Trace display
The debugger inhibits the following:
To stop the program execution
All features of the debugger that are intrusive (e.g. spot breakpoints,
performance analysis via StopAndGo, conditional break points etc.)
14
SYStem.JtagClock
Format:
SYStem.JtagClock [<frequency>]
<frequency>
6 kHz25 MHz
1250000. | 2500000. | 5000000. | 10000000.
SYStem.LOCK
Format:
Default: OFF.
If the system is locked, no access to the debug port will be performed by the debugger. While locked, the
debug connector of the debugger is tristated. The main intention of the lock command is to give debug
access to another tool.
The command has no effect for the simulator.
15
SYStem.MemAccess
Format:
SYStem.MemAccess <mode>
<mode>:
CPU
Denied
Default: CPU.
CPU
Denied
SYStem.Mode
Format:
SYStem.Mode <mode>
<mode>:
Down
Up
Down
Disables the debugger (default). The state of the CPU remains unchanged. The
JTAG port is tristated if System.Option Tristate is checked.In other case the
debugger drives JTAG signals and Reset.
Up
Resets the target, sets the CPU to debug mode and stops the CPU. After the
execution of this command the CPU is stopped and all register are set to the
default level.
SYStem.Option
16
SYStem.Option DBI
Format:
Default: OFF.
When DBI is ON, the chip will stop faster rather than via SW control, provided the CPU offers DBI capability.
SYStem.Option IMASKASM
Format:
Default: OFF.
If enabled, the interrupt mask bits of the CPU will be set during assembler single-step operations. The
interrupt routine is not executed during single-step operations. After single step the interrupt mask bits are
restored to the value before the step.
SYStem.Option IMASKHLL
Format:
Default: OFF.
If enabled, the interrupt mask bits of the CPU will be set during HLL single-step operations. The interrupt
routine is not executed during single-step operations. After single step the interrupt mask bits are restored to
the value before the step.
17
SYStem.Option KEYCODE
Format:
Code protection
By default use:
SYS.OPTION KEYCODE 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF\
0xFF 0xFF
If the device is blank, the debugger automatically uses 12 time 0xFF per default. Then no SYS.OPTION
KEYCODE command is needed. The number and location of bytes depends on the use MCU. It is normally
hard coded!
; Source code example for Renesas Compiler (CPU 32192, code location
; 0x00084)
.SECTION PROTECTID, DATA, ALIGN=1
; H'0000 0084 Protect ID
.DATA.B H'FF
.DATA.B H'FF,H'FF,H'FF,H'FF,H'FF,H'FF,H'FF
.DATA.B H'FF,H'FF,H'FF,H'FF
18
SYStem.Option TriState
Format:
Default: OFF.
If this option is OFF the JTAG signals and nRST line are never driven by the debugger.
SYStem.state
Format:
SYStem.state
19
SYStem.Option BTM
Format:
Default: ON.
The option can be switched when the chip has trace support. When BTM is ON, the chip delivers program
trace messages.
SYStem.Option DTM
Format:
Default: OFF.
The option can be used if the chip has trace support. When the option is set to READ|WRITE|READWRITE,
the CPU generates data trace messages, according to the selected access type.
SYStem.Option STALL
Format:
Default: OFF.
The option can be set when the chip has trace support and defines the behavior that becomes active when
the chip intern trace message FIFO buffer gets full. Stall OFF will cause losing of messages when the buffer
overruns.
20
SYStem.Option TRCLK
Format:
Default: 1/2.
The option can be set when the chip has trace support and defines the frequency of the trace output clock
based on the processor frequency. High frequencies can cause electrical connection problems during the
record of trace messages.
SYStem.Option TRDATA
Format:
SYStem.Option TRDATA [4 | 8]
Default: 8.
The option can be set when the chip has trace support and defines port width of the trace data. The
maximum is defined by the derivatives maximum trace pin count.
21
TrOnchip
The OCE unit of the M32R allows to set on-chip breakpoints. The registers are controlled by TRACE32.
TRACE32 uses the on-chip trigger registers to perform on-chip breakpoints, which can be set in the
Data.List window or in the dialog Breakpoint.Set. The current user interface of TRACE32 offers many
possible configurations of the OCE unit. However the usable number of breakpoints is depending on the
device.
The amount of range breakpoints is limited, thats why it is sometimes useful to set the TrOnchip.CONvert
option. When enabled, this option let transform range breakpoints into normal, if necessary. The OCE can
perform more operations than TRACE32 offers with its user interface e.g. build a chain of breakpoints.
The on-chip trigger unit events can be also used to control the trace. The possible actions can be defined in
the Breakpoint.Set dialog. To control the trace unit an appropriate action has to be chosen for the Break.Set
command.
b.s flags /TraceData
On-chip Breakpoints can stimulate the EVENT0 2 pins. These signals can be used as input events for the
Simple Trigger Unit (STU).
TrOnchip.CONVert
Format:
When enabled (default) the on-chip breakpoints are automatically converted from a range to a single
address if required. If the switch is off, the system will only accept breakpoints which exactly fit to the on-chip
breakpoint hardware.
1989-2016 Lauterbach GmbH
22
TrOnchip
TrOnchip.RESet
Format:
TrOnchip.RESet
TrOnchip.VarCONVert
Format:
When enabled (default) the on-chip breakpoints are automatically converted from a range to a single
address if required. If the switch is off, the system will only accept breakpoints which exactly fit to the on-chip
breakpoint hardware.
The ICE-breaker does not provide resources to set an on-chip breakpoint to an address range. Only bit
masks can be used to mark a memory range with a breakpoint.
If TrOnchip.VarCONVert is set to ON and a breakpoint is set to a scalar variable then it is converted into a
single address breakpoint.
If TrOnchip.VarCONVert is set to OFF variable breakpoints will be set to an address range covering the
whole variable.
TrOnchip.view
Format:
TrOnchip.view
Control panel to configure the on-chip breakpoint and trace registers. The details are described in section
TrOnchip.
23
TrOnchip
Security Level
Depending on the verification result and the security level, the following
accesses to the device is possible:
24
Another way is to clear the flash memory of the CPU by using the instruction
/unsecure.
Now the device is open with a cleared Flash RAM.
The JTAG clock must be limited to 1/2 of the M32 core clock.
Buffers, additional loads or high capacities on the JTAG/COP lines reduce the
debug speed.
Trace related options only in case the device provides Trace capabilities.
25
An external WDT must normally be turned off. For the case that it
is not possible, there are 2 solutions.
1. For the case the WDT can be feed by toggling a CPU pin:
DIAG 0x3000 0xEA <pin> (Example: DIAG 0x3000 0xEA
124.)
DIAG 0x3000 0xEB <0/1> (Example DIAG: 0x3000 0xEB 1 for
on)
2. For the case the WDT must be feed by anyhow:
Refer to DATA.TIMER.SEQUENCE and similar instructions
By default external WDT support is not enabled.
26
F48
F16
F32
NOTE:
Fractional floating point numbers are always displays with a fixed precision, i.e. a
fixed number of digits. Small fractional numbers can have many non relevant digits
displayed.
TByte
Long
HByte
Quad
27
JTAG Connection
Pin
1
3
5
7
9
Pin
2
4
6
8
10
Signal
GND
TDO
TRSTVCCTRB (trace buffer)
RST-
This is a standard 10 pin double row connector (pin to pin spacing: 0.100 in.). We strongly recommend to
use a connector on your target with housing and having a center polarization (e.g. AMP: 2-827745-0). A
connection the other way around indeed causes damage to the output driver of the debugger.
RST, TDI, TMS, TCK: In normal operation mode the driver is enabled, but it can be disabled to
give another tool access to the JTAG port. In environments where multiple tools can access the
JTAG port, it is required that there is a pull-up or pull-down resistor at TCK. This is to ensure that
TCK maintains its level during a hand over between different tools.
RST (reset) is used by the debugger to reset the target CPU or to detect a reset on the target. It
is driven by an open collector buffer. A pull-up resistor is included in the ICD connector. The
debugger will only assert a pulse on nSRST when the SYStem.UP, the SYStem.Mode Go or the
SYStem.RESetOUT command is executed.
DBI is an output which can force the CPU into debug mode by hardware.
VCCTRB is an output and supplies the trace date buffer on the target. Normally 1.8 V.
N/C (= Vsupply) is not connected in the ICD. This pin is used by debuggers of other
manufacturers for supply voltage input. The ICD is self-powered.
28
JTAG Connection
Pin
1
3
5
7
9
11
13
15
17
19
Pin
2
4
6
8
10
12
14
16
18
20
Signal
VSS
TRDATA0
VSS
TRDATA3
TRDATA4
VSS
TRDATA7
EVENT0
EVENT2
N/C
This connector is the standard for single M32R targets. For pure debug features, this connector is not
needed. Not using this connector does not impact debug features at all.
Pins
Connection
Description
Recommendations
TRCLK
Trace Clock
VSS
TRSYNC
TRace Sync.
TRDATA0
Trace data 0
TRDATA1
Trace data 1
VSS
TRDATA2
Trace data 2
TRDATA3
Trace data 3
VSS
10
TRDATA4
Trace data 4
11
TRDATA5
Trace data 5
12
VSS
13
TRDATA6
Trace data 5
14
TRDATA7
Trace data 6
29
JTAG Connection
15
VCC
Target VCC
16
EVENT0
Event output
17
EVENT1
Event output
18
EVENT2
Event output
19
EVENT3
Event output
20
N/C
30
JTAG Connection
Memory Classes
Memory Class
Description
D,C
Program memory.
31
Memory Classes
Support
M32176
M32180
M32192
YES
YES
YES
INSTRUCTION
SIMULATOR
POWER
INTEGRATOR
ICD
TRACE
ICD
MONITOR
ICD
DEBUG
FIRE
ICE
CPU
Available Tools
YES
YES
YES
Compilers
Language
Compiler
Company
Option
GNU-C
ELF/DWARF2
CC32R
D-CC
Free Software
Foundation, Inc.
Renesas Technology,
Corp.
Wind River Systems
Comment
ELF/DWARF
ELF/DWARF
Company
Comment
OSEK
ProOSEK
RTXC Quadros
via ORTI
via ORTI
32
Support
Tool
Company
ALL
ALL
ALL
ADENEO
X-TOOLS / X32
CODEWRIGHT
ALL
CODE CONFIDENCE
TOOLS
CODE CONFIDENCE
TOOLS
EASYCODE
ECLIPSE
RHAPSODY IN MICROC
RHAPSODY IN C++
CHRONVIEW
LDRA TOOL SUITE
UML DEBUGGER
Adeneo Embedded
blue river software GmbH
Borland Software
Corporation
Code Confidence Ltd
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ALL
ATTOL TOOLS
VISUAL BASIC
INTERFACE
LABVIEW
CODE::BLOCKS
C++TEST
RAPITIME
DA-C
TRACEANALYZER
SIMULINK
TA INSPECTOR
UNDODB
VECTORCAST UNIT
TESTING
VECTORCAST CODE
COVERAGE
WINDOWS CE PLATF.
BUILDER
Host
Windows
Windows
Windows
Linux
EASYCODE GmbH
Eclipse Foundation, Inc
IBM Corp.
IBM Corp.
Inchron GmbH
LDRA Technology, Inc.
LieberLieber Software
GmbH
MicroMax Inc.
Microsoft Corporation
Windows
Windows
Windows
Windows
Windows
Windows
Windows
Windows
Windows
NATIONAL
INSTRUMENTS
Corporation
Open Source
Parasoft
Rapita Systems Ltd.
RistanCASE
Symtavision GmbH
The MathWorks Inc.
Timing Architects GmbH
Undo Software
Vector Software
Windows
Windows
Windows
Windows
Windows
Windows
Windows
Linux
Windows
Vector Software
Windows
Windows
Windows
33
Support
Products
Product Information
OrderNo Code
Text
LA-7661
DEBUG-M32R
LA-7662
AD-HS-10-M32R
Order Information
Order No.
Code
Text
LA-7661
LA-7662
DEBUG-M32R
AD-HS-10-M32R
34
Products