Beruflich Dokumente
Kultur Dokumente
APS ...........................................................................................................................................
Warning ..............................................................................................................................
Troubleshooting ................................................................................................................
FAQ .....................................................................................................................................
SYStem.CONFIG
Multicore Example
9
11
SYStem.CPU
SYStem.CpuAccess
12
13
SYStem.JtagClock
14
14
SYStem.Mode
15
SYStem.LOCK
15
SYStem.MemAccess
SYStem.Option.IMASKASM
15
17
SYStem.Option IntelSOC
17
SYStem.Option.MonType
18
19
SYStem.Option.IMASKHLL
19
SYStem.Option.MonBase
Built-In Monitor
20
Custom Monitor
20
Breakpoints ........................................................................................................................
21
Software breakpoints
21
21
APS Debugger
22
22
Onchip.Mode
Quickstart
22
22
23
24
24
25
Support ...............................................................................................................................
Available Tools
26
26
Compilers
26
27
27
Products .............................................................................................................................
29
Product Information
29
Order Information
29
APS Debugger
APS Debugger
Version 24-May-2016
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.
APS Debugger
Warning
NOTE:
Disconnect the debug cable from the target while the target power is off.
Connect the host system, the TRACE32 hardware and the debug cable.
APS Debugger
Warning
Quick Start
Starting up the debugger is done as follows:
1.
Select the device prompt for the ICD Debugger and reset the TRACE32 development tool.
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.
2.
After choosing the CPU, the default values of all other options are automatically set in such a way that
it should be possible to work without modifying them. But please consider that this might not be the
optimal configuration for your target.
Note: For a multi-core target it is most likely necessary to configure the multi-core settings using
SYStem.CONFIG before continuing.
3.
The first command attaches the debugger to the running target. The second command stops the
target and enters debug mode. After these commands are executed it is possible to access memory
and registers.
A typical start sequence for the Cortus APS3 is shown below. This sequence can be written to an ASCII file
(script file) and executed with the command DO <filename>.
B::
RESet
WinClear
SYStem.CPU APS3S
; Select CPU
SYStem.Mode.Attach
APS Debugger
Quick Start
Break
Register.view /SpotLight
Data.List
*) These commands open windows on the screen. The window position can be specified with the WinPOS
command.
APS Debugger
Quick Start
Troubleshooting
Error Message
Event
Reason
SYStem.Mode.Up
SYStem.Mode.Go
SYStem.Mode.Attach
SYStem.Down
SYStem.Mode.Up
SYStem.Mode.Go
SYStem.Mode.Attach
SYStem.Mode.Up
SYStem.Mode.Go
SYStem.Mode.Attach
Warning: Standard
Cortus monitor not
found!
SYStem.Mode.Up
SYStem.Mode.Go
SYStem.Mode.Attach
SYStem.Mode.Up
SYStem.Mode.Go
SYStem.Mode.Attach
SYStem.Option.MonBase
No response from
monitor program, CPU
forced to stop
Break
APS Debugger
Troubleshooting
The number of
<number> accessed
bytes in memory is not a
multiple of the access
size <size> bytes.
No special event
Memory address
<address> is not aligned
to access size <size>.
No special event
No special event
No special event
Illegal instruction at
address <address>
SYStem.Mode.Go
Go
Step
SYStem.Mode.Go
Go
Step
Unknown interrupt
<integer>
Break
Breakpoint
FAQ
No information available
APS Debugger
FAQ
SYStem.CONFIG
Format:
SYStem.CONFIG <parameter>
<parameter>:
state
IRPRE <bits>
IRPOST<bits>
DRPRE <bits>
DRPOST <bits>
IRLength <bits>
MultiCoreLocal [ON | OFF]
CoreNumber <number>
TriState [ON | OFF]
Slave [ON | OFF]
TAPState <state>
TCKLevel <level>
The four parameters IRPRE, IRPOST, DRPRE, DRPOST are required to inform the debugger of the TAP
controller position in the JTAG chain if there is more than one core in the JTAG chain. The information is
required before the debugger can be activated, e.g., by a SYStem.Mode.Attach.
TriState has to be used if several debuggers are connected to a common JTAG port at the same time.
TAPState and TCKLevel define the TAP state and TCK level which is selected when the debugger switches
to tristate mode. Please note: nTRST must have a pull-up resistor on the target, TCK can have a pull-up or
pull-down resistor, other trigger inputs needs to be kept in inactive state.
state
DRPRE
DRPOST
APS Debugger
IRPRE
IRPOST
IRLength
MultiCoreLocal
CoreNumber
Defines the master in a multicore chip. Only one core can be the
master of the chip reset, the TAP reset and the chip initialization
features. All other cores are slave cores. (default: OFF)
TAPState
TCKLevel [0 | 1]
APS Debugger
10
Multicore Example
TDI
Core A
Core B
Core C
Chip 0
Core D
TDO
Chip 1
Assume you want to debug Core C. The instruction register lengths of the other cores are:
Core A: 3 bit
Core B: 5 bit
Core D: 6 bit
; IR Core D
SYStem.CONFIG.IRPOST 8
; IR Core A + B
SYStem.CONFIG.DRPRE 1
; DR Core D
SYStem.CONFIG.DRPOST 2
; DR Core A + B
APS Debugger
11
TapStates
0
Exit2-DR
Exit1-DR
Shift-DR
Pause-DR
Select-IR-Scan
Update-DR
Capture-DR
Select-DR-Scan
Exit2-IR
Exit1-IR
10
Shift-IR
11
Pause-IR
12
Run-Test/Idle
13
Update-IR
14
Capture-IR
15
Test-Logic-Reset
SYStem.CPU
Format:
SYStem.CPU <cpu>
<cpu>:
Default: APS3
Selects the processor type.
APS Debugger
12
SYStem.CpuAccess
Format:
Default: Denied.
Enable
Denied
Nonstop
Lock all features of the debugger, that affect the run-time behavior.
Nonstop reduces the functionality of the debugger to:
trace display
The debugger inhibits the following:
all features of the debugger that are intrusive (e.g. action Spot for breakpoints, performance analysis via StopAndGo mode, conditional breakpoints etc.)
APS Debugger
13
SYStem.JtagClock
Format:
Default: 1 MHz.
Selects the frequency for the debug interface. RTCK, ARTCK, CTCK and CRTCK are not supported.
SYStem.MemAccess
Format:
CPU
Denied
Default: Denied.
APS Debugger
14
SYStem.Mode
Format:
SYStem.Mode <mode>
<mode>:
Down
Go
Attach
Up
Down
Disables the debugger (default). The state of the CPU remains unchanged.
Go
Attach
Connects the debugger to the running target. The state of the CPU remains
unchanged.
Up
Resets the target and stops the CPU at the reset vector.
NoDebug
Not supported.
StandBy
Not supported.
Prepare
Not supported.
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.
SYStem.Option.IMASKASM
Format:
Default: OFF.
1989-2016 Lauterbach GmbH
APS Debugger
15
If enabled, the interrupt enable flag of the EFLAGS register will be cleared during assembler single-step
operations. After the single step the interrupt enable flag is restored to the value it had before the step.
APS Debugger
16
SYStem.Option.IMASKHLL
Format:
Default: OFF.
If enabled, the interrupt enable flag of the EFLAGS register will be cleared during HLL single-step
operations. After the single step the interrupt enable flag is restored to the value it had before the step.
SYStem.Option IntelSOC
Format:
Default: OFF.
Inform the debugger that the APS core is part of an Intel SoC. When enabled, all IR and DR pre/post
settings are handled automatically, no manuel configuration is necessary.
Requires that the APS debugger is slave in a multicore setup with x86 as the master debugger and that
SYStem.Option.CLTAPOnly is enabled in the x86 debugger.
APS Debugger
17
SYStem.Option.MonType
Format:
SYStem.Option.MonType <type>
<type>:
Cortus
Built-In
CUSTOM
Default: Cortus
Cortus
Built-In
CUSTOM
APS Debugger
18
MonBase
Non-volatile memory
consumed
Stack
usage
Miscellaneous
Cortus
72 bytes
0 .. 2^16-size
yes
0 bytes
Single stepping
not available in
startup code.
Built_In
300 bytes
0 .. 2^32-size
no
8 bytes
Single stepping
available on 3rd
instruction after
reset.
SYStem.Option.MonBase
Format:
SYStem.Option.MonBase <address>
Defines the base address of mirrored CPU registers in RAM. This option only becomes available if the builtin or custom monitor has been selected via SYStem.Option.MonType.
As a limiting characteristic of the APS3, the CPU registers (R0 to R15, RTT and PSR) cannot be accessed
via JTAG directly. Hence a monitor program has to forward all read- and write accesses from and to the CPU
registers. To be more precisely, the CPU registers are mirrored to a location in RAM.
APS Debugger
19
Based on the Cortus monitor, the structure of the mirrored registers must always be organized as follows:
MonBase
MonBase + 72.
R0
R1
R15
RTT
PSR
Built-In Monitor
A total of 228 instruction bytes are necessary for the built-in monitor to work. These instructions are
appended in RAM to the mirrored registers, resulting in a RAM usage of 300 bytes. Therefore no application
data should be placed within the address range of MonBase .. MonBase + 300. Additionally the application
must reserve 8 bytes of the stack for the built-in monitor.
Custom Monitor
As soon as the standard Cortus monitor is modified or replaced, the new monitor program should be
declared as custom with MonBase set accordingly.
Steps to write your own monitor program:
APS Debugger
20
Breakpoints
Software breakpoints
If a software breakpoint is set, the corresponding program code is replaced by a trap instruction. Thus
software breakpoints can only be applied to program code residing in a RAM.
There is no restriction in the number of software breakpoints.
APS Debugger
21
Breakpoints
Onchip Trace
Trace.METHOD.Onchip
This trace method can only be used if the APS3 core features a trace module and trace buffer. Otherwise the
activation of the onchip trace might result in an undefined behavior of the APS3.
Onchip.Mode
De
Format:
Onchip.Mode <mode>
<mode>:
PcOnly
PcRegs
Default: PcOnly
PcOnly
PcRegs
Quickstart
The onchip trace is automatically initialized on activation and is ready for use instantly.
If the onchip mode is changed, the trace must be reset via Onchip.RESet.
Onchip.List displays the reconstructed program flow. If the trace mode is PcOnly, interrupt
addresses cannot be determined exactly. Interrupt labels in the trace window then are placed
right before the next branch, jump, call, etc. instruction, which will be incorrect in most cases.
APS Debugger
22
Onchip Trace
Memory Classes
The following memory access rights classes are available:
Access Class
Description
Data
Program
ED
EP
APS Debugger
23
Memory Classes
JTAG Connector
Pin
1
3
5
7
9
11
13
15
17
19
Pin
2
4
6
8
10
12
14
16
18
20
Signal
VSUPPLY (not used)
GND
GND
GND
GND
GND
GND
GND
GND
GND
APS Debugger
24
JTAG Connector
Pin
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
45
47
49
51
53
55
57
59
Pin
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
54
56
58
60
Signal
GND
N/C
N/C
GND
N/C
N/C
GND
N/C
N/C
GND
N/C
N/C
GND
N/C
N/C
GND
N/C
N/C
GND
N/C
N/C
N/C
RESETDBRGND
TDO
TRSTTDI
TMS
GND
APS Debugger
25
JTAG Connector
Support
APS3
APS3B
APS3BS
APS3S
INSTRUCTION
SIMULATOR
POWER
INTEGRATOR
ICD
TRACE
ICD
MONITOR
ICD
DEBUG
FIRE
ICE
CPU
Available Tools
YES
YES
YES
YES
Compilers
Language
Compiler
Company
Option
C++
APS3C++
Cortus S.A.
ELF/DWARF
Comment
APS Debugger
26
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
APS Debugger
27
Support
APS Debugger
28
Support
Products
Product Information
OrderNo Code
Text
LA-3778
JTAG-APS-60
LA-3785
JTAG-APS-20
LA-3778A
JTAG-APS-A
Order Information
Order No.
Code
Text
LA-3778
LA-3785
LA-3778A
JTAG-APS-60
JTAG-APS-20
JTAG-APS-A
APS Debugger
29
Products