General Commands Reference Guide F

General Commands Reference Guide F
General Commands Reference Guide F
TRACE32 Online Help
TRACE32 Directory
TRACE32 Index
TRACE32 Documents ......................................................................................................................

General Commands ......................................................................................................................

General Commands Reference Guide F ...................................................................................
1
FDX ...........................................................................................................................................
8
Trace Methods
8
Trace Method FDX
9
FDX.METHOD
FDX.Arm
FDX.AutoArm
FDX.AutoFocus
Select communication channel
10
Arm the trace
11
Arm automatically
11
Calibrate AUTOFOCUS preprocessor
11
Automatic initialization
11
FDX.AutoTEST
Continuous measurement
11
FDX.BookMark
Set a bookmark in trace listing
11
Display trace contents graphically
11
Distribution display
12
Function activity chart
12
Group activity chart
12
Graphical HLL lines analysis
12
Symbol analysis
12
Task activity chart
12
FDX.Chart.TASKFunc
Task related function run-time analysis (legacy)
12
FDX.Chart.TASKSRV
Service routine run-time analysis
13
FDX.Chart.TASKState
Task state analysis
13
Variable activity chart
13
Clear FDX communication buffers
13
FDX.AutoInit
FDX.Chart
FDX.Chart.DistriB
FDX.Chart.Func
FDX.Chart.GROUP
FDX.Chart.Line
FDX.Chart.sYmbol
FDX.Chart.TASK
FDX.Chart.VarState
FDX.CLEAR
FDX.CLOSE
FDX.ComPare
FDX.DISable
FDX.DISableChannel
FDX.DRAW
13
Disable the trace
13
Disable FDX communication
14
Visualization of trace data
14
14
Export trace data for processing in other applications
14
Load a file into the file trace buffer
14
Find specified entry in trace
14
Find all specified entries in trace
14
FDX.FILE
FDX.Find
FDX.FindAll
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
13
Enable FDX communication
FDX.ENableChannel
FDX.EXPORT
Close FDX files
Compare trace contents
1
FDX.FindChange
Search for changes in trace flow
14
Move cursor to specified trace record
15
Inchannel state display
15
FDX.Init
Initialize trace
15
FDX.List
List trace contents
15
FDX.GOTO
FDX.InChannel
FDX.ListNesting
Analyze function nesting
15
List variable recorded to trace
15
FDX.LOAD
Load trace file for off-line processing
15
FDX.Mode
Set the trace operation mode
15
Switch off
16
tbd.
16
Profile charts
16
FDX.PROfileChart.DIStance
Time interval for a single event
16
FDX.PROfileChart.DURation
Time between two events
16
Group profile chart
16
Event frequency
16
Graphic display for user-defined protocol
17
FDX.ListVar
FDX.OFF
FDX.Out
FDX.PROfileChart
FDX.PROfileChart.GROUP
FDX.PROfileChart.Rate
FDX.PROTOcol.Chart
Graphic display for user-defined protocol
17
FDX.PROTOcol.EXPORT
FDX.PROTOcol.Draw
Export trace buffer for user-defined protocol
17
FDX.PROTOcol.Find
Find in trace buffer for user-defined protocol
17
FDX.PROTOcol.List
Display trace buffer for user-defined protocol
17
FDX.PROTOcol.STATistic
Display statistics for user-defined protocol
17
FDX.Rate
Select sampling rate
17
FDX.REF
Set reference point for time measurement
18
FDX.RESet
Reset command
18
FDX.SAVE
Save trace for postprocessing in TRACE32
18
Automatic restart of trace recording
18
Define buffer size
18
Restart trace capturing once
18
FDX.SelfArm
FDX.SIZE
FDX.SnapShot
FDX.state
Display trace configuration window
18
Statistic analysis
18
Time interval for a single event
19
Distribution analysis
19
FDX.STATistic
FDX.STATistic.DIStance
FDX.STATistic.DistriB
FDX.STATistic.DURation
Time between two events
19
Nesting function runtime analysis
19
Group run-time analysis
19
Ignore false records in statistic
19
Statistics interrupt processing
19
HLL-Line analysis
20
FDX.STATistic.LINKage
Per caller statistic of function
20
FDX.STATistic.Measure
Analyze the performance of a single signal
20
FDX.STATistic.Func
FDX.STATistic.GROUP
FDX.STATistic.Ignore
FDX.STATistic.InterruptIsFunction
FDX.STATistic.Line
FDX.STATistic.PreFetch
FDX.STATistic.Sort
Prefetch detection
20
Specify sorting criterion for statistic commands
20
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
2
FDX.STATistic.sYmbol
Flat run-time analysis
FDX.STATistic.TASK
20
Task activity statistic
20
FDX.STATistic.TASKFunc
Task specific function run-time analysis
21
FDX.STATistic.TASKKernel
Task analysis with kernel markers (flat)
21
FDX.STATistic.TASKSRV
Analysis of time in OS service routines
21
FDX.STATistic.TASKState
Performance analysis
21
Tree display of task specific functions
21
Tree display of nesting function run-time analysis
21
Use records
21
FDX.STATistic.TASKTREE
FDX.STATistic.TREE
FDX.STATistic.Use
FDX.TimeStamp
Configure timestamp usage of LOGGER trace
22
Waveform of trace buffer
22
tbd.
22
Set tracking record
22
FDX.Timing
FDX.TraceChannel
FDX.TRACK
FDX.View
Display single record
22
Align timestamps of trace and timing analyzers
22
FIFO ..........................................................................................................................................
23
FDX.ZERO
FIFO
Display on-chip trace FIFO
23
FLAG .........................................................................................................................................
24
Flag System of TRACE32-ICE
24
Applications
25
Problems
25
Flag System of TRACE32-FIRE
26
Applications
26
Problems
26
FLAG.Delete
Delete flags
26
FLAG.Init
Initialization
27
FLAG.List
Display flags
27
FLAG.ListFunc
Code-coverage functions
28
FLAG.ListModul
Code-coverage modules
31
FLAG.ListVar
Code-coverage variables
33
FLAG.OFF
Switch-off flag system
35
FLAG.ON
Switch-on flag system
36
Reset
36
Set
36
Mark sections
37
State
37
FLAG.RESet
FLAG.Set
FLAG.SetSec
FLAG.state
FLASH ......................................................................................................................................
FLASH
39
External FLASH memories and on-chip FLASH memories
39
Auto programming of FLASH
40
Enables FLASH access via boundary scan
41
FLASH.AUTO
FLASH.BSDLaccess
FLASH.CFI
Generate FLASH declaration by CFI
42
Changes the FLASH type
46
FLASH.CHANGEtype
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
3
FLASH.CLocK
Setup input clock for processor internal flash
47
FLASH.Create
Declare FLASH
48
Create address alias
53
FLASH.Delete
Delete entry in FLASH declaration table
54
FLASH.Erase
Erase FLASH
55
Display FLASH definition table
56
Lock FLASH
57
Simultaneous programming of flash sectors
58
Change FLASH control address
58
FLASH.CreateALIAS
FLASH.List
FLASH.LOCK
FLASH.MultiProgram
FLASH.OFFSET
FLASH.Program
FLASH.ReProgram
FLASH.RESet
FLASH.state
FLASH.TARGET
Program FLASH
59
Re-program FLASH
60
Reset FLASH declaration table
61
FLASH programming dialog
62
Define target controlled algorithm
63
Define second target controlled algorithm
70
Unlock FLASH
71
Unsecure a device
73
FLASHFILE ...............................................................................................................................
74
FLASH.TARGET2
FLASH.UNLOCK
FLASH.UNSECUREerase
FLASHFILE
FLASHFILE.BSDLaccess
NAND flash and serial flash devices
74
Enables FLASH access via boundary scan
74
Define FLASH type
75
Configure FLASH
75
FLASHFILE.BSDLFLASHTYPE
FLASHFILE.CONFIG
NAND FLASH
75
Serial FLASH
76
FLASHFILE.COPY
FLASHFILE.COPYSPARE
Copy to FLASH
76
Copy to spare area of NAND FLASH
77
FLASHFILE.Create
Declaration of flash memories: create a block/sector
78
FLASHFILE.DUMP
Dump FLASH
79
FLASHFILE.Erase
Erase FLASH
80
Get the bad block addresses
81
Get the extended CSD register
81
Get ID
82
Display ONFI
82
List blocks or sectors of FLASH memory
83
FLASHFILE.GETBADBLOCK
FLASHFILE.GETEXTCSD
FLASHFILE.GETID
FLASHFILE.GETONFI
FLASHFILE.List
FLASHFILE.LOAD
Load files to FLASH
84
FLASHFILE.LOAD.binary
Write FLASH
84
FLASHFILE.LOAD.Elf
Load ELF file
87
Load Intel hex file
87
FLASHFILE.LOAD.IntelHex
FLASHFILE.LOAD.Srecord
FLASHFILE.LOADALL
FLASHFILE.LOADECC
FLASHFILE.LOADSPARE
FLASHFILE.LOCK
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
4
Load an “Srecord” file
88
Load to main area and spare area
88
Load ECC file to spare area
89
Write NAND FLASH spare area
91
Lock the FLASH device
91
FLASHFILE.MSYSDLL
Access an M-Systems DiskOnChip flash device
92
FLASHFILE.RESet
Reset FLASH configuration
92
FLASHFILE.SAVE
Save FLASH
93
FLASHFILE.SAVEALL
Save the main area and the spare area
93
FLASHFILE.SAVEECC
Save error correction code (ECC) to file
94
FLASHFILE.SAVEECC.BCH
FLASHFILE.SAVEECC.hamming
Save ECC with BCH algorithm
94
Save ECC with Hamming algorithm
97
Save ECC with Reed-S. algorithm
100
Read NAND FLASH spare area
102
FLASHFILE.SAVEECC.ReedSolomon
FLASHFILE.SAVESPARE
FLASHFILE.Set
Modify FLASH data
102
Modify the extended CSD register
103
tbd.
103
FLASHFILE.TARGET
Define target controlled algorithm
104
FLASHFILE.UNLOCK
Unlock FLASH device
105
FLASHFILE.SETEXTCSD
FLASHFILE.state
FPU ...........................................................................................................................................
FPU
106
Access to the FPU registers
106
FPU.OFF
FPU access off
106
FPU.ON
FPU access on
107
FPU.RESet
Reset command
107
Modify FPU registers
107
Define FPU access agent
108
Display FPU registers
108
Frame ........................................................................................................................................
109
FPU.Set
FPU.TARGET
FPU.view
Frame
Call tree and context
109
Fine-tune stack unwinding
109
Frame.CONFIG.Asm
Frame back-trace mode
109
Frame.CONFIG.EABI
Use chained frame pointers
110
Frame.CONFIG.EPILOG
Use epilog code for frame display
110
Frame.CONFIG.PROLOG
Use prolog code for frame display
111
Frame.CONFIG.RELOAD
Generate frame information again
111
Use symbol code for frame display
112
Frame.CONFIG
Frame.CONFIG.sYmbol
Frame.COPY
Copy to TRACE32 registers
112
Frame.Down
Go down in stack nesting
113
Change source code view temporarily
113
Initialize the processor registers
114
Frame.GOTO
Frame.Init
Frame.REDO
Recover from UNDO registers
117
Frame.SkipFunc
Change view to previous/subsequent function
117
Frame.SkipLine
Change view to previous/subsequent HLL line
118
Swap TRACE32 registers
118
Change view to specified task
118
Recover previous registers
120
Frame.Up
Go up in stack nesting
120
Frame.view
Variable stack nesting
122
Frame.SWAP
Frame.TASK
Frame.UNDO
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
5
Usage:
(B) command only available for ICD
(E) command only available for ICE
(F) command only available for FIRE
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
6
General Commands Reference Guide F
Version 29-Mar-2017
18-Jan-17
Added description and example for the new LAYOUT option of the FLASHFILE.SAVEECC.*
commands; for details, see FLASHFILE.SAVEECC.hamming. Updated
FLASH.CHANGEtype.
18-Nov-16
Added an illustration of the BSPLIT option for the commands FLASH.Create and
FLASH.CFI.
10-Jan-16
New commands Frame.CONFIG.EABI and FLASH.TARGET2.
11-Nov-15
Added description and example for FLASHFILE.LOAD.Elf.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
7
FDX
Trace Methods
The command Trace is a general command for trace configuration and trace display. It is available for all kind
of trace methods provided by TRACE32. The following trace methods are available:
•
Analyzer
•
ART
•
FDX
•
Integrator
•
LA
•
LOGGER
•
Onchip
•
Probe
•
PORT
•
RTS
•
SNOOPer
The currently used trace method is displayed under METHOD in the Trace.state window.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
8
FDX
Trace Method FDX
The trace method FDX is mainly used for TRACE32-ICD without a trace extension.
Problem description: A TRACE32-ICD debugger is used to test and integrate an application program on
the target. Now a problem occurs, that could easily be solved if more information about the program history
would be available.
Usually a TRACE32-ICD trace extension can be used to get more information about the program history. But
not all targets allow the operation of such a trace. For these targets TRACE32 is offering a software trace.
The software trace however needs RAM from the target and is influencing the real-time behavior.
To operate a software trace, TRACE32 provides:
•
A general trace format for a software trace located in the target RAM.
•
Configuration and display commands for the software trace in the TRACE32 software
(command: FDX).
•
Predefined algorithms to operate the software trace from the target program.
To use the software trace basic knowledge of the target hardware and the processor architecture is required.
Implementation of
the trace memory
The user reserves a part of the target RAM, that can be used for the trace
information.
Max. trace size
Any desired.
Sampling
The trace memory is filled either by an algorithm predefined by
LAUTERBACH or by a user-defined algorithm.
The algorithm can either be called by an interrupt or the code has to be
instrumented.
Influence on the
real-time behavior
Yes, how much depends on the implementation of the sampling
algorithm.
Selective tracing
Possible by the sampling algorithm.
Fastest sampling
rate
Depends on the sampling algorithm.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
9
FDX
FDX.METHOD
Select communication channel
Format:
FDX.METHOD [<method>]
<method>:
BufferE | BufferC | BufferS | DCC3 | DCC | DCC4D | DCC7 | DCC8
If a <method> is specified, the command defines the low level communication channel. Without <method>,
the command displays the currently selected <method> in the TRACE32 message line.
BufferE and DCC are methods where the CPU does not need to be stopped to transfer data. These modes
require a hardware support from the CPU. The BUFFER methods require a buffer at the target side. The
host is accessing these buffers by memory access to its addresses.
The DCC channel is a real-time debug communication channel which needs to be supported by the CPU.
DCC, DCC3, DCC4D require a 4-byte wide channel. DCC7 and DCC8 require a 8-byte wide channel.
BufferC and BufferS require a stopped CPU to transfer data that’s why this methods are very slow
compared to the other methods.
BufferE
Transfers the data via Dual Port Memory access. This method requires a
buffer at the target side and a special CPU feature that allow to read
memory while CPU is running
BufferC
Transfers the data after the CPU is stopped.
BufferS
Transfers the data when the CPU has reached a SPOT breakpoint
DCC3
4-byte wide channel, where the first byte defines if the last 3 bytes are
used.
DCC
4-byte wide channel (e.g. ARM family)
DCC4D
4-byte wide channel without FDX high level protocol, every package is 4
byte wide
DCC7
8-byte wide channel, where the first byte defines if the last 8 bytes are
used.
DCC8
8-byte wide channel
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
10
FDX
FDX.Arm
Arm the trace
see command <trace>.Arm in 'General Commands Reference Guide T' (general_ref_t.pdf, page 95)
FDX.AutoArm
Arm automatically
see command <trace>.AutoArm in 'General Commands Reference Guide T' (general_ref_t.pdf, page 97)
FDX.AutoFocus
Calibrate AUTOFOCUS preprocessor
see command <trace>.AutoFocus in 'General Commands Reference Guide T' (general_ref_t.pdf, page
97)
FDX.AutoInit
Automatic initialization
see command <trace>.AutoInit in 'General Commands Reference Guide T' (general_ref_t.pdf, page 101)
FDX.AutoTEST
Continuous measurement
see command <trace>.AutoTEST in 'General Commands Reference Guide T' (general_ref_t.pdf, page
102)
FDX.BookMark
Set a bookmark in trace listing
see command <trace>.BookMark in 'General Commands Reference Guide T' (general_ref_t.pdf, page
104)
FDX.Chart
Display trace contents graphically
see command <trace>.Chart in 'General Commands Reference Guide T' (general_ref_t.pdf, page 108)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
11
FDX
FDX.Chart.DistriB
Distribution display
see command <trace>.Chart.DistriB in 'General Commands Reference Guide T' (general_ref_t.pdf, page
113)
FDX.Chart.Func
Function activity chart
see command <trace>.Chart.Func in 'General Commands Reference Guide T' (general_ref_t.pdf, page
115)
FDX.Chart.GROUP
Group activity chart
see command <trace>.Chart.GROUP in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 116)
FDX.Chart.Line
Graphical HLL lines analysis
see command <trace>.Chart.Line in 'General Commands Reference Guide T' (general_ref_t.pdf, page
117)
FDX.Chart.sYmbol
Symbol analysis
see command <trace>.Chart.sYmbol in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 119)
FDX.Chart.TASK
Task activity chart
see command <trace>.Chart.TASK in 'General Commands Reference Guide T' (general_ref_t.pdf, page
123)
FDX.Chart.TASKFunc
Task related function run-time analysis (legacy)
see command <trace>.Chart.TASKFunc in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 124)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
12
FDX
FDX.Chart.TASKSRV
Service routine run-time analysis
see command <trace>.Chart.TASKSRV in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 125)
FDX.Chart.TASKState
Task state analysis
see command <trace>.Chart.TASKState in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 126)
FDX.Chart.VarState
Variable activity chart
see command <trace>.Chart.VarState in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 127)
FDX.CLEAR
Clear FDX communication buffers
see command <trace>.CLEAR in 'General Commands Reference Guide T' (general_ref_t.pdf, page 129)
FDX.CLOSE
Close FDX files
see command <trace>.CLOSE in 'General Commands Reference Guide T' (general_ref_t.pdf, page 130)
FDX.ComPare
Compare trace contents
see command <trace>.ComPare in 'General Commands Reference Guide T' (general_ref_t.pdf, page
131)
FDX.DISable
Disable the trace
see command <trace>.DISable in 'General Commands Reference Guide T' (general_ref_t.pdf, page 133)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
13
FDX
FDX.DISableChannel
Disable FDX communication
see command <trace>.DISableChannel in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 133)
FDX.DRAW
Visualization of trace data
see command <trace>.DRAW in 'General Commands Reference Guide T' (general_ref_t.pdf, page 137)
FDX.ENableChannel
Enable FDX communication
see command <trace>.ENableChannel in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 156)
FDX.EXPORT
Export trace data for processing in other applications
see command <trace>.EXPORT in 'General Commands Reference Guide T' (general_ref_t.pdf, page 157)
FDX.FILE
Load a file into the file trace buffer
see command <trace>.FILE in 'General Commands Reference Guide T' (general_ref_t.pdf, page 169)
FDX.Find
Find specified entry in trace
see command <trace>.Find in 'General Commands Reference Guide T' (general_ref_t.pdf, page 171)
FDX.FindAll
Find all specified entries in trace
see command <trace>.FindAll in 'General Commands Reference Guide T' (general_ref_t.pdf, page 175)
FDX.FindChange
Search for changes in trace flow
see command <trace>.FindChange in 'General Commands Reference Guide T' (general_ref_t.pdf, page
176)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
14
FDX
FDX.GOTO
Move cursor to specified trace record
see command <trace>.GOTO in 'General Commands Reference Guide T' (general_ref_t.pdf, page 180)
FDX.InChannel
Inchannel state display
see command <trace>.InChannel in 'General Commands Reference Guide T' (general_ref_t.pdf, page
190)
FDX.Init
Initialize trace
see command <trace>.Init in 'General Commands Reference Guide T' (general_ref_t.pdf, page 190)
FDX.List
List trace contents
see command <trace>.List in 'General Commands Reference Guide T' (general_ref_t.pdf, page 194)
FDX.ListNesting
Analyze function nesting
see command <trace>.ListNesting in 'General Commands Reference Guide T' (general_ref_t.pdf, page
205)
FDX.ListVar
List variable recorded to trace
see command <trace>.ListVar in 'General Commands Reference Guide T' (general_ref_t.pdf, page 207)
FDX.LOAD
Load trace file for off-line processing
see command <trace>.LOAD in 'General Commands Reference Guide T' (general_ref_t.pdf, page 208)
FDX.Mode
Set the trace operation mode
see command <trace>.Mode in 'General Commands Reference Guide T' (general_ref_t.pdf, page 214)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
15
FDX
FDX.OFF
Switch off
see command <trace>.OFF in 'General Commands Reference Guide T' (general_ref_t.pdf, page 218)
FDX.Out
tbd.
see command <trace>.Out in 'General Commands Reference Guide T' (general_ref_t.pdf, page 218)
FDX.PROfileChart
Profile charts
see command <trace>.PROfileChart in 'General Commands Reference Guide T' (general_ref_t.pdf, page
223)
FDX.PROfileChart.DIStance
Time interval for a single event
see command <trace>.PROfileChart.DIStance in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 224)
FDX.PROfileChart.DURation
Time between two events
see command <trace>.PROfileChart.DURation in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 225)
FDX.PROfileChart.GROUP
Group profile chart
see command <trace>.PROfileChart.GROUP in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 230)
FDX.PROfileChart.Rate
Event frequency
see command <trace>.PROfileChart.Rate in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 231)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
16
FDX
FDX.PROTOcol.Chart
Graphic display for user-defined protocol
see command <trace>.PROTOcol.Chart in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 241)
FDX.PROTOcol.Draw
Graphic display for user-defined protocol
see command <trace>.PROTOcol.Draw in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 243)
FDX.PROTOcol.EXPORT
Export trace buffer for user-defined protocol
see command <trace>.PROTOcol.EXPORT in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 244)
FDX.PROTOcol.Find
Find in trace buffer for user-defined protocol
see command <trace>.PROTOcol.Find in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 245)
FDX.PROTOcol.List
Display trace buffer for user-defined protocol
see command <trace>.PROTOcol.List in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 246)
FDX.PROTOcol.STATistic
Display statistics for user-defined protocol
see command <trace>.PROTOcol.STATistic in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 249)
FDX.Rate
Select sampling rate
see command <trace>.Rate in 'General Commands Reference Guide T' (general_ref_t.pdf, page 254)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
17
FDX
FDX.REF
Set reference point for time measurement
see command <trace>.REF in 'General Commands Reference Guide T' (general_ref_t.pdf, page 255)
FDX.RESet
Reset command
see command <trace>.RESet in 'General Commands Reference Guide T' (general_ref_t.pdf, page 256)
FDX.SAVE
Save trace for postprocessing in TRACE32
see command <trace>.SAVE in 'General Commands Reference Guide T' (general_ref_t.pdf, page 258)
FDX.SelfArm
Automatic restart of trace recording
see command <trace>.SelfArm in 'General Commands Reference Guide T' (general_ref_t.pdf, page 262)
FDX.SIZE
Define buffer size
see command <trace>.SIZE in 'General Commands Reference Guide T' (general_ref_t.pdf, page 272)
FDX.SnapShot
Restart trace capturing once
see command <trace>.SnapShot in 'General Commands Reference Guide T' (general_ref_t.pdf, page
274)
FDX.state
Display trace configuration window
see command <trace>.state in 'General Commands Reference Guide T' (general_ref_t.pdf, page 277)
FDX.STATistic
Statistic analysis
see command <trace>.STATistic in 'General Commands Reference Guide T' (general_ref_t.pdf, page
280)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
18
FDX
FDX.STATistic.DIStance
Time interval for a single event
see command <trace>.STATistic.DIStance in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 291)
FDX.STATistic.DistriB
Distribution analysis
see command <trace>.STATistic.DistriB in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 294)
FDX.STATistic.DURation
Time between two events
see command <trace>.STATistic.DURation in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 297)
FDX.STATistic.Func
Nesting function runtime analysis
see command <trace>.STATistic.Func in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 302)
FDX.STATistic.GROUP
Group run-time analysis
see command <trace>.STATistic.GROUP in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 329)
FDX.STATistic.Ignore
Ignore false records in statistic
see command <trace>.STATistic.Ignore in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 330)
FDX.STATistic.InterruptIsFunction
Statistics interrupt processing
see command <trace>.STATistic.InterruptIsFunction in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 332)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
19
FDX
FDX.STATistic.Line
HLL-Line analysis
see command <trace>.STATistic.Line in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 336)
FDX.STATistic.LINKage
Per caller statistic of function
see command <trace>.STATistic.LINKage in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 339)
FDX.STATistic.Measure
Analyze the performance of a single signal
see command <trace>.STATistic.Measure in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 341)
FDX.STATistic.PreFetch
Prefetch detection
see command <trace>.STATistic.PreFetch in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 346)
FDX.STATistic.Sort
Specify sorting criterion for statistic commands
see command <trace>.STATistic.Sort in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 349)
FDX.STATistic.sYmbol
Flat run-time analysis
see command <trace>.STATistic.sYmbol in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 357)
FDX.STATistic.TASK
Task activity statistic
see command <trace>.STATistic.TASK in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 363)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
20
FDX
FDX.STATistic.TASKFunc
Task specific function run-time analysis
see command <trace>.STATistic.TASKFunc in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 370)
FDX.STATistic.TASKKernel
Task analysis with kernel markers (flat)
see command <trace>.STATistic.TASKKernel in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 378)
FDX.STATistic.TASKSRV
Analysis of time in OS service routines
see command <trace>.STATistic.TASKSRV in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 381)
FDX.STATistic.TASKState
Performance analysis
see command <trace>.STATistic.TASKState in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 382)
FDX.STATistic.TASKTREE
Tree display of task specific functions
see command <trace>.STATistic.TASKTREE in 'General Commands Reference Guide T'
(general_ref_t.pdf, page 386)
FDX.STATistic.TREE
Tree display of nesting function run-time analysis
see command <trace>.STATistic.TREE in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 388)
FDX.STATistic.Use
Use records
see command <trace>.STATistic.Use in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 389)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
21
FDX
FDX.TimeStamp
Configure timestamp usage of LOGGER trace
see command <trace>.TimeStamp in 'General Commands Reference Guide T' (general_ref_t.pdf, page
403)
FDX.Timing
Waveform of trace buffer
see command <trace>.Timing in 'General Commands Reference Guide T' (general_ref_t.pdf, page 404)
FDX.TraceChannel
tbd.
see command <trace>.TraceChannel in 'General Commands Reference Guide T' (general_ref_t.pdf,
page 408)
FDX.TRACK
Set tracking record
see command <trace>.TRACK in 'General Commands Reference Guide T' (general_ref_t.pdf, page 410)
FDX.View
Display single record
see command <trace>.View in 'General Commands Reference Guide T' (general_ref_t.pdf, page 415)
FDX.ZERO
Align timestamps of trace and timing analyzers
see command <trace>.ZERO in 'General Commands Reference Guide T' (general_ref_t.pdf, page 417)
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
22
FDX
FIFO
FIFO
Display on-chip trace FIFO
Format:
FIFO
Shows the raw data of the on-chip trace fifo (where applicable).
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
23
FIFO
FLAG
See also
■ FLAG.Delete
■ FLAG.ListModul
■ FLAG.RESet
■ FLAG.Init
■ FLAG.ListVar
■ FLAG.Set
■ FLAG.List
■ FLAG.OFF
■ FLAG.SetSec
■ FLAG.ListFunc
■ FLAG.ON
■ FLAG.state
Flag System of TRACE32-ICE
The flag system is an excellent tool for the analysis of complex software systems. Flag memory is divided
into 4 KByte blocks, and can be mapped into the CPU’s entire external bus address range. A read-flag, as
well as a write-flag is available for each address. The read-flag is set at memory read and OP-FETCH cycles
(prefetch too), whereas the write-flag is set for all write-to memory operations. After power-up, or execution
of the MAP.RESet command, no flag memory is mapped. Flag memory is activated by means of the
MAP.Flag or MAP.Ram command. It can, however, also be mapped-to using the FLAG.Set command if the
Map option is selected.
W R
Flag logic
DATA
BREAK
FLAG system and
READ-BEFORE-WRITE
trigger
CPU
RBW trigger
Trigger
Before restarting a program all flag-memory cells should be reset (FLAG.Delete or FLAG.Init commands).
Evaluating which cells were accessed can be done by means of the FLAG.List command. However, the flag
memory state is displayed whenever any DATA command is executed.
If no flag memory cells are changed, the flag system will be enabled or disabled by using the FLAG.ON or
FLAG.OFF options.
The flag memory is dual-ported so that analysis can also be carried out during real-time emulation.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
24
FLAG
Applications
1.
Stack depth
2.
Code coverage analysis
3.
Checking variables (READ/WRITE)
4.
Unused variables (WRITE-ONLY)
5.
Uninitialized variable triggering (READ ONLY/ READ-BEFORE-WRITE)
Problems
The flag system is not able to decide if the prefetch is executed or not. Therefore short skips are not detected
as not executed code and prefetches at function end sets some flag bits in the next function. The analyzer
base code coverage (command COVerage) can make a 'C1' code coverage without this problem. Data flags
are not correctly set, when the CPU cache function is activated (disable for data analysis).
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
25
FLAG
Flag System of TRACE32-FIRE
TRACE32-FIRE provides a memory based Flag system:
•
A read-flag is set at a memory read or opfetch cycle to an address.
•
A write-flag is set for all write-to memory operations.
After power-up, or execution of the MAP.RESet command, no flag memory is mapped. Since the same
memory is used for READFLAG and WRITEFLAG, only one flag type can be used at a time.
•
READFLAG memory is activated by means of the MAP.ReadFlag command.
•
WRITEFLAG memory is activated by means of the MAP.WriteFlag command.
Since the same memory is used also for hardware breakpoints/address selectors, setting hardware
breakpoints or trigger programming is not possible while READFLAG or WRITEFLAG is mapped.
64 bit FIRE RAM
32 bit as
READFLAG memory
or
WRITEFLAG memory
32 bit emulation memory
or
ADDRESS SELECTOR/BREAK memory
Before restarting a program all flag-memory cells should be reset by the FLAG.Delete command.
Evaluating which cells were accessed can be done by means of the FLAG.List command.
The flag memory is dual-ported so that analysis can also be carried out during real-time emulation.
Applications
1.
Stack depth
2.
Code coverage analysis
3.
Checking variables
Problems
The flag system is not able to decide if the prefetch is executed or not. Therefore short skips are not detected
as not executed code and prefetches at function end sets some flag bits in the next function. The analyzer
base code coverage (command COVerage) can make a 'C1' code coverage without this problem. Data flags
are not correctly set, when the CPU cache function is activated (disable for data analysis).
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
26
FLAG
FLAG.Delete
Delete flags
FIRE / ICE only
Format:
FLAG.Delete [<address> | <addressrange>] [/<option> …]
<option>:
Read (E)
Write (E)
FLAG.Delete
; delete all flags
TRACE32-ICE only:
FLAG.Delete /Read
; delete only all read flags
FLAG.Delete 0x0--0x0ffff /Write
; delete write flags selective
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
FLAG.Init
Initialization
ICE only
Format:
FLAG.Init
The whole flag memory will be deleted.
See also
■ FLAG.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
27
FLAG
FLAG.List
Display flags
Debugger / FIRE only
Format:
FLAG.List [<address> | <addressrange>] [/<option> …]
<option>:
Read (E)
Write (E)
NoRead (E)
NoWrite (E)
Options may be used simultaneously, e.g. READ and NOWRITE. If no option is selected then the whole flag
information will be displayed without condition.
FLAG.Delete
Go
…
…
Break
FLAG.List
; delete the whole flag memory
; activate the flag system
; start the program
FLAG.List /Read /NoWrite
; list read-only areas
FLAG.List /Write /NoRead
; list initialized, but unused variables
FLAG.List /NoRead
; list unused variables
; stop the program
; list the flag distribution
Display flags window:
E::FLAG.List
C
C:0000645E--00006461
C:00006462--00006469
C:0000646A--00006471
C:00006472--0000648D
C:0000648E--00006495
C:00006496--00006771
C:00006772--0000FF03
C:0000FF04--0000FF0B
C:0000FF0C--0001FFFF
C:00020000--00413FFF
\\MWC\splimit+4E24
\\MWC\splimit+4E28
\\MWC\splimit+4E30
\\MWC\environ_
\\MWC\I_a_arena_
\\MWC\I_a_block_+4
w
rw
rw
w
rw
w
noRam
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
28
FLAG
FLAG.ListFunc
Code-coverage functions
FIRE / ICE only
Format:
FLAG.ListFunc [<address> | <addressrange>] [<items> …] [/<option> …]
<items>:
%<format>
Read | Write | RNW | NRW | DEFault | ALL
<format>:
Bar | Percent
<option>:
NPrefetch | Prefetch
Graphic and numeric display of the code coverage of HLL functions. More detailed information is generated
by a short click (left mouse button) in the data section of the window.
Read
Generates a field output with consideration of the read flag information
only.
Write
Generates a field output with consideration of the write flag information
only.
RNW
Generates a field output for the supervised address range where the
read-only condition is fulfilled.
NRW
Generates a field output over the write-only information.
DEFault
The defined default fields will be shown. The default is the 4 field types in
graphical format and then in percent format. This configuration could be
changed with the command SETUP.FLIST.
ALL
All possible fields in all formats will be shown.
Bar
Switches the output format to graphical value display. All following items
will be displayed in this format. Bar is the default output format.
Percent
Switches the output format to percent value display.
NPrefetch
(default)
CPU accesses, which overlap the previous or next function (prefetch,
cache or burst), are not displayed. The prefetch distance differs on the
CPU type.
Prefetch
CPU accesses, which overlap the previous or next function (prefetch,
cache or burst), are displayed. The prefetch distance differs on the CPU
type.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
29
FLAG
The command SETUP.FLIST defines the default output of the flag list symbol commands.
E::w.flag.lf
symbolname
\\MCC\mcc\func0
\\MCC\mcc\func1
\MCC\mcc\func1g
\\MCC\mcc\func2
\\MCC\mcc\func3
\\MCC\mcc\func4
\\MCC\mcc\func5
\\MCC\mcc\func6
\\MCC\mcc\func7
\\MCC\mcc\func8
\\MCC\mcc\func9
\MCC\mcc\func10
\MCC\mcc\func11
MCC\mcc\func11a
\MCC\mcc\func12
\MCC\mcc\func13
read
write
read only
write only
function prefetched
function fully executed
function partly executed
function not accessed
Code-Coverage of CPU accesses, which overlap the previous or next function (prefetch, cache or burst), are
not displayed in this example.
E::w.flag.lf /np
symbolname
\\MCC\mcc\func0
\\MCC\mcc\func1
\MCC\mcc\func1g
\\MCC\mcc\func2
\\MCC\mcc\func3
\\MCC\mcc\func4
\\MCC\mcc\func5
\\MCC\mcc\func6
\\MCC\mcc\func7
\\MCC\mcc\func8
\\MCC\mcc\func9
\MCC\mcc\func10
\MCC\mcc\func11
MCC\mcc\func11a
\MCC\mcc\func12
\MCC\mcc\func13
read
-
write
read only
write only
function to short for analysis
function code modified !!!
function not accessed
function fully executed
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
30
FLAG
More detailed information is generated by a short click in the data section of the window.
E::w.d.l SD:5E72--0005F27 /m rf
wrCBAWRSHP addr/line source
r
H
401
switch ( x )
{
case 1:
H
404
x = x+1;
H
405
x = x*2;
H
406
return x*x;
case 2:
H
408
return x+x;
case 3:
H
410
return x-x;
case 4:
r
H
412
x = x+1;
r
H
413
x = x*2;
r
H
414
return x*x;
case 5:
break;
case 6:
H
418
return x+x;
default:
break;
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
31
FLAG
FLAG.ListModul
Code-coverage modules
FIRE / ICE only
Format:
FLAG.ListModul [<address> | <addressrange>] [<items> …] [/<option> …]
<items>:
%<format>
Read | Write | RNW | NRW | DEFault | ALL
<format>:
Bar | Percent
<option>:
NPrefetch | Prefetch
Graphic and numeric display of the code coverage of the modules. More detailed information is generated
by a short click in the data section of the window.
Read
Generates a field output with consideration of the read flag information
only.
Write
Generates a field output with consideration of the write flag information
only.
RNW
Generates a field output for the supervised address range where the
read-only condition is fulfilled.
NRW
Generates a field output over the write-only information.
DEFault
The defined default fields will be shown. The default is the 4 field types in
graphical format and then in percent format. This configuration could be
changed with the command SETUP.FLIST.
ALL
All possible fields in all formats will be shown.
Bar
Switches the output format to graphical value display. All following items
will be displayed in this format. Bar is the default output format.
Percent
Switches the output format to percent value display.
NPrefetch
(default)
CPU accesses, which overlap the previous or next function (prefetch,
cache or burst), are not displayed. The prefetch distance differs on the
CPU type.
Prefetch
CPU accesses, which overlap the previous or next function (prefetch,
cache or burst), are displayed. The prefetch distance differs on the CPU
type.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
32
FLAG
The command SETUP.FLIST defines the default output of the flag list symbol commands.
E::w.flag.lm
symbolname
\\MCC\entry
\\MCC\mcc
\\MCC\ADD
\\MCC\LMUL
\\MCC\FPK
\\MCC\MEMSET
\\MCC\csys
\\MCC\outchr
\\MCC\op_dadd
\\MCC\op_dmul
\\MCC\op_dtof
\\MCC\op_fadd
\\MCC\op_ftod
\\MCC\dadd
\\MCC\dpk
\\MCC\ipk
read
write
read only
write only
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
33
FLAG
FLAG.ListVar
Code-coverage variables
FIRE / ICE only
Format:
FLAG.ListVar [<address> | <addressrange>] [<items> …]
<items>:
%<format>
Read | Write | RNW | NRW | DEFault | ALL
<format>:
Bar | Percent
Graphic and numeric display of the code coverage of HLL-variables.
Read
Generates a field output with consideration of the read flag information only.
Write
Generates a field output with consideration of the write flag information only.
RNW
Generates a field output for the supervised address range where the readonly condition is fulfilled.
NRW
Generates a field output over the write-only information.
DEFault
The defined default fields will be shown. The default is the 4 field types in
graphical format and then in percent format. This configuration could be
changed with the command SETUP.FLIST.
ALL
All possible fields in all formats will be shown.
Bar
Switches the output format to graphical value display. All following items will
be displayed in this format. Bar is the default output format.
Percent
Switches the output format to percent value display.
NPrefetch
CPU accesses, which overlap the previous or next function (prefetch, cache
or burst), are not displayed. The prefetch distance differs on the CPU type.
Prefetch
CPU accesses, which overlap the previous or next function (prefetch,
cache or burst), are displayed. The prefetch distance differs on the CPU
type.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
34
FLAG
The command SETUP.FLIST defines the default output of the flag list symbol commands.
E::w.flag.lv
symbolname
\\MCC\vppulong
\\MCC\ast
\\MCC\vbfield
\\MCC\vshort
\\MCC\vdarray
\\MCC\def
\\MCC\funcptr
\\MCC\vpuint
read
write
read only
write only
fully used data set
data part.
not used
uninitialized data set
More detailed information is generated when a short click in the data section of the window was done:
E::w.d.p %var v.range(vbfield) /m rf
wrCBAWRSHP
address data
value
wr
SD:002554 FF
vbfield.a
wr
SD:002555 FF
vbfield.d
wr
SD:002556 F8
vbfield.e
wr
SD:002557 00
vbfield
wr
SD:002558 FF
vbfield.f
wr
SD:002559 FF
vbfield.f
wr
SD:00255A FF
vbfield.h
wr
SD:00255B FF
vbfield.h
w
SD:00255C FF
vbfield.j
w
SD:00255D FF
vbfield.j
wr
SD:00255E E0
vbfield.k
SD:00255F 00
vbfield
w
SD:002560 FF
vbfield.m
w
SD:002561 FF
vbfield.m
SD:002562 00
SD:002563 00
w
SD:002564 FF
vbfield.n
w
SD:002565 FF
w
SD:002566 FF
symbol
/ .b / .c / .d \\MCC\vbf
/ .e
\\MCC\vbfield+1
\\MCC\vbfield+2
\\MCC\vbfield+3
\\MCC\vbfield+4
/ .g
\\MCC\vbfield+5
\\MCC\vbfield+6
/ .i
\\MCC\vbfield+7
\\MCC\vbfield+8
\\MCC\vbfield+9
/ .l
\\MCC\vbfield+0A
\\MCC\vbfield+0B
\\MCC\vbfield+0C
\\MCC\vbfield+0D
\\MCC\vbfield+0E
\\MCC\vbfield+0F
= -1
\\MCC\vbfield+10
\\MCC\vbfield+11
\\MCC\vbfield+12
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
35
FLAG
FLAG.OFF
Switch-off flag system
ICE only
Format:
FLAG.OFF
The flag system would be switched off. The program activity doesn't influence the flag information. This
command is not possible on real-time emulation.
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
FLAG.ON
Switch-on flag system
ICE only
Format:
FLAG.ON
The flag system would be switched on. Every program and data cycle sets the corresponding flag bit. This
command is blocked if real-time emulation is running.
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
FLAG.RESet
Reset
FIRE / ICE only
Format:
FLAG.RESet
The whole flag memory will be deleted and released (Unmapped).
See also
■ FLAG.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
36
FLAG
FLAG.Set
Set
FIRE / ICE only
Format:
FLAG.Set <address> | <addressrange> [/<option> …]
<option>:
Read
Write
Map
This command is used to manually set flags before starting real-time emulation. Flag setting is needed to
prevent read-before-write triggering on code and initialized data areas. See FLAG.SetSec. In EPROM
based embedded controller systems the write flags should be set in the whole EPROM area (To detect
malfunction set the write breakpoint too and protect against write).
Map
This option forces mapping of flag memory if necessary.
flag.s 0x0--0x0ffff /w
; set write flags
See also
■ FLAG.state
▲ ’FLAG System’ in ’ICE User’s Guide’
FLAG.SetSec
Mark sections
ICE only
Format:
FLAG.SetSec
If the object files loaded has correct information about initialized data and code areas, the presetting of the
write flag should be done by this command instead of FLAG.Set. Presetting of the write flag prevents from
read-before-write (RBW) triggering on code or initialized data access.
See also
■ FLAG.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
37
FLAG
FLAG.state
State
ICE only
Format:
FLAG.state
The state of the flag system is shown. The commands FLAG.Init and FLAG.RESet are executable by
mouse-clicking.
E::w.flag
state
OFF

ON
commands
Init
RESet
See also
■ FLAG.Delete
■ FLAG.ListModul
■ FLAG.RESet
■ FLAG.Init
■ FLAG.ListVar
■ FLAG.Set
■ FLAG.List
■ FLAG.OFF
■ FLAG.SetSec
■ FLAG.ListFunc
■ FLAG.ON
▲ ’FLAG System’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
38
FLAG
FLASH
FLASH
External FLASH memories and on-chip FLASH memories
External FLASH memories and on-chip FLASH memories of microcontrollers can be programmed and
erased by the FLASH command group.
An up-to date list of all supported FLASHs you will find on the LAUTERBACH website under:
http://www.lauterbach.com/ylist.html. The list is also available under “List of Supported FLASH
Devices” (flashlist.pdf).
For more information, please refer to “Onchip/NOR FLASH Programming User’s Guide” (norflash.pdf).
The FLASH.Create command allows to declare the layout of the FLASH memories on the target. After
activating the programming option any memory modification command of TRACE32 will issue a FLASH
programming sequence for the devices. Parallel programming of multiple FLASH devices is supported.
The programming can be done in two different modes:
•
TRACE32 software based
•
Target controlled (an extra FLASH programming routine is used)
The TRACE32 software based programming needs no programming algorithm running on the target and
no target RAM, but is slow (typical about 1 to 5 KByte/s). An exception are buffered FLASH chips (like Intel
FlashFile devices) which can be programmed at rates of more than 100 KByte/s.
Target controlled FLASH algorithms are called by TRACE32 with appropriate parameters to program a
memory. The advantage of this method is the higher programming speed and more flexibility in the
implementation of the programming algorithm.
LAUTERBACH provides ready to run binary files for target controlled FLASH programming. These files are
available for most common architectures on the TRACE32 software CD under: ~~/demo/<cpu>/flash
The FLASH algorithms are organized by <bus_width>. The name of the FLASH algorithm corresponds to
the <family_code>. To get the <family_code> refer to the FLASH.Create command or to the LAUTERBACH
home page under http://www.lauterbach.com/ylist.html.
E.g. the algorithm to program a Am29LV640 at a 16 bit bus with an ARM core working in little endian mode
can be found under ~~/demo/arm/flash/word/am29lv100.bin
The target controlled programming also allows that an user designed programming routine is used.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
39
FLASH
In production environments, it is recommended to use target controlled FLASH programming and to load the
FLASH data in binary format (Data.LOAD.Binary) to get the highest possible programming speed.
See also
■
■
■
■
■
■
BSDL.FLASH
FLASH.CHANGEtype
FLASH.Delete
FLASH.MultiProgram
FLASH.RESet
FLASH.UNLOCK
■
■
■
■
■
■
FLASH.AUTO
FLASH.CLocK
FLASH.Erase
FLASH.OFFSET
FLASH.state
FLASH.UNSECUREerase
■
■
■
■
■
FLASH.BSDLaccess
FLASH.Create
FLASH.List
FLASH.Program
FLASH.TARGET
■
■
■
■
■
FLASH.CFI
FLASH.CreateALIAS
FLASH.LOCK
FLASH.ReProgram
FLASH.TARGET2
▲ ’FLASH Functions’ in ’General Functions’
▲ ’Introduction’ in ’Onchip/NOR FLASH Programming User’s Guide’
FLASH.AUTO
Format:
Auto programming of FLASH
FLASH.AUTO [<unit> | <address_range> | ALL | off | CANCEL |
/CENSORSHIP]
Activates the auto programming mode for the selected FLASH memory unit or address range or for all
declared devices.
The auto programming mode can be used:
•
To patch code in FLASH.
•
To set software breakpoints into FLASH.
NOTE:
The FLASH.AUTO off and FLASH.ReProgram off commands automatically
erase the modified sectors before writing them.
•
Consequently, do not use FLASH.Erase when using the auto or reprog
programming mode.
•
If you do, you will lose the advantage of reprogramming only modified
sectors, which will result in a loss of performance.
<unit>
Activate the auto programming mode for all sectors of the specified unit.
ALL
Activate the auto programming mode for all FLASH sectors.
off
With parameter “off” or without argument the auto programming mode is
terminated. Terminating the auto programming mode lets you program only
the modified sectors.
CANCEL
Abort without programming pending changes.
CENSORSHIP
CPU specific option: Allows you to program the range where the FLASH
security bytes are located.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
40
FLASH
; (--)
FLASH.AUTO ALL
; No FLASH.Erase!
; Activate all FLASHs for programming
Data.LOAD.Binary data.bin
; load binary file
FLASH.AUTO off
; Erase and program all modified
; sectors
Data.LOAD.Binary data.bin /DIFF
; compare the contents of the FLASH
; with the file contents
IF FOUND()
PRINT "Not ok!"
ELSE
PRINT "FLASH ok!"
; FOUND() returns TRUE if a
; difference was found
See also
■ FLASH
■ FLASH.state
▲ ’Programming Commands’ in ’Onchip/NOR FLASH Programming User’s Guide’
FLASH.BSDLaccess
Format:
Enables FLASH access via boundary scan
FLASH.BSDLaccess ON | OFF
Enables or disables FLASH memory access via boundary scan. The boundary scan chain must be
configured with BSDL.FLASH.IFDefine and BSDL.FLASH.IFMap.
See also
■ FLASH
■ FLASH.state
▲ ’FLASH Programming via Boundary Scan’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
41
FLASH
FLASH.CFI
Generate FLASH declaration by CFI
Format 1:
FLASH.CFI [[<unit>] <address> | <range> <bus_width>]
[/BSPLIT <increment> <offset> <width>]
Format 2:
FLASH.CFI [<unit>] <address> | <range> <bus_width>
/TARGET <code_address> <data_address> <buffer_size>
[/DualPort | /BSPLIT <increment> <offset> <width>]
Format 3:
FLASH.CFI [<unit>] <address> | <range> <bus_width>
/TARGET2 <code_address> <data_address> <buffer_size>
[/DualPort | /BSPLIT <increment> <offset> <width>]
<bus_width>:
Byte | Word | Long | Quad | TByte | PByte | HByte | SByte
Generate FLASH declaration by using the CFI information stored in an off-chip FLASH device.
CFI (Common FLASH memory Interface) is an open standard, that specifies how FLASH identification
information can be provided by FLASH devices. The identification information includes the memory size,
block configuration, voltage and timing information etc.
Without any parameters a CFI dialog is opened.
TARGET and
TARGET2
Specify that target controlled FLASH programming is used:
•
TARGET uses the flash family code TARGET
•
TARGET2 uses the flash family code TARGET2
See also FLASH.TARGET and FLASH.TARGET2.
<code_address>
The flash algorithm is loaded to the <code_address>.
<data_address>
<data_address> specifies the start address for data and stack used by
the flash algorithm.
<buffer_size>
<buffer_size> specifies the data buffer size.
DualPort
Dual-port can be used for target controlled FLASH programming only.
For an explanation of the DualPort option, see FLASH.TARGET.
BSPLIT
Loads only certain bytes of the memory. For an illustration of
<increment>,<offset>, and <width>, see FLASH.Create.
<increment>
<increment> number of bytes which the other two parameters refer to.
<offset>
<offset> defines the offset of the bytes being programmed.
<width>
<width> defines the number of bytes being programmed.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
42
FLASH
Format 1
If Format 1 is used, a FLASH declaration for TRACE32 tool based FLASH programming is generated.
FLASH.RESet
; reset all FLASH declarations
FLASH.CFI 0xc0000000 Long
; perform FLASH declaration by CFI
FLASH.List
; display the FLASH declaration
AREA.view
; display the monitoring of the TRACE32
; FLASH declaration commands
If several FLASH devices of the same type are used in serial, a FLASH.CFI for each FLASH device has to
be used.
FLASH.RESet
; reset all FLASH declarations
FLASH.CFI 0xc0000000 Long
; perform FLASH declaration by CFI
FLASH.CFI 0xc2000000 Long
; perform FLASH declaration by CFI
FLASH.List
; display the FLASH declaration
AREA.view
; display the monitoring of the TRACE32
; FLASH declaration commands
Format 2
If Format 2 is used, a FLASH declaration for target controlled FLASH programming is generated.
; reset all FLASH declarations
FLASH.RESet
; FLASH.CFI <addr> <bus_width> /TARGET <code_address> <data_address>
; <buffer_size>
FLASH.CFI 0xc0000000 Long /TARGET 0x1000 0x2000 0x1000
; display flash programming dialog to check settings
FLASH.state
; display the FLASH declaration
FLASH.List
; display the monitoring of the TRACE32 FLASH declaration commands
AREA.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
43
FLASH
Format 3
If Format 3 is used, a second FLASH declaration for target controlled FLASH programming is generated.
This is needed for example to program processor internal and processor external NOR flash or HyperFlash
together.
…
; script to set up onchip flash configuration
DO ~~/demo/tricore/flash/tc29x.cmm CPU=TC298TF PREPAREONLY DUALPORT=1
; configure external bus interface
…
; perform flash declaration for external NOR flash by CFI
FLASH.CFI 0xA4000000 Long /TARGET2 0xC0000000 0xD0000000 0x2000 /DUALPORT
; check configuration
FLASH.state
FLASH.List
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
44
FLASH
See also
■ FLASH
■ FLASH.TARGET2
■ FLASH.List
❏ FLASH.CFI.SIZE()
■ FLASH.state
■ FLASH.TARGET
▲ ’Standard Approach’ in ’Onchip/NOR FLASH Programming User’s Guide’
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
45
FLASH
FLASH.CHANGEtype
Changes the FLASH type
Format:
FLASH.CHANGEtype ALL | <unit> | <address_range>
[<type> <width> <extra_value> /<option>]
<type>:
TARGET | TARGET2 | …
<width>:
Byte | Word | Long | Quad | TByte | PByte | HByte | SByte
<option>:
AutoInc [<increment>] | EraseALIAS | BootModeHeaDer |
KEEP <address_range> | OTP | INFO <string>
Changes the FLASH type (also referred to as FLASH family code) for the specified range. All other options
remain unchanged.
ALL
Changes the FLASH declaration of all FLASH sectors.
<unit>
Change the FLASH declaration of the specified unit.
<address_range>
Change the FLASH declaration of the specified address range.
<type>
FLASH type, also referred to as FLASH family code. For more information,
see FLASH.Create.
<width>
For information about the data bus width, see FLASH.Create.
<extra_value>
An extra value that is passed to the FLASH algorithm. The extra value is
displayed in the extra column of the FLASH.List window.
<option>
For a description of the options, see FLASH.Create.
;For the specified address range, change current type to type 'TARGET'
FLASH.CHANGEtype 0xA0018000--0xA001BFFF TARGET
Before
After
See also
■ FLASH
■ FLASH.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
46
FLASH
FLASH.CLocK
Format:
Setup input clock for processor internal flash
FLASH.CLocK <frequency> | AUTO
The command is used to set up the FLASH module input clock for processor internal flash (target-controlled
on-chip FLASH programming only).
FLASH.CLocK AUTO
; the FLASH programming algorithm measures
; the input clock before programming or
; erasing the FLASH
FLASH.CLocK 10MHz
; a fixed input clock is used
See also
■ FLASH
■ FLASH.state
❏ FLASH.CLocK.Frequency()
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
47
FLASH
FLASH.Create
Declare FLASH
[Examples]
Format:
FLASH.Create <unit> <physical_range> <sector_size>
<family_code> <bus_width> <extra_value> [/<option>]
<family_
code>:
TARGET | TARGET2 | …
<bus_width>:
Byte | Word | Long | Quad | TByte | PByte | HByte | SByte
<option>:
AutoInc [<increment>] | EraseALIAS | BootModeHeaDer | KEEP
<address_range> | CENSORSHIP <address_range> | OTP | INFO <string> |
BSPLIT <increment> <offset> <width>
Declaration of FLASH memories.
A <unit> number has to be declared for each device. If the processor has
on-chip FLASH that is declared automatically by TRACE32, the unit
numbers 1 … n are already in use for the on-chip FLASH. Please use the
FLASH.List command to check the next available unit number.
If the FLASH has sectors of different size (boot block devices) one FLASH.Create command has to be
entered for each sector size.
<sector_size>
If no <sector_size> is specified then one sector occupying the full
<physical_range> will be assumed.
<family_code>
The <family_code> determines the programming algorithm. The FLASH
types and the corresponding <family_codes> are listed under “List of
Supported FLASH Devices” (flashlist.pdf).
<bus_width>
The <bus_width> parameter defines the external data bus size:
•
Byte (8-bit accesses)
Word (16-bit accesses)
•
TByte (24-bit accesses) Long (32-bit accesses)
•
PByte (40-bit accesses) HByte (48-bit accesses)
•
SByte (56-bit accesses) Quad (64-bit accesses)
If the data bus size is wider than the bus size of the FLASH device, it will
be assumed that FLASH devices of the same type are in parallel.
<extra_value>
An extra value that is passed to the FLASH algorithm. The extra value is
displayed in the extra column of the FLASH.List window.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
48
FLASH
AutoInc <increment>
Increments the FLASH.Create extra value for every created sector by
<increment>. The default <increment> is 1.
See example.
The AutoInc option is only available for TARGET, TARGET2, and NOP
and a few other FLASH family codes.
EraseALIAS
<address_range>
The EraseALIAS option allows you to apply the commands
FLASH.Auto.off and FLASH.ReProgram.off to non-contiguous physical
sectors.
The EraseALIAS option is, for example, used for a processor-internal
FLASH with visible ECC sectors.
KEEP
<address_range>
Does not delete the specified address range when the commands
FLASH.Erase and FLASH.ReProgram are executed. See example.
But, after the reprog programming mode has been activated (see
FLASH.ReProgram), the specified address range can be overwritten.
CENSORSHIP
<address_range>
The FLASH security bytes are not erased or changed by any FLASH
command.
If you want to change or erase them, you have to use the FLASH.AUTO
... /CENSORSHIP command.
BootModeHeaDer
<address_range>
Only available for the TriCore debugger. See example.
Does not delete the TriCore boot mode header when the commands
FLASH.Erase and FLASH.ReProgram are executed.
But, after the reprog programming mode has been activated (see
FLASH.ReProgram), the TriCore boot mode header can be overwritten.
OTP
States in a declaration that the specified range is an OTP sector (One
Time Programmable). See example.
All regular FLASH erase and FLASH programming commands have no
effect on the OTP sector. In the FLASH.List window, the state column
displays “nop” for this OTP sector.
To activate the FLASH programming mode for an OTP sector, use the
FLASH.Program ... /OTP command. In the FLASH.List window, the state
column displays “otp” for this OTP sector.
INFO <string>
Adds a user-defined comment to the extra column of the FLASH.List
window (max. length 64 characters). See example.
BSPLIT
Loads only certain bytes of the memory. For an illustration of
<increment>, <offset>, and <width>, see below.
<increment>
<offset>
<width>
<increment> number of bytes which the other two parameters refer to.
<offset> defines the offset of the bytes being programmed.
<width> defines the number of bytes being programmed.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
49
FLASH
BSPLIT: illustration of <increment> = 3, <offset> = 0, and <width> =1
Increment
Increment
3
3
Offset Width
Offset Width
0
0
1
1
Memory:
File:
0
2
1
3
4
5
...
...
Example 1
FLASH declaration for an Am29LV640 in 16 bit mode on a 16 bit bus. The FLASH provides 128 sectors
each with 64 KByte:
FLASH.RESet
FLASH.Create 1. 0x0--0x7FFFFF 0x10000 AM29LV100 Word
Example 2
FLASH declaration for 2 Intel 28F128J3 in 16 bit mode, 2 FLASHs in parallel on a 32 bit bus. Each FLASH
provides 128 sectors with 128 KByte. Since the FLASHs are in parallel the sector size used with the
FLASH.Create command is 2 x 128 KByte:
FLASH.RESet
FLASH.Create 1. 0x0--0x1FFFFFF 0x40000 I28F200J3 Long
Example 3
FLASH declaration for an Am29DL322DB in 8 bit mode on a 8 bit bus (FLASH sectors of different size bottom boot block device). The 8 boot blocks have a size of 8 KByte, the 63 main blocks have a size of
64 KBytes:
FLASH.RESet
FLASH.Create 1. 0x00000--0x00FFFF 0x02000 AM29LV100B Byte
FLASH.Create 1. 0x10000--0x3FFFFF 0x10000 AM29LV100B Byte
You will find an up-to-date list of all supported FLASHs at the LAUTERBACH website under:
http://www.lauterbach.com/ylist.html. The list is also available under “List of Supported FLASH
Devices” (flashlist.pdf).
The family_code TARGET must be selected if target controlled FLASH programming is used. The
target-based FLASH programming is configured via the FLASH.Target command.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
50
FLASH
EEPROM can be used to declare an EEPROM area. When activated write accesses result in EEPROM
programming sequences. This is useful if both FLASH and EEPROM areas are used by the download file.
If no data accesses are allowed to a specific memory area, the option NOP can be used, to prevent any
access when data transfer commands are used.
Compatible types are supported even if they are not explicitly listed. (Please note that not all FLASH types
have been tested in all configurations).
It is recommended to use Long or Word option for load or memory copy command, corresponding to the
bus_width defined with the FLASH.Create command.
On some ATMEL flash types the data written must be aligned to the flash page size. Use binary file format or
copy from virtual memory if possible (refer to Data.Load <file> /VM for more information). TRACE32
software based programming is not working on all FLASHs.
Example 4 - /AutoInc, /KEEP, /OTP, and /INFO
A
B
A A user-defined comment is added by /INFO.
B Sector IDs are incremented by /AutoInc.
FLASH.RESet
FLASH.Create 0x1000000--0x100FFFF 0x4000 TARGET Long 0. \
/AutoInc /KEEP 0x1003FFC--0x1003FFF
FLASH.Create 0x0400000--0x0403FFF 0x4000 TARGET Long 0x500 \
/OTP /INFO "UTEST sector"
FLASH.List
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
51
FLASH
Example 5 - /BootModeHeaDer
The BootModeHeaDer option is only available for TriCore.
Example for a TriCore internal FLASH:
FLASH.Create 1. 0xA0000000--0xA0003FFF TARGET Long \
/BootModeHeaDer 0xA0000000--0xA000001F
See also
■ FLASH
■ FLASH.state
▲ ’FLASH Declaration in Detail’ in ’Onchip/NOR FLASH Programming User’s Guide’
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
52
FLASH
FLASH.CreateALIAS
Format:
Create address alias
FLASH.CreateALIAS <address_range> <alias_address>
All FLASH write cycles to <address_range> are performed to the address range starting with
<alias_address>.
This command is useful when the on-chip FLASH is mapped to different addresses, for example:
•
At address 0x0C000000--0x0C01FFFF for uncached accesses
•
At address 0x08000000--0x0801FFFFF for cached accesses
Due to this, a compiler may generate bootcode for the uncached address range and application code for the
cached address range. This situation complicates the programming of the on-chip FLASH. With the
command FLASH.CreateALIAS flash programming is only executed in the uncached address range.
The command FLASH.CreateALIAS might also be useful for mirrored FLASH address ranges.
;reset FLASH declaration table
FLASH.RESet
;declare FLASH sectors
FLASH.Create 1. 0x0C000000--0x0C00FFFF
FLASH.Create 2. 0x0C010000--0x0C01FFFF
0x4000 TARGET Long
0x4000 TARGET Long
;all FLASH write cycles to the address range 0x08000000--0x0801FFFF
;(cached) are actually performed to the address range
;0x0C000000--0x0C01FFFF (not cached)
FLASH.CreateALIAS 0x08000000--0x0801FFFF 0x0C000000
;declare the target controlled FLASH algorithm
FLASH.TARGET 0x1FFFE000 0x20000000 0x1000 \
~~/demo/arm/flash/long/xmc4000.bin
;open the window
FLASH.List
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
53
FLASH
The alias is also displayed in the listing of the FLASH declarations, see FLASH.List window:
A
B
A Cached address range.
B Destination address for uncached memory.
See also
■ FLASH
■ FLASH.state
▲ ’Special Features for Onchip FLASHs’ in ’Onchip/NOR FLASH Programming User’s Guide’
FLASH.Delete
Format:
Delete entry in FLASH declaration table
FLASH.Delete <unit> | <address_range> | ALL | off
The specified FLASH entry is removed from the FLASH declaration table. Use the command FLASH.RESet
to clear the whole list and the entire FLASH target configuration.
<unit>
Delete the specified unit.
ALL
Deletes all FLASH entries from the FLASH declaration table.
off
(no effect)
FLASH.Delete 2.
; delete unit 2 from the FLASH declaration
; table. A unit can consist of multiple
; flash sectors.
FLASH.Delete 0x2000--0xffff
; delete the specified flash sectors.
; from the FLASH declaration table.
FLASH.Delete ALL
; delete all flash sectors from the
; FLASH declaration table.
See also
■ FLASH
■ FLASH.state
▲ ’FLASH Declaration in Detail’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
54
FLASH
FLASH.Erase
Format:
Erase FLASH
FLASH.Erase <unit> | <address_range> | ALL | off
Erases the selected FLASH memory unit or an address range or all declared sectors.
<unit>
Erase the specified unit.
ALL
Erase all FLASH sectors of a FLASH memory.
off
(no effect)
FLASH.Erase 1.
; erase unit 1 from the FLASH memory.
FLASH.Erase 0x0--0x1FFFF
; erase the specified FLASH sectors
; from the FLASH memory.
FLASH.Erase ALL
; erase all flash sectors
; of a FLASH memory.
See also
■ FLASH
■ FLASH.state
▲ ’TRACE32 Tool-based Programming’ in ’Tips to Solve NOR FLASH Programming Problems’
▲ ’Programming Commands’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
55
FLASH
FLASH.List
Format:
Display FLASH definition table
FLASH.List
Displays the address range, family code, bus width, state (if programming or auto is activated), and the unit
number of declared FLASH sectors. For a description of the columns in the FLASH.List window, see table
below.
Each row stands
for one sector.
Unit 1. consists of multiple sectors.
Description of Columns in the FLASH.List Window
•
address: Address range of a sector.
•
type: FLASH family code. An ALIAS entry is created with FLASH.CreateALIAS.
•
width: Data bus width (Byte, Word, Long, Quad).
•
state - values in the state column:
-
program: FLASH programming for the selected sector is activated by FLASH.Program.
-
reprog: FLASH programming for the selected sector is activated by FLASH.ReProgram.
-
pending: The contents in the virtual host memory differs from the real FLASH contents.
FLASH will be programmed by FLASH.AUTO.off or FLASH.ReProgram.off.
-
nop: Sectors that are not affected by FLASH.Program, FLASH.AUTO, or FLASH.ReProgram.
-
otp: OTP sector programming is enabled by FLASH.Program... /OTP.
•
unit: A unit consists of multiple sectors. Each row stands for one sector. Related sectors have the
same unit number.
•
extra: Displays the extra value and the options created with FLASH.Create, including userdefined comments.
See also
■ FLASH
■ FLASH.CFI
FLASH.List.STATE.PENDING()
■ FLASH.state
❏
▲ ’Standard Approach’ in ’Onchip/NOR FLASH Programming User’s Guide’
▲ ’FLASH Declaration in Detail’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
56
FLASH
FLASH.LOCK
Format:
Lock FLASH
FLASH.LOCK <unit> | <address_range> | ALL | off
Locks the selected sectors of a FLASH device.
<unit>
Lock the specified unit.
ALL
Lock all FLASH sectors.
off
(no effect)
FLASH.LOCK 1.
; lock unit 1. in the FLASH memory.
FLASH.LOCK 0x0--0x1FFFF
; lock the specified range
; in the FLASH memory.
FLASH.LOCK ALL
; lock all FLASH sectors
; in the FLASH memory.
See also
■ FLASH
■ FLASH.state
■ FLASH.UNLOCK
▲ ’TRACE32 Tool-based Programming’ in ’Tips to Solve NOR FLASH Programming Problems’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
57
FLASH
FLASH.MultiProgram
Format:
Simultaneous programming of flash sectors
FLASH.MultiProgram <range>
Simultaneous programming of the internal FLASH is supported for the masks K1, K2, K3 and M of the
MPC555. The MPC555 supports simultaneous programming of all 14 flash modules, 8 blocks of FLASH
module A and 6 blocks of FLASH module B.
; initialize the virtual memory of TRACE32-ICD with 0xff
Data.Set VM:0x0++0x6ffff %Long 0xffffffff
; load the code for the internal FLASH into the virtual memory
Data.LOAD.Elf file.elf /VM
; Start the simultaneous programming
FLASH.MultiProgram 0x0++0x6ffff
See also
■ FLASH
■ FLASH.state
▲ ’CPU specific SYStem Commands’ in ’MPC5xx/8xx Debugger and Trace’
▲ ’CPU specific SYStem Commands’ in ’MPC56x NEXUS Debugger and Trace’
FLASH.OFFSET
Format:
Change FLASH control address
FLASH.OFFSET [<offset>]
On some FLASH memory types a dummy address is used to control FLASH programming and erasure. For
this purpose normally the lowest address of the FLASH is used (default offset: 0). If this address can not be
accessed, since it is occupied by other peripherals, this command can be used to change these control
address.
; 80196 FLASH example
; access to location 0 is not possible (overlaid by register block)
FLASH.Create P:0x0--0x1ffff AM29F100 Word
FLASH.OFFSET 0x1000
See also
■ FLASH
■ FLASH.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
58
FLASH
FLASH.Program
Format:
Program FLASH
FLASH.Program [<unit> | <address_range> | ALL | off | CANCEL] [/OTP]
Activates the FLASH programming mode for the selected FLASH memory unit or address range or for all
declared sectors.
<unit>
Activate the FLASH programming mode for the specified unit.
ALL
Programs all FLASH sectors.
off
With parameter “off” or without argument the programming mode is
terminated.
CANCEL
With parameter “off” or without argument the programming mode is
terminated.
OTP
FLASH.Create ... /OTP declares an OTP sector (One Time Programmable).
Use FLASH.Program ... /OTP to activate the FLASH programming mode
for the OTP sector.
While the programming mode is active, all writes from TRACE32 to the activated FLASH memory range are
executed as FLASH program cycles. The programming data must be written to the correct location and
access class of the FLASH memory.
FLASH.Erase ALL
FLASH.Program ALL
; Reset FLASH contents (mandatory)
; Activate all FLASHs for programming
Data.LOAD.Binary data.bin /Word
; load binary file
FLASH.Program off
; deactivate FLASH programming
Data.LOAD.Binary data.bin /DIFF
; compare the contents of the FLASH
; with the file contents
IF FOUND()
PRINT "Not ok!"
ELSE
PRINT "FLASH ok!"
; FOUND() returns TRUE if a
; difference was found
NOTE:
Before using the FLASH.Program command, it is necessary to erase the
FLASH memory with FLASH.Erase.
This is not required with FLASH.ReProgram or FLASH.AUTO because
they automatically erase the sectors before writing them.
See also
■ FLASH
■ FLASH.ReProgram
■ FLASH.state
▲ ’Programming Commands’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
59
FLASH
FLASH.ReProgram
Format:
Re-program FLASH
FLASH.ReProgram [<unit> | <address_range> | ALL | off | CANCEL]
[/Erase | /FILL]
Activates the reprog programming mode for the selected FLASH unit, address range or for all declared
devices. In this mode, all changes are written to the virtual host memory of TRACE32. As soon as
FLASH.ReProgram.off is executed, the FLASH sectors are programmed but only if their contents have
changed. The programming time for target-controlled FLASH programming is considerably improved.
<unit>
Activates the reprogramming mode for the specified unit.
ALL
Activates the reprogramming mode for all FLASH sectors.
off
With parameter “off” or without parameters the reprog programming mode
is terminated. Terminating the reprog programming mode lets you program
only the modified sectors.
CANCEL
Abort without programming pending changes.
Erase
Flags the activated sectors in the virtual host memory as to be erased.
The Erase option is used to remove obsolete code from sectors that are
not reprogrammed (e.g. because a smaller program is flashed into the
target).
FILL
Fills all erase sectors with 0 or 1, depending on the FLASH device.
Use the FILL option to prevent that ECC errors occur after FLASH
programming in case of an address-sensitive ECC calculation.
NOTE:
The FLASH.AUTO off and FLASH.ReProgram off commands automatically
erase the modified sectors before writing them.
•
Consequently, do not use FLASH.Erase when using the auto or reprog
programming mode.
•
If you do, you will lose the advantage of reprogramming only modified
sectors, which will result in a loss of performance.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
60
FLASH
; (--)
FLASH.ReProgram ALL /Erase
; No FLASH.Erase!
; Activate all FLASHs for programming
Data.LOAD.Binary data.bin
; load binary file
FLASH.ReProgram off
; Erase and program all modified
; sectors
Data.LOAD.Binary data.bin /DIFF
; compare the contents of the FLASH
; with the file contents
IF FOUND()
PRINT "Not ok!"
ELSE
PRINT "FLASH ok!"
; FOUND() returns TRUE if a
; difference was found
See also
■ FLASH
■ FLASH.Program
■ FLASH.state
▲ ’Programming Commands’ in ’Onchip/NOR FLASH Programming User’s Guide’
▲ ’Release Information’ in ’Release History’
FLASH.RESet
Format:
Reset FLASH declaration table
FLASH.RESet
The debugger-internal table with FLASH-related declarations is cleared and all settings are restored to their
default values. Use the command FLASH.Delete to remove a single entry or parts of the FLASH list.
This command does not erase the FLASH sectors. Use FLASH.Erase for that purpose.
See also
■ FLASH
■ FLASH.state
▲ ’Standard Approach’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
61
FLASH
FLASH.state
Format:
FLASH programming dialog
FLASH.state
Opens the FLASH.state window, where you can create, check, and modify the setup for NOR and onchip
FLASH programming.
; script to program onchip and off-chip flash together
SYStem.CPU TC298TF
…
; script to set up onchip flash configuration
DO ~~/demo/tricore/flash/tc29x.cmm CPU=TC298TF PREPAREONLY DUALPORT=1
; configure external bus interface
…
; prepare off-chip flash configuration
FLASH.CFI 0xA4000000 Long /TARGET2 0xC0000000 0xD0000000 0x2000 /DUALPORT
FLASH.state
See also
■ FLASH
■ FLASH.CHANGEtype
■ FLASH.AUTO
■ FLASH.CLocK
■ FLASH.BSDLaccess
■ FLASH.Create
■ FLASH.CFI
■ FLASH.CreateALIAS
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
62
FLASH
■
■
■
■
FLASH.Delete
FLASH.MultiProgram
FLASH.RESet
FLASH.UNSECUREerase
■ FLASH.Erase
■ FLASH.OFFSET
■ FLASH.TARGET
■ FLASH.List
■ FLASH.Program
■ FLASH.TARGET2
■ FLASH.LOCK
■ FLASH.ReProgram
■ FLASH.UNLOCK
▲ ’Release Information’ in ’Release History’
FLASH.TARGET
Define target controlled algorithm
[Examples]
Format 1:
FLASH.TARGET <code_range> <data_range> [<file>] \
[/STACKSIZE <size> | /FirmWareRAM <address_range>] \
[/DualPort | /CORE <number>]
Format 2:
FLASH.TARGET <code_address> <data_address> [<buffer_size>] [<file>] \
[/STACKSIZE <size>] | /FirmWareRAM <address_range>] \
[/DualPort | /CORE <number>]
Prepares target controlled FLASH programming.
STACKSIZE
Declares the stack size for the target algorithm. The default size is 256 bytes.
FirmWareRAM
Declares the <address_range> used by the on-chip FLASH programming
firmware. This range is protected before programming and restored after
FLASH programming, just as is the case for the <data_range> and the
<code_range>.
See Example.
DualPort
DualPort can be used for target controlled FLASH programming only.
While FLASH programming is being executed, the TRACE32 host
software simultaneously downloads the next command and data via dualport memory access into the target RAM.
DualPort can reduce the programming time significantly.
See Examples.
CORE <number>
Defines that the target controlled algorithm is executed on the specified core.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
63
FLASH
Example for Format 1
FLASH: Intel Strata FLASH 28F320J3A, 16 bit mode, word access
CPU: ARM core
Memory configuration:
•
FLASH from 0x0--0x3FFFFF
•
RAM starting at address 0xA0000000
; Format 1
FLASH.RESet
FLASH.Create 1. 0x0--0x3fffff 0x20000 TARGET Word
;
<code_range>
<data_range>
<flash_algorithm>
FLASH.Target 0xA0000000++0xFFF 0xA0001000++0xFFF \
~~\demo\arm\flash\word\i28f200j3.bin
; binary file only!
•
•
<code_range>
-
The code for the <flash_algorithm> is downloaded to <code_range>
-
required size for the code is size_of(<flash_algorithm>) + 32 byte
<data_range>
-
The specified data range is used for <flash_algorithm>
-
<buffer_size> is the number of bytes which are transferred from the TRACE32 software to
the target controlled FLASH programming routine in one step. Recommended buffer size is
4 KByte, smaller buffer sizes are also possible. The max. buffer size is 16 KByte.
- <buffer_size> =
size_of(<data_range>) - 32 byte argument buffer - 256 byte stack
•
<flash_algorithm>
The FLASH algorithm can be found under: ~~/demo/arm/flash/word/i28f200j3.bin
Programming procedure:
1.
The TRACE32 software takes care of saving the contents of
<code_range>
<data_range>
used CPU registers
before the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are started
before patching the code in FLASH or setting a software breakpoint to FLASH is performed after
FLASH.AUTO is used
when FLASH programming is enabled with the FLASH.Program command
2.
The FLASH program is loaded to the target and the requested FLASH programming commands
are performed.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
64
FLASH
3.
The saved context (register and data) is restored
after the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are finished
after patching the code in FLASH or setting a software breakpoint to FLASH is done when
FLASH.AUTO is used
when FLASH programming is disabled with the FLASH.Program command.
Complete example:
; Format 1
FLASH.RESet
FLASH.Create 1. 0x0--0x3fffff 0x20000 TARGET Word
FLASH.Target 0xA0000000++0xFFF 0xA0001000++0xFFF \
~~\demo\arm\flash\word\i28f200j3.bin
FLASH.Erase 1.
FLASH.Program 1.
Data.LOAD.Elf my_application.elf /Word
FLASH.Program off
Data.LOAD.Elf my_application.elf /Word /DIFF
IF FOUND()
Print "Not ok!"
ELSE
Print "FLASH ok!"
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
65
FLASH
Example for Format 2
FLASH: Intel Strata FLASH 28F320J3A, 16 bit mode, word access
CPU: ARM core
Memory configuration:
•
FLASH from 0x0--0x3FFFFF
•
RAM starting at address 0xA0000000
; Format 2
FLASH.RESet
FLASH.Create 1. 0x0--0x3FFFFF 0x20000 TARGET Word
;
<code_addr> <data_addr> <buffer_size> <flash_algorithm>
FLASH.Target 0xA0000000 0xA0001000 0x1000 \
~~/demo/arm/flash/word/i28f200j3.bin
; binary file only!
•
•
•
<code_address>
-
The code for the <flash_algorithm> is downloaded to the target RAM starting at
<code_address>
-
Required size for the code is size_of(<flash_algorithm>) + 32 byte
<data_address>
-
The address range starting with <data_address> is used as data range for
<flash_algorithm>
-
Required size for the data is
<buffer_size> + 32 byte argument buffer + 256 byte stack
<buffer_size>
<buffer_size> is the number of bytes which are transferred from the TRACE32 software to
the target controlled FLASH programming routine in one step. Recommended buffer size is
4 KByte, smaller buffer sizes are also possible. The max. buffer size is 16 KByte.
•
<flash_algorithm>
The FLASH algorithm can be found under: ~~/demo/arm/flash/word/i28f200j3.bin
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
66
FLASH
Programming procedure:
1.
The TRACE32 software takes care of saving the contents of
<code_address>++(size_of(<flash_algorithm>)+32 byte)
<data_address>++(<buffer_size> + 32 byte argument buffer + 256 byte
stack>)
used CPU registers
before the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are started
before patching the code in FLASH or setting a software breakpoint to FLASH is performed after
FLASH.AUTO is used
when FLASH programming is enabled with the FLASH.Program command
2.
The FLASH program is loaded to the target and the requested FLASH programming commands
are executed.
3.
The saved context (register and data) is restored.
after the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are finished
after patching the code in FLASH or setting a software breakpoint to FLASH is done when
FLASH.AUTO is used
when FLASH programming is disabled with the FLASH.Program command.
Complete example
; Format 2
FLASH.RESet
FLASH.Create 1. 0x0--0x3FFFFF 0x20000 TARGET Word
FLASH.Target 0xA0000000 0xA0001000 0x1000 \
~~/demo/arm/flash/word/i28f200j3.bin
FLASH.Erase 1.
FLASH.Program 1.
Data.LOAD.Elf my_application.elf /Word
FLASH.Program off
Data.LOAD.Elf my_application.elf /Word /DIFF
IF FOUND()
Print "Not ok!"
ELSE
Print "FLASH ok!"
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
67
FLASH
Example 3 (Recommended to Test Your Own FLASH Algorithm)
Tips for writing your own FLASH algorithm can be found in “How to Write your own FLASH Algorithm”
(flash_app_own_algorithm.pdf).
FLASH: Intel Strata FLASH 28F320J3A, 16 bit mode, word access
Memory configuration:
•
FLASH from 0x0--0x3FFFFF
•
RAM starting at address 0xA0000000
; Format 1 using your own FLASH algorithm
FLASH.RESet
FLASH.Create 1. 0x0--0x3fffff 0x20000 TARGET Word
;
<code_range>
<data_range>
FLASH.Target 0xA0000000++0xFFF 0xA0001000++0xFFF
Data.LOAD.Elf my_flash_algorithm.elf
FLASH.Erase ALL
FLASH.Program ALL
Data.LOAD.Bin flash_contents.bin
FLASH.Program off
•
•
<code_range>
-
The code for my_flash_algorithm.elf is downloaded to <code_range>
-
Required size for the code is size_of(my_flash_algorithm.elf) + 32 byte
<data_range>
-
The specified data range is used for my_flash_algorithm.elf
-
<buffer_size> is the number of bytes which are transferred from the TRACE32 software to
the target controlled FLASH programming routine in one step. Recommended buffer size is
4 KByte, smaller buffer sizes are also possible. The max. buffer size is 16 KByte.
- <buffer_size> =
size_of(<data_range>) - 32 byte argument buffer - 256 byte stack
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
68
FLASH
Programming procedure:
1.
The FLASH program is loaded to the target by the user.
2.
The TRACE32 software saves the used CPU registers
before the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are started
when FLASH programming is enabled with the FLASH.Program command.
3.
The requested FLASH commands are executed.
4.
The saved CPU registers are restored.
after the commands FLASH.Erase, FLASH.UNLOCK, FLASH.LOCK are finished
when FLASH programming is disabled with the FLASH.Program command.
Examples for /DualPort
Example for processor-internal FLASH:
;
<code>
FLASH.TARGET 0x40000000
<data>
0x40002000
<bufsize>
0x1000
*.bin
/DualPort
<bufsize>
0x1000 *.bin
/DualPort
Example for Cortex/ARM using dual-port access via AHB bus:
;
<code>
FLASH.TARGET 0x20000000
<data>
EAHB:0x20001000
Example for /FirmWareRAM
FLASH declaration of LPC43xx internal FLASH:
FLASH.TARGET 0x10000000 0x10001000 0x2000 \
~~/demo/arm/flash/long/lpc4300.bin \
/STACKSIZE 0x200 /FirmWareRAM 0x10089FF0--0x10089FFF
See also
■ FLASH
❏ FLASH.TARGET.BUILD()
■ FLASH.CFI
❏ FLASH.TARGET.FILE()
■ FLASH.state
■ FLASH.TARGET2
▲ ’FLASH Declaration in Detail’ in ’Onchip/NOR FLASH Programming User’s Guide’
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
69
FLASH
FLASH.TARGET2
Define second target controlled algorithm
Format 1:
FLASH.TARGET2 <code_address> <data_address> <buffer_size> <file> \
[/STACKSIZE <size>] [/FirmWareRAM <address_range>] \
[/DualPort | /CORE <number>]
Format 2:
FLASH.TARGET2 <code_range> <data_range> [<file>] \
[/STACKSIZE <size>] [/FirmWareRAM <address_range>] \
[/DualPort | /CORE <number>]
The command FLASH.TARGET2 supports the simultaneous programming of multiple flash devices with
two different flash algorithms. This allows to program for example processor internal and processor external
NOR flash, HyperFlash or QSPI flash with a single programming command sequence.
The command syntax is the same as for the FLASH.TARGET command.
; set up declaration for off-chip flash 1
FLASH.Create 1. 0x00000000--0x0001FFFF 0x10000 TARGET Long
FLASH.TARGET 0xC0000000 0xD0000000 0x2000 \
~~/demo/arm/flash/long/am29lv100.bin
; set up declaration for off-chip flash 2
FLASH.Create 2. 0xA4000000--0xA401FFFF 0x4000 TARGET2 Long
FLASH.Create 2. 0xA4020000--0xA43FFFFF 0x20000 TARGET2 Long
FLASH.TARGET2 0xC0000000 0xD0000000 0x2000 \
~~/demo/arm/flash/long/am29n256.bin
…
; single flash programming sequence for both flash devices
FLASH.ReProgram ALL /Erase
Data.LOAD.Elf my_program.elf
FLASH.ReProgram off
See also
■ FLASH
❏ FLASH.TARGET.BUILD()
■ FLASH.CFI
❏ FLASH.TARGET2.FILE()
■ FLASH.state
■ FLASH.TARGET
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
70
FLASH
FLASH.UNLOCK
Format:
Unlock FLASH
FLASH.UNLOCK <unit> | <address_range> | ALL | off
Many FLASH devices provide a sector/block protection to avoid unintended erasing or programming
operations. This protection has to be unlocked in order to erase or program a FLASH device.
<unit>
Unlock the specified unit.
ALL
Unlock all FLASH sectors.
off
(no effect)
Two unlocking schemes are used by FLASH devices:
1.
Each individual sector/block has to be unlocked (individual unlocking).
2.
The execution of a single unlock command sequence on an address range unlocks the complete
FLASH device (parallel unlocking).
Re-locking has to be executed usually sector by sector.
Please refer to the data sheet of your FLASH device, to find out which scheme is used by your FLASH
device.
Example for 1 (individual unlocking):
INTEL 28F128L18 at address 0x0, connected to the CPU via a 16 bit data bus
FLASH.RESet
; reset FLASH declaration
FLASH.CFI 0x0 Word
; declare FLASH sectors via
; CFI query
FLASH.UNLOCK ALL
; unlock each sector individually
…
; erasing and programming
FLASH.LOCK ALL
; re-lock each sector individually
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
71
FLASH
Example for 2 (parallel unlocking):
INTEL 28F128J3 at address 0x0, connected to the CPU via a 16 bit data bus, each sector 128KByte
FLASH.RESet
; reset FLASH declaration
FLASH.CFI 0x0 Word
; declare FLASH sectors via
; CFI query
FLASH.UNLOCK 0x0--0x1ffff
; execute a single unlock command
; by using an address range
; inside of a FLASH sector (faster)
…
; erasing and programming
FLASH.LOCK ALL
; re-lock each sector individually
See also
■ FLASH
■ FLASH.LOCK
■ FLASH.state
▲ ’TRACE32 Tool-based Programming’ in ’Tips to Solve NOR FLASH Programming Problems’
▲ ’Programming Commands’ in ’Onchip/NOR FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
72
FLASH
FLASH.UNSECUREerase
Format:
Unsecure a device
FLASH.UNSECUREerase
Debug access is no longer possible if the CPU is secured by programming special FLASH address
locations.
In these cases, the FLASH.UNSECUREerase command can be used to unsecure a device by sending
special commands via the debug interface. As a result, the FLASH is completely erased by the unsecure
sequence. Debug access is now possible again.
SYStem.CPU <cpu_type>
FLASH.UNSECUREerase
SYStem.Up
NOTE:
FLASH.UNSECUREerase is a CPU specific command.
See also
■ FLASH
■ FLASH.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
73
FLASH
FLASHFILE
FLASHFILE
NAND flash and serial flash devices
NAND FLASH devices and serial FLASH devices can be programmed and erased by the FLASHFILE
command group.
•
For a description of the NAND FLASH programming concept, see “NAND FLASH Programming
User’s Guide” (nandflash.pdf).
•
For a description of the Serial FLASH programming concept, see “Serial FLASH Programming
User’s Guide” (serialflash.pdf).
See also
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
❏
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
BSDL.FLASH
FLASHFILE.BSDLFLASHTYPE
FLASHFILE.COPY
FLASHFILE.Create
FLASHFILE.Erase
FLASHFILE.GETEXTCSD
FLASHFILE.GETONFI
FLASHFILE.LOAD
FLASHFILE.LOADECC
FLASHFILE.LOCK
FLASHFILE.RESet
FLASHFILE.SAVEALL
FLASHFILE.SAVESPARE
FLASHFILE.SETEXTCSD
FLASHFILE.TARGET
FLASHFILE.SPAREADDRESS()
FLASHFILE.BSDLaccess
FLASHFILE.CONFIG
FLASHFILE.COPYSPARE
FLASHFILE.DUMP
FLASHFILE.GETBADBLOCK
FLASHFILE.GETID
FLASHFILE.List
FLASHFILE.LOADALL
FLASHFILE.LOADSPARE
FLASHFILE.MSYSDLL
FLASHFILE.SAVE
FLASHFILE.SAVEECC
FLASHFILE.Set
FLASHFILE.state
FLASHFILE.UNLOCK
▲ ’FLASHFILE Function’ in ’General Functions’
▲ ’Introduction’ in ’NAND FLASH Programming User’s Guide’
▲ ’Introduction’ in ’Serial FLASH Programming User’s Guide’
FLASHFILE.BSDLaccess
Format:
Enables FLASH access via boundary scan
FLASHFILE.BSDLaccess ON | OFF
Enables or disables FLASH memory access via boundary scan. The boundary scan chain must be
configured with BSDL.FLASH.IFDefine and BSDL.FLASH.IFMap.
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
74
FLASHFILE
FLASHFILE.BSDLFLASHTYPE
Format:
Define FLASH type
FLASHFILE.BSDLFLASHTYPE <flash_family_code>
Declaration of FLASH memories.
<flash_family_code>
Determines the programming algorithm. Supported flash family codes
are listed on http://www.lauterbach.com/ylist.html in the Code column.
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.CONFIG
Format 1:
Configure FLASH
FLASHFILE.CONFIG <cmd_reg> <addr_reg> <io_reg>
NAND FLASH
Format 2:
FLASHFILE.CONFIG <spi_tx> <spi_rx> <cs_reg> <cs_port>
Serial FLASH
NAND FLASH
NAND FLASH devices use a common multiplexed bus for data, address and command transfers. With the
two signals (Command Latch Enable, Address Latch Enable) the access is latched to the appropriate
register. If the two signals are inactive, the access is performed to the I/O register.
Normally CLE and ALE are part of the address on the external bus. Thus NAND FLASHs data, address and
command register can be mapped to the processors external memory space.
The user has to define the following three addresses:
<cmd_reg>
Address of the NAND FLASH command register
<addr_reg>
Address of the NAND FLASH address register
<io_reg>
Address of the NAND FLASH I/O register
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
75
FLASHFILE
Example: The NAND FLASH device chip select is assigned to the address 0xa0000000.
CPU
NAND FLASH
<addr_reg>: 0xa0020000
A17
ALE
<cmd_reg>: 0xa0040000
A18
CLE
<io_reg>:
0xa0000000
Data bus
For a processor with integrated NAND FLASH controller this command can be omitted. Instead a script for
the configuration of such a controller must be executed. Scripts for the supported NAND FLASH controllers
are located in the demo directory.
Serial FLASH
tbd.
See also
■ FLASHFILE
■ FLASHFILE.state
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
FLASHFILE.COPY
Copy to FLASH
Format:
FLASHFILE.COPY <source_range> <target_address> [/<option>]
<option>:
ComPare | DIFF | wordSWAP | LongSWAP | QuadSWAP
The source range data is copied to the defined target address. It is useful to write some memory data to
FLASH memory.
<option>
For a description of the options, see FLASHFILE.LOAD.binary.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
76
FLASHFILE
; Copy the 2MB virtual memory data at 0x0 to the NAND FLASH address at
0x100000, the writing scheme is the skipped way
FLASHFILE.COPY VM:0x0--0x1FFFFF 0x100000
; Compare the data between virtual memory and NAND FLASH
FLASHFILE.COPY VM:0x0--0x1FFFFF 0x100000 /ComPare
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.COPYSPARE
Copy to spare area of NAND FLASH
Format:
FLASHFILE.COPYSPARE <source_range> <spare_area_address>
[/<option>]
<option>:
ComPare | DIFF | wordSWAP | LongSWAP | QuadSWAP
The source range data is copied from the TRACE32 virtual memory (VM:) to the defined spare area address
of the NAND flash.
<option>
For a description of the options, see FLASHFILE.LOAD.binary.
; NAND Page Size (example for main/spare: 2KB/64B)
; From the TRACE32 virtual memory, copy 64B to the spare area that
; corresponds to the NAND FLASH main address 0x100000
FLASHFILE.COPYSPARE
VM:0x0--0x3F
FLASHFILE.SPAREADDRESS(0x100000)
;or
;the spare area address 0x8000 corresponds to the main area 0x100000
FLASHFILE.COPYSPARE
VM:0x0--0x3F
0x8000
See also
■ FLASHFILE
❏ FLASHFILE.SPAREADDRESS()
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
77
FLASHFILE
FLASHFILE.Create
Declaration of flash memories: create a block/sector
Format:
FLASHFILE.Create <address_range> <erase_unit_size> <bus_width>
<erase_unit_
size>:
<sector> | <block>
<bus_width>:
Byte | Word
Generally, the FLASHFILE.Create command is only used for programming non-uniform serial flash
memories in TRACE32. You do not need to use FLASHFILE.Create if the erase unit size of the sector or
block is uniform.
The FLASHFILE.Create command instructs TRACE32 to correctly calculate the non-uniform flash block
size/flash sector size.
<address_range>
Address range within the flash memory.
<erase_unit_size>
The erase unit is called sector for serial flash and block for NAND flash
memories.
In case of a NAND flash:
A block equals the size of an ERASE BLOCK of the NAND command
(0x60/0xD0).
In case of a Serial flash:
A sector equals the size of an ERASE SECTOR of the Serial flash erase
command (0x20/0x40/0xD8).
<bus_width>
The bus width parameter defines the external flash memory bus size (8-bit,
16-bit).
Example: In this example, TRACE32 is informed that the serial flash device S25FL129 has 32 boot sectors,
each with a size of 4Kbyte, and 254 main sectors, each with a size of 64KByte.
FLASHFILE.Create 0x0--0x1FFFF 0x1000 Byte
FLASHFILE.Create 0x20000--0xFFFFFF 0x10000 Byte
;boot sectors
;main sectors
See also
■ FLASHFILE
■ FLASHFILE.List
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
78
FLASHFILE
FLASHFILE.DUMP
Dump FLASH
Format:
FLASHFILE.DUMP [<address> | <range>] [/<format> | <option> …]
<format>:
NoHex | NoAscii
Byte | Word | Long | Quad | TByte | HByte
BE | LE
<option>:
MAIN
SPARE
Track
ReFresh
Reads the FLASH memory to the Data.dump window. You can read the main and spare data from NAND
FLASH devices. You can find the matched spare area easily from the main area dump window by the Track
option.
See also
■ FLASHFILE
■ FLASHFILE.state
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
79
FLASHFILE
FLASHFILE.Erase
Format:
Erase FLASH
FLASHFILE.Erase <range> /EraseBadBlocks
Erase FLASH memory.
MAIN
SP
MAIN
MAIN
SP
1
1
2
2
3
3
4
Bad
4
Bad
4
5
5
N
N
SP
MAIN
SP
Bad
FLASHFILE.ERASE /EraseBadBlocks
FLASHFILE.Erase
;Erase NAND FLASH except bad blocks
FLASHFILE.Erase 0x0--0xFFFF
;Erase NAND FLASH including bad blocks
FLASHFILE.Erase 0x0--0xFFFF /EraseBadBlocks
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
80
FLASHFILE
FLASHFILE.GETBADBLOCK
Format:
Get the bad block addresses
FLASHFILE.GETBADBLOCK <range>
Displays the bad block addresses within the specified range. If the NAND FLASH block #0 is bad, then
TRACE32 cannot detect any bad blocks in the NAND FLASH device.
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.GETEXTCSD
Format:
Get the extended CSD register
FLASHFILE.GETEXTCSD
Gets the extended CSD register, which defines the MMC flash properties and selected modes. Each
register byte is described in the JEDEC standard eMMC documentation.
FLASHFILE.GETEXTCSD
AREA.view
;display the result in the AREA.view window
See also
■ FLASHFILE
■ FLASHFILE.SETEXTCSD
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
81
FLASHFILE
FLASHFILE.GETID
Format:
Get ID
FLASHFILE.GETID
Get the manufacture and device ID from FLASH. This command is mainly used to test the communication
between the CPU and FLASH device.
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.GETONFI
Format:
Display ONFI
FLASHFILE.GETONFI
Displays the Open NAND FLASH Interface (ONFI) specification. This command works only for NAND flash
devices that support ONFI.
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
82
FLASHFILE
FLASHFILE.List
Format:
List blocks or sectors of FLASH memory
FLASHFILE.List
Opens the FLASHFILE.List window, displaying the list of blocks or sectors defined with the
FLASHFILE.Create command. Each block or sector corresponds to one erase unit size of the flash
memory.
Example: In this example, TRACE32 is informed that the serial flash device S25FL129 has 32 boot sectors,
each with a size of 4Kbyte, and 254 main sectors, each with a size of 64KByte.
FLASHFILE.Create 0x0--0x1FFFF 0x1000 Byte
FLASHFILE.Create 0x20000--0xFFFFFF 0x10000 Byte
;boot sectors
;main sectors
A
B
A Each row corresponds to one 4KB boot sector. B Each row corresponds to one 64KB main
sector.
See also
■ FLASHFILE
■ FLASHFILE.Create
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
83
FLASHFILE
FLASHFILE.LOAD
Load files to FLASH
Using the FLASHFILE.LOAD command group, you can load binary, ELF, Intel HEX, and Srecord files to the
NAND FLASH.
See also
■ FLASHFILE
■ FLASHFILE.LOAD.Srecord
■ FLASHFILE.LOAD.binary
■ FLASHFILE.state
■ FLASHFILE.LOAD.Elf
■ FLASHFILE.LOAD.IntelHex
FLASHFILE.LOAD.binary
Write FLASH
[Examples]
Format:
FLASHFILE.LOAD.binary <file> [<address> <range>] /<option>
<option>:
WriteBadBlocks | ComPare | DIFF |
wordSWAP | LongSWAP | QuadSWAP |
SKIP <offset> | ZIPLOAD | NoFF | NoZero
The data from the binary <file> is programmed to the flash.
If the command is called without <address> and <range>, the complete file will be programmed to flash
beginning from target address 0.
<address>
<range>
•
File format without address information (e.g. binary): base address
of the flash memory
•
File format with address information: address offset of the flash
memory
•
If specified, only the data within the address range will be loaded.
Data outside this address range will be ignored.
•
If specified for file formats without address information, the start
address of <range> is used as base address and <address> will
be ignored.
ComPare
Verify the contents of <file> against the flash main area.
DIFF
Compare the contents of the FLASH with the file contents. See example.
LongSWAP
Swaps high and low bytes of a 32-bit word during load.
NoFF
Skips the pages of a <file> that contain only 0xFF.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
84
FLASHFILE
NoZero
Skips the pages of a <file> that contain only 0x00.
NOTE: Pages containing only 0xFF or 0x00 can cause unexpected ECC
code generation on the NAND flash spare area.
The purpose of the options NoFF and NoZero is to prevent unexpected
ECC code generation by skipping these pages.
For information about ECC, see “Appendix A: ECC (Error Correction
Code)” (nandflash.pdf).
QuadSWAP
Swaps high and low bytes of a 64-bit word during load.
SKIP
If the option SKIP <offset> is specified, the first <offset> bytes of the file are
omitted.
wordSWAP
Swaps high and low bytes of a 16-bit word during load.
WriteBadBlock
Program NAND Flash including bad blocks. (Does not apply to serial
flash). See example.
ZIPLOAD
Speeds up the transfer of compressed files through the JTAG interface,
decompresses and programs the files to the FLASH memory on the
target board.
Requirements for using ZIPLOAD:
•
SDRAM > 256 KB; SDRAM > 512 KB is recommended.
•
Configure the CPU clock and SDRAM clock.
See example.
Example 1
FLASHFILE.RESet
; FLASHFILE.Config <cmd_reg> <addr_reg> <io_reg>
FLASHFILE.Config 0xA0040000 0xA0020000 0xA0000000
; FLASHFILE.TARGET <code_range> <data_range> <file>
FLASHFILE.TARGET 0x1000++0x1FFF 0x3000++0x1FFFF \
~~\demo\arm\flash\word\nand1216.bin
; get the flash identification
FLASHFILE.GETID
; erase first 1 MByte
FLASHFILE.Erase 0++0xFFFFF
; write file to NAND FLASH
FLASHFILE.LOAD my_file.bin 0++0xFFFFF
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
85
FLASHFILE
Example 2 - ZIPLOAD option:
FLASHFILE.LOAD
*
0x0
/ZIPLOAD
;the asterisk (*) lets you browse
;for the compressed file you want
;to load
Example 3 - Illustration of the WriteBadBlock option:
My_file
NAND
Main
SP
My_file
NAND
Main
SP
1
1
1
1
2
2
2
2
3
3
3
3
4
4
4
Bad
5
4
5
5
N
N-1
N
N
FLASHFILE.LOAD …
Bad
FLASHFILE.LOAD … /WriteBadBlock
Example 4 - DIFF option:
; compare the contents of the NAND FLASH with the file contents
FLASHFILE.LOAD.Elf data.elf /DIFF
; FOUND() returns TRUE if a difference was found
IF FOUND()
PRINT "Not ok!"
ELSE
PRINT "NAND FLASH ok!"
See also
■ FLASHFILE.LOAD
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
86
FLASHFILE
FLASHFILE.LOAD.Elf
Load ELF file
Format:
FLASHFILE.LOAD.Elf <file> [<address> <range>] [/<option>]
<option>:
ComPare | DIFF
wordSWAP | LongSWAP | QuadSWAP
Loads an ELF file to the FLASH memory on the target.
<option>
For a description of the options, etc., see FLASHFILE.LOAD.binary.
FLASHFILE.LOAD.ELF *.*
-0x20000000
0x0--0xFFFFFF
See also
■ FLASHFILE.LOAD
FLASHFILE.LOAD.IntelHex
Load Intel hex file
Format:
FLASHFILE.LOAD.IntelHex <file> [<address> <range>] [/<option>]
<option>:
ComPare | DIFF
wordSWAP | LongSWAP | QuadSWAP
Loads a file in the intel HEX format to the NAND Flash.
<option>
For a description of the options, etc., see FLASHFILE.LOAD.binary.
See also
■ FLASHFILE.LOAD
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
87
FLASHFILE
FLASHFILE.LOAD.Srecord
Load an “Srecord” file
Format:
FLASHFILE.LOAD.S1record <file> [<address> <range>] [/<option>]
FLASHFILE.LOAD.S2record <file> [<address> <range>] [/<option>]
FLASHFILE.LOAD.S3record <file> [<address> <range>] [/<option>]
<option>:
ComPare | DIFF
wordSWAP | LongSWAP | QuadSWAP
Loads a file in the Srecord format to the NAND Flash.
<option>
For a description of the options, etc., see FLASHFILE.LOAD.binary.
See also
■ FLASHFILE.LOAD
FLASHFILE.LOADALL
Load to main area and spare area
Format:
FLASHFILE.LOADALL <file> [<address> <range>] [/<option>]
<option>:
ComPare | DIFF | WriteBadBlocks
wordSWAP | LongSWAP | QuadSWAP
Loads <file> to the main area and the spare area of the NAND flash memory. This is useful for cloning a
NAND flash device.
<option>
For a description of the options, etc., see FLASHFILE.LOAD.binary.
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
88
FLASHFILE
FLASHFILE.LOADECC
Load ECC file to spare area
Format:
FLASHFILE.LOADECC <params> (deprecated)
Use FLASHFILE.SAVEECC + FLASHFILE.LOADSPARE.
<params>:
<file> <range | value> <ref_size> <ecc_size> <location>
Loads a saved ECC file to the spare area of a NAND Flash. TRACE32 calculates the location of the spare
area based on the range of the main area, which is known to users.
<file>
Source file containing the error correction code (ECC).
<range>
Range of the main area.
<value>
Start address of the main area.
<ref_size>
The same <ref_size> with which the ECC file was saved by the
FLASHFILE.SAVEECC.* command.
See also [B] below.
<ecc_size>
The same length of the ECC word with which the ECC file was saved by
the FLASHFILE.SAVEECC.* command.
See also [A] below.
<location>
Spare area address (byte) to which the ECC file is loaded in the spare
area of the NAND Flash.
See also [D] below.
Example:
;
FLASHFILE.SAVEECC.hamming
;
FLASHFILE.LOADECC
file.hmg
file.hmg
<range>
0x0--0xFFFF
<ref_size>
512.
<range>
<ref_size> <ecc_size> <location>
0x0--0xFFFF
512.
3.
8.
;view the result of FLASHFILE.SAVEECC.hamming and FLASHFILE.LOADECC
AREA.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
89
FLASHFILE
A
B
C
D
A In this example, each ECC word consists of 3 bytes (= <ecc_size>).
B In this example, 512 bytes in the source memory range are represented by an ECC word.
(512 = <ref_size>)
C DUMP of file.hmg, which was created with FLASHFILE.SAVEECC.hamming.
D <location> address in the spare area to which file.hmg was loaded with FLASHFILE.LOADECC.
In this example, the <location> address has an offset of 8 bytes.
See also
■ FLASHFILE
■ FLASHFILE.SAVEECC
■ FLASHFILE.state
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
90
FLASHFILE
FLASHFILE.LOADSPARE
Format:
Write NAND FLASH spare area
FLASHFILE.LOADSPARE <file> <range> /WriteBadBlocks /ComPare
The data from <file> is written to the spare area on the address and size specified by <range>. At first only
binary files are supported.
Nand
Main
SP
My_File_Spare
1
1
2
2
3
3
4
Bad
5
4
N
N-1
FLASHFILE.LOADSPARE
See also
■ FLASHFILE
❏ FLASHFILE.SPAREADDRESS()
■ FLASHFILE.state
FLASHFILE.LOCK
Format:
Lock the FLASH device
FLASHFILE.LOCK <range>
Locks the FLASH device.
See also
■ FLASHFILE
■ FLASHFILE.state
■ FLASHFILE.UNLOCK
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
91
FLASHFILE
FLASHFILE.MSYSDLL
Format:
Access an M-Systems DiskOnChip flash device
FLASHFILE.MSYSDLL <file> [<cmd> …]
Accesses an M-Systems DiskOnChip flash device.
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.RESet
Format:
Reset FLASH configuration
FLASHFILE.RESet
The setup for the FLASH device is cleared and set to the default values.
See also
■ FLASHFILE
■ FLASHFILE.state
▲ ’Scripts for eMMC Controllers’ in ’eMMC FLASH Programming User’s Guide’
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
▲ ’Scripts for SPI Controllers’ in ’Serial FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
92
FLASHFILE
FLASHFILE.SAVE
Format:
Save FLASH
FLASHFILE.SAVE <file> <range>
The data whose address and size is specified by <range> is read from the NAND FLASH main area and
written to <file>.
Nand
Main
SP
File
1
1
2
2
3
3
Bad
Bad
4
4
N-1
N-1
FLASHFILE.SAVE
See also
■ FLASHFILE
■ FLASHFILE.state
FLASHFILE.SAVEALL
Format:
Save the main area and the spare area
FLASHFILE.SAVEALL <file> <range> [/SkipBadBlocks]
Saves the main area and the spare area of the NAND flash memory to <file>. This is useful for cloning a
NAND flash device.
SkipBadBlocks
Skips bad blocks while saving the contents of the NAND Flash main area
to <file>.
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
93
FLASHFILE
FLASHFILE.SAVEECC
Save error correction code (ECC) to file
The FLASHFILE.SAVEECC command group is used to generate and save error correction code (ECC) to
file. The ECC is generated from the target application residing in the main area of a flash device.
Depending on the FLASHFILE.SAVEECC.* command used, TRACE32 generates the ECC with one of the
following algorithms:
•
Bose-Chaudhuri-Hocquenghem (BCH) algorithm
•
Hamming algorithm
•
Reed-Solomon algorithm
Use FLASHFILE.LOADECC to load ECC files to the spare area of a flash device.
See also
■ FLASHFILE
■ FLASHFILE.SAVEECC.BCH
■ FLASHFILE.SAVEECC.ReedSolomon
■ FLASHFILE.LOADECC
■ FLASHFILE.SAVEECC.hamming
■ FLASHFILE.state
FLASHFILE.SAVEECC.BCH
Save ECC with BCH algorithm
[Example]
Format:
FLASHFILE.SAVEECC.BCH <params> [/REVERSE | /SWAP |
/LAYOUT <layout_block_size> <offset> <bytes_per_block>]
<params>:
<file> <range> <ref_size> <g_field> <err_correc>
Saves the error correction code (ECC) to file using the BCH algorithm.
<file>
Destination file for the error correction code (ECC).
<range>
Source memory range for which you want to save the ECC to file.
<ref_size>
Number of bytes that will be represented by an ECC word.
Example: One ECC word is generated for every 512. bytes of the
<range> if the <ref_size> is set to 512. bytes.
<g_field>
Dimension of the Galois field.
<err_correc>
Error correction capability (measured in bit) of the BCH code.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
94
FLASHFILE
SWAP
Swaps the read byte order (byte access) of each ECC word.
Example for the 4 byte ECC word 0x12345678:
REVERSE
Without /SWAP
0x|12|34|56|78|
With /SWAP
0x|78|56|34|12|
Reverses the read bit order (bit access) of each ECC word.
Example: The ECC word is 0xC1, i.e. 1 byte [7:0]. The REVERSE option
changes bit 7 to bit 0, bit 6 to bit 1, and so on. Thus, the resulting reversed
ECC word is 0x83.
LAYOUT
Without /REVERSE
0x| C | 1
0y|1100|0001
With /REVERSE
0x| 8 | 3
0y|1000|0011
For a description of LAYOUT, see FLASHFILE.SAVEECC.hamming.
For examples for FLASHFILE.SAVEECC.BCH ... /LAYOUT, see examples
2 and 3 below.
Examples for FLASHFILE.SAVEECC.BCH
Example 1:
;save the ECC file:
<range>
<ref_s.><g_field><err_correc>
FLASHFILE.SAVEECC.BCH file.bch 0x0--0xFFFF
512.
13.
8.
;open an AREA window to view the result
AREA.view
;optionally, view the ECC file with the DUMP command
;for WIDTH use the width of the generated ECC word
DUMP file.bch /WIDTH 13.
<g_field>
<err_correc>
<ref_size>
Generated 13-byte ECC word
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
95
FLASHFILE
Example 2:
;without LAYOUT: ECC in linear form
FLASHFILE.SAVEECC.BCH aaa.bin 0x0--0xFFFFF
DUMP aaa.bin
;with LAYOUT: ECC in non-linear form
FLASHFILE.SAVEECC.BCH aab.bin 0x0--0xFFFFF
512. 13. 8.
512. 13. 8. \
/LAYOUT 0x30 5. 3.
DUMP aab.bin
Result without /LAYOUT
Result with /LAYOUT
B
A
C
A
C
Compare with [C] on the right.
A <layout_block_size> = 0x30
B <offset> = 5
C <bytes_per_block> = 3
Example 3:
FLASHFILE.SAVEECC.BCH spare-bch.bin 0x0--0xFFFFF 512. 13. 8.
\
/LAYOUT 0x10 2. 13.
See also
■ FLASHFILE.SAVEECC
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
96
FLASHFILE
FLASHFILE.SAVEECC.hamming
Save ECC with Hamming algorithm
[Examples]
Format:
FLASHFILE.SAVEECC.hamming <file> <range> <ref_size>
[/SWAP | /LAYOUT <layout_block_size> <offset> <bytes_per_block>]
Saves the error correction code (ECC) to file using the Hamming algorithm. By default, the ECC words
generated by the Hamming algorithm are fixed (3 bytes). Consequently, you do not need to specify the
<ecc_size>, but only <file>, <range>, and <ref_size>.
<file>
Destination file for the error correction code (ECC).
<range>
Source memory range for which you want to save the ECC to file.
<ref_size>
Number of bytes that will be represented by an ECC word.
Example: One ECC word is generated for every 512. bytes of the
<range> if the <ref_size> is set to 512. bytes.
SWAP
In the generated 3-byte ECC words, the location of ECC0 and ECC1 is
swapped. The location of ECC2 remains fixed.
Example:
LAYOUT
Without /SWAP
ECC0
FF
69
ECC1
3C
AA
ECC2
0F
96
With /SWAP
ECC0
3C
AA
ECC1
FF
69
ECC2
0F
96
Without LAYOUT: The error correction code (ECC) is written to file in
linear form.
With LAYOUT: The ECC is written to file in non-linear form and the layout
of the ECC is modified by the arguments <layout_block_size>, <offset>,
and <bytes_per_block>. See examples 2 and 3 below.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
97
FLASHFILE
Examples for FLASHFILE.SAVEECC.hamming
Example 1:
;save the ECC file:
FLASHFILE.SAVEECC.hamming
file.hmg
<range>
0x0--0xFFFF
<ref_size
512.
AREA.view ;open an AREA window to view the result
;optionally, view the ECC file with the DUMP command
;use WIDTH 3. because each ECC word is 3 bytes
DUMP file.hmg /WIDTH 3.
Generated 3-byte ECC word
<ref_size>
Example 2:
;without LAYOUT: ECC in linear form
FLASHFILE.SAVEECC.hamming aaa.bin 0x0--0xFFFFF 512.
DUMP aaa.bin
;with LAYOUT: ECC in non-linear form
FLASHFILE.SAVEECC.hamming aab.bin 0x0--0xFFFFF 512. /LAYOUT 0x30 5. 3.
DUMP aab.bin
Result without /LAYOUT
Result with /LAYOUT
B
A
C
A
C
A <layout_block_size> = 0x30
B <offset> = 5
C <bytes_per_block> = 3
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
98
FLASHFILE
Example 3:
FLASHFILE.SAVEECC.hamming spare-ham.bin 0x0--0xFFFFF 256. \
/LAYOUT 0x40 40. 24.
See also
■ FLASHFILE.SAVEECC
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
99
FLASHFILE
FLASHFILE.SAVEECC.ReedSolomon
Format:
Save ECC with Reed-S. algorithm
FLASHFILE.SAVEECC.ReedSolomon <file> <range>
[/LAYOUT <layout_block_size> <offset> <bytes_per_block>]
Saves the error correction code (ECC) to file using the Reed-Solomon algorithm.
By default, one ECC word is 10 bytes for 4-bits error correction. Consequently, you do not need to specify
the <ecc_size>, but only <file> and <range>.
<file>
Destination file for the error correction code (ECC).
<range>
Source memory range for which you want to save the ECC to file.
LAYOUT
For a description of LAYOUT, see FLASHFILE.SAVEECC.hamming.
For examples of FLASHFILE.SAVEECC.ReedSolomon ... /LAYOUT, see
examples 2 and 3 below.
Examples for FLASHFILE.SAVEECC.ReedSolomon
Example 1:
;view the result of FLASHFILE.SAVEECC.ReedSolomon in the AREA window
AREA.view
;
FLASHFILE.SAVEECC.ReedSolomon
file.rs
<range>
0x0--0xFFFF
;optionally, view the ECC file with the DUMP command
;use WIDTH 10. because each ECC word is 10 bytes
DUMP file.rs /WIDTH 10.
<ref_size>
Generated 10-byte ECC word
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
100
FLASHFILE
Example 2:
;without LAYOUT: ECC in linear form
FLASHFILE.SAVEECC.ReedSolomon
aaa.bin
DUMP aaa.bin
0x0--0xFFFF
;with LAYOUT: ECC in non-linear form
FLASHFILE.SAVEECC.ReedSolomon
aab.bin
DUMP aab.bin
0x0--0xFFFF /LAYOUT 0x30 5. 3.
Result without /LAYOUT
Result with /LAYOUT
B
A
C
A
C
A <layout_block_size> = 0x30
B <offset> = 5
C <bytes_per_block> = 3
Example 3:
FLASHFILE.SAVEECC.ReedSolomon
spare-rs.bin
0x0--0xFFFF
\
/LAYOUT 0x10
6. 10.
See also
■ FLASHFILE.SAVEECC
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
101
FLASHFILE
FLASHFILE.SAVESPARE
Format:
Read NAND FLASH spare area
FLASHFILE.SAVESPARE <file> <range>
The data whose address and size is specified by <range> is read from the NAND FLASH spare area and
written to <file>.
Nand
File
Main
SP
1
1
2
2
3
3
Bad
Bad
4
4
N-1
N-1
FLASHFILE.SAVESPARE
See also
■ FLASHFILE
❏ FLASHFILE.SPAREADDRESS()
■ FLASHFILE.state
FLASHFILE.Set
Modify FLASH data
Format:
FLASHFILE.Set <address> | <range> %<format> <data>
<format>:
Byte | Word | Long | Quad
Modifies the contents of FLASH data at defined <address>. The maximum size of modifying is a block size
of the flash.
; Write 4Bytes data 0x12345678 at the address 0x100000;
FLASHFILE.Set 0x100000 %LE %LONG 0x12345678
; Write data 0x0 at the address range 0x100000++0xFFF;
FLASHFILE.Set 0x100000++0xFFF %BYTE 0x0
See also
■ FLASHFILE
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
102
FLASHFILE
FLASHFILE.SETEXTCSD
Format:
Modify the extended CSD register
FLASHFILE.SETEXTCSD <index> <data>
Modifies the extended CSD register by using the MMC command CMD6.
Example: Partition switch in the eMMC flash
;The Extended CSD register index 179. is the PARTITIOM_CONFIG register.
;The register bit flag describes in the JEDEC standard eMMC
;documentation.
FLASHFILE.SETEXTCSD
179. 0x00
; access: partition null, no boot,
; access: no boot partition
FLASHFILE.SETEXTCSD
179. 0x49
; access: partition boot 1
FLASHFILE.SETEXTCSD
179. 0x4A
; access: partition boot 2
See also
■ FLASHFILE
■ FLASHFILE.GETEXTCSD
■ FLASHFILE.state
FLASHFILE.state
Format:
tbd.
FLASHFILE.state
Future use.
See also
■
■
■
■
■
■
■
■
FLASHFILE
FLASHFILE.COPY
FLASHFILE.Erase
FLASHFILE.GETONFI
FLASHFILE.LOADECC
FLASHFILE.RESet
FLASHFILE.SAVESPARE
FLASHFILE.UNLOCK
■
■
■
■
■
■
■
FLASHFILE.BSDLaccess
■
FLASHFILE.COPYSPARE
■
FLASHFILE.GETBADBLOCK ■
FLASHFILE.List
■
FLASHFILE.LOADSPARE
■
FLASHFILE.SAVE
■
FLASHFILE.Set
■
FLASHFILE.BSDLFLASHTYPE ■ FLASHFILE.CONFIG
FLASHFILE.Create
■ FLASHFILE.DUMP
FLASHFILE.GETEXTCSD
■ FLASHFILE.GETID
FLASHFILE.LOAD
■ FLASHFILE.LOADALL
FLASHFILE.LOCK
■ FLASHFILE.MSYSDLL
FLASHFILE.SAVEALL
■ FLASHFILE.SAVEECC
FLASHFILE.SETEXTCSD
■ FLASHFILE.TARGET
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
103
FLASHFILE
FLASHFILE.TARGET
Format:
Define target controlled algorithm
FLASHFILE.TARGET <code_range> <data_range> [<file>]
[/DualPort | /KEEP]
Example:
<code_range> is the place where the code for NAND FLASH programming (<file>) is downloaded to.
required size for the code is size_of(file) + 32 byte
FLASH algorithm
Memory mapping for the <code_range>
32 byte
<data_range> specDualPorifies the range where data buffer, argument buffer and stack are placed
<data_buffer_size> =
size_of(<data_range>) - 64 byte argument buffer - 256 byte stack
<data_buffer_size> is the number of bytes which are transferred from the TRACE32 software to NAND
FLASH programming routine in one step. Recommended buffer size is 4 KByte, smaller buffer sizes are also
possible. The max. buffer size is 16 KByte.
64 byte argument buffer
Memory mapping for the <data_range>
Data buffer for data transfer
between TRACE32 and
NAND FLASH algorithm
<buffer_size> calculated as
described above
256 byte stack
DualPort (for FLASHFILE.TARGET)
DualPort can be used for target controlled FLASH programming. While FLASH programming is being
executed, the TRACE32 host software simultaneously downloads the next command and data via dual-port
memory access into the target RAM. DualPort can reduce the programming time significantly.
The DualPort option can only be used together with the memory class E: for <data_range>:
;
<code_range>
<data_range>
FLASHFILE.TARGET 0x20000000++0x1FFF EAHB:0x20002000++0x4FFF
~~/demo/arm/flash/byte/nand2g08_cortexm3.bin /DualPort /KEEP
\
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
104
FLASHFILE
KEEP (for FLASHFILE.TARGET)
After FLASH programming, the <code_range> and <data_range> on the target remain (=KEEP) reserved
for FLASH programming. TRACE32 does not restore the original data that existed in <code_range> and
<data_range> before the FLASH programming was executed.
So TRACE32 can save the restore overhead, for example, when FLASHFILE commands are executed
within a large <data_range> or when FLASHFILE commands are executed frequently, such as the
FLASHFILE.DUMP command.
See also
■ FLASHFILE
■ FLASHFILE.state
▲ ’Scripts for eMMC Controllers’ in ’eMMC FLASH Programming User’s Guide’
▲ ’Scripts for NAND Flash Programming’ in ’NAND FLASH Programming User’s Guide’
▲ ’Scripts for SPI Controllers’ in ’Serial FLASH Programming User’s Guide’
FLASHFILE.UNLOCK
Format:
Unlock FLASH device
FLASHFILE.UNLOCK <range>
Unlocks a FLASH device.
Some FLASH devices are locked after power-up. These devices have to be unlocked in order to erase or
program the FLASH device.
See also
■ FLASHFILE
■ FLASHFILE.LOCK
■ FLASHFILE.state
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
105
FLASHFILE
FPU
FPU
Access to the FPU registers
In order to access the FPU (Floating-Point Unit) state, the FPU.ON command must be set.
Standalone
Emulation probes which support standalone FPU operation (socket inside the emulation probe), this FPU
must be activated by the SYStem.Option FPU ON command first. This option must not be set, if a FPU in
the target is used.
Multitask Debugger
The FPU's registers are not a part of the tasks, rather, are jointly available only once to all tasks.
HLL
HLL-debugging with the FPU is fully supported, i.e. register variables in FPU and stack back traces through
FPU stacks are supported.
Assembler Stepping with 68881/68882
When stepping floating point commands, it is possible, that the FPU operation is stopped by the single step
during the execution of the operation. This state is indicated by the message 'Mid-Instruction Break' in the
FPU window. The displayed PC value may be wrong in this case. The FPU operation will be completed with
the next assembler step.
See also
■ FPU.OFF
■ FPU.TARGET
■ FPU.ON
■ FPU.view
■ FPU.RESet
❏ FPU()
■ FPU.Set
❏ FPUCR()
▲ ’FPU Functions (Floating Point Unit)’ in ’General Functions’
FPU.OFF
Format:
FPU access off
FPU.OFF
All other FPU commands are locked. The FPU in the target is not accessed.
See also
■ FPU
■ FPU.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
106
FPU
FPU.ON
Format:
FPU access on
FPU.ON
The FPU register set is activated. The FPU must be either in the target or in the emulation-probe. FPU
registers are handled similarly to CPU registers (stack tracing, HLL register variables, etc.).
See also
■ FPU
■ FPU.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
FPU.RESet
Format:
Reset command
FPU.RESet
The access to the FPU is turned off.
See also
■ FPU
■ FPU.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
FPU.Set
Format:
Modify FPU registers
FPU.Set <register> [<expression> | <float>]
The modification can either set floating-point values, or hexadecimal values.
FPU.Set fpiar 0x1000
FPU.Set fp0 1.23
FPU.Set fp0 1 2 3 4
;
;
;
;
set
FP0
the
FP0
FPIAR
on 1.23
upper most bytes from
to 01 02 03 04
See also
■ FPU
■ FPU.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
107
FPU
FPU.TARGET
Format:
Define FPU access agent
FPU.TARGET <code_range> [<data_range>]
Defines the code and data address ranges used by the target agent to read or write FPU registers. Both
ranges must define RAM areas that can be used for code or data access. This command is only required for
the ARM9 vfp.
See also
■ FPU
■ FPU.view
FPU.view
Display FPU registers
Format:
FPU.view
All visible FPU registers are displayed in a window. The contents of this window are strongly dependent on
the CPU type.
Exception Enable
E68::w .fpu
INEX1  _ INEX _ NAN _
INEX2 _ DZ
D Inf _
DZ
 _ UNFL _ Zr
_
UNFL
_ OVFL O Neg _
OVFL
_ IOP _ RND Z
OPERR _ Q +00 PREC S
SNAN
_ FPCR 00000550
BSUN
_ FPSR 00000050
FPIAR
FP0
FP1
FP2
FP3
FP4
FP5
FP6
FP7
6.0
NAN
NAN
1.2345678
NAN
NAN
NAN
NAN
4001.C0000000000000
7FFF.FFFFFFFFFFFFFF
7FFF.FFFFFFFFFFFFFF
3FFF.9E065152D8EAEC
7FFF.FFFFFFFFFFFFFF
7FFF.FFFFFFFFFFFFFF
7FFF.FFFFFFFFFFFFFF
7FFF.FFFFFFFFFFFFFF
P:00000000
Flags
See also
■ FPU
■ FPU.Set
■ FPU.OFF
■ FPU.TARGET
■ FPU.ON
❏ FPU()
■ FPU.RESet
❏ FPUCR()
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
▲ ’Release Information’ in ’Release History’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
108
FPU
Frame
Frame
Call tree and context
See also
■
■
■
■
■ Frame.COPY
■ Frame.REDO
■ Frame.TASK
Frame.CONFIG
Frame.Init
Frame.SWAP
Frame.view
■ Frame.Down
■ Frame.SkipFunc
■ Frame.UNDO
■ Frame.GOTO
■ Frame.SkipLine
■ Frame.Up
▲ ’Release Information’ in ’Release History’
Frame.CONFIG
Format:
Fine-tune stack unwinding
Frame.CONFIG [ON | OFF]
tbd.
See also
■ Frame
■ Frame.CONFIG.PROLOG
■ Frame.CONFIG.Asm
■ Frame.CONFIG.RELOAD
■ Frame.CONFIG.EABI
■ Frame.CONFIG.sYmbol
Frame.CONFIG.Asm
Format:
■ Frame.CONFIG.EPILOG
■ Frame.view
Frame back-trace mode
Frame.CONFIG.Asm [ON | OFF]
sYmbol.ASMFRAME (deprecated)
If this option is set (default), the system will try to trace back over assembler generated frames and frames
without debug information (command Frame.view). This back trace will fail, if the stack is modified by a
function in a 'non standard' way.
See also
■ Frame.CONFIG
▲ ’Symbol Management’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
109
Frame
Frame.CONFIG.EABI
Format:
Use chained frame pointers
Frame.CONFIG.EABI [ON | OFF]
Default: OFF.
When turned on, this command forces the stack unwinding algorithm to assume that the frame pointers of
each call are chained with each other. The stack unwinding algorithm then reads the previous frame pointer
and the return address consecutively from the current frame pointer address. The user should only use this
command if he is sure that the architecture supports frame pointers and the compiler has chained all the
frame pointers.
See also
■ Frame.CONFIG
Frame.CONFIG.EPILOG
Format:
Use epilog code for frame display
Frame.CONFIG.EPILOG [ON | OFF | UNRESTRICTED | RESTRICTED]
sYmbol.FRAME.EPILOG (deprecated)
Default: ON.
When turned on, the epilog of each function is run through the simulator to find the return address thus the
calling function.
ON
The simulator is used to find the return address.
OFF
The simulator is not used for stack unwinding.
RESTRICTED
The Simulator does not follow indirect jumps.
UNRESTRICTED
The Simulator follows indirect jumps.
See also
■ Frame.CONFIG
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
110
Frame
Frame.CONFIG.PROLOG
Format:
Use prolog code for frame display
Frame.CONFIG.PROLOG [ON | OFF]
sYmbol.FRAME.PROLOG (deprecated)
Default: ON.
When turned on, the prolog of each function is analyzed and the effect of the prolog is reversed to find the
calling function.
See also
■ Frame.CONFIG
Frame.CONFIG.RELOAD
Format:
Generate frame information again
Frame.CONFIG.RELOAD [ON | OFF]
sYmbol.FRAME.Reload (deprecated)
Default: ON.
Updates the frame window content several times a second. This costs some cpu power and can be turned
off if the code does not change and the user needs a faster TRACE32.
See also
■ Frame.CONFIG
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
111
Frame
Frame.CONFIG.sYmbol
Format:
Use symbol code for frame display
Frame.CONFIG.sYmbol [ON | OFF]
sYmbol.FRAME.sYmbol (deprecated)
Default: ON.
This command is an on-and-off switch for debug information from the debug file to find the calling function.
ON
Use the symbolic debug information the compiler generated during compile
time (if any).
OFF
Use a platform-dependent built-in algorithm to make an educated and
sophisticated “guess” about frame size and layout.
See also
■ Frame.CONFIG
Frame.COPY
Format:
Copy to TRACE32 registers
Frame.COPY
Register.COPY (deprecated)
The processor register set is copied to the TRACE32-internal register set.
This command is useful, when the current register values need to be saved and restored later. The
TRACE32-internal register set can be copied back by the Frame.SWAP command.
See also
■ Frame
■ Frame.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
112
Frame
Frame.Down
Format:
Go down in stack nesting
Frame.Down
Register.Down (deprecated)
The registers are set to the values they had one subroutine nesting level deeper. This command is used
after the command Frame.Up to restore the original register values.
See also
■ Frame
■ Frame.view
❏ FLAG.READ()
Frame.GOTO
Format:
❏ FLAG.WRITE()
Change source code view temporarily
Frame.GOTO [<address>]
Register.GOTO (deprecated)
Sets the PC to the specified address in order to change the view of the source listing (Data.List).
The current PC value is saved and will be restored before the application is started again.
See also
■ Frame
■ Frame.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
113
Frame
Frame.Init
Format:
Initialize the processor registers
Frame.Init
Resets the CPU registers to their default values after a processor reset. Registers that are undefined after a
reset are set to zero.
B::
; example for the debugger
…
SYStem.Up
; establish the communication between the
; processor and the debugger
Frame.Init
; initialize the general purpose registers
…
CPU
Behavior of Frame.Init
ARC
STATUS
STATUS32
DEBUG
IRQ_LV12
IENABLE
SEMAPHORE
<=
<=
<=
<=
<=
<=
0x02000000
0x00000001
0x11000000
0x00000002 (Resets any interrupt flags)
0xffffffff
0x00000000
All other registers are set to zero.
If SYStem.Option ResetDetection is used with a semaphore bit
(Sem0...Sem3), Frame.Init sets the corresponding semaphore bit in the
SEMAPHORE register.
ARM, Cortex, XScale
ARM7/9/10/11, Cortex-A/R, XScale:
Rx = 0
SPSRx = 0x10
CPSR = 0xd3 (ARM7/9/10, XScale), 0x1d3 (ARM11, Cortex-A/R)
R15 (PC) = 0, 0xffff0000 if high exception vectors selected
Cortex-M:
Rx = 0
R15 (PC) = [vector table base + 4]
xPSR = 0x01000000
MSP = [vector table base + 0]
PSP = 0
R13 (SP) = MSP or PSP depending on the mode
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
114
Frame
CPU
Behavior of Frame.Init
C166
The CP is set to 0xFC00. The sixteen registers R0 - R15 are set to 0x0.
DPP0 = 0x0, DPP1 = 0x1, DPP2 = 0x2 and DPP3 = 0x3.
Stack registers STKUN is set to 0xFC00 and STKOV is set to 0xFA00.
The Stack Pointer SP is set to 0xFC00
The Instruction Pointer IP is set to zero.
The Code Segment Pointer CSP and the VECSEG are set to the initial
value after SYStem.Up.
All other registers are set to zero.
CEVA-X
MODA and MODA shadow register are set to 0x1E.
All other registers are set to zero.
DSP56K
Family 56000 and 56100
The eight 16-bit modifier registers M[0-7] are set to 0xFFFF. This specifies
linear arithmetic as the default type for address register update
calculations.The Operating Mode Register (OMR) is set to the initial value
after SYStem.Up. Values of bits MA, MB and MC of the OMR register are
preserved.The program counter is set to zero. All interrupts are masked by
setting the Status Register (SR) to 0x300.
Family 56300 and 56720 Dualcore
The eight 24-bit modifier registers M[0-7] are set to 0xFFFFFF. This
specifies linear arithmetic as the default type for address register update
calculations. The Operating Mode Register (OMR) is set to the initial value
after SYStem.Up. Values of bits MA, MB, MC and MD of the OMR register
are preserved. All interrupts are masked by setting Status Register (SR) to
0x300. The program counter is set to zero.
Family 56800 and 56800E
The eight 16-bit modifier registers M[0-7] are set to 0xFFFF. This specifies
linear arithmetic as the default type for address register update
calculations. The Operating Mode Register (OMR) is set to the initial value
after SYStem.Up. Values of bits MA and MB of the OMR register are
preserved. All interrupts are masked by setting Status Register (SR) to
0x300. The program counter is set to zero.
HCS08
The Program Counter is set to the value read at 0xFFFE. The Stack
Pointer SP is set to 0xFF and the CCR is set to 0x68. All other registers
are set to zero.
HC11
The Program Counter is set to the value read at 0xFFFE. The Stack
Pointer SP is set to a default value dependent on the derivative. The CCR
is set to 0xD8. All other registers are set to zero.
HC12 / S12 / S12X
The Program Counter is set to the value read at 0xFFFE. The CCR is set
to 0xD8. All other registers are set to zero.
MIPS32 / MIPS64 /
NEC-VR
Program Counter, Status register and Config register are set to their initial
values after reset (read during SYStem.Up). PRID and Cause register are
updated, all other registers are set to zero.
MMDSP
Sets all registers to their initial value after a reset. This is done via a soft
reset of the core. NOTE: This may have effects besides updating the
contents of architectural registers.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
115
Frame
CPU
Behavior of Frame.Init
PowerPC
Program counter and MSR are set to their initial values after reset (read
during SYStem.Up). GPRs and SPR appearing in the Register window are
set to zero.
Microblaze
All registers are set to zero.
PCP
All registers are set to zero.
Teak
MOD0 and MOD0S registers SATA bit is set. MOD1 and MOD1S regsiters
CMD bit is set. MOD3 and MOD3S registers CREP, CPC and CCNTA bits
are set.
All other registers are set to zero.
Teaklite / Teaklite-II /
Oak
All registers are set to zero.
Teaklite-III
MOD2 register SATA and SATP bits are set.
All other registers are set to zero.
x86
EDX is set to a cpu specific value defining the family/model/stepping of the
core if a SYStem.Up has been executed at some point before, otherwise
EDX is set to 0.
EAX,EBX,ECX,ESI,EDI,ESP,EBP are set to 0.
EIP is set to 0xFFF0 and EFLAGS to 2.
CR0 is set to 0x60000010 and CR2-4 to 0.
DR0-3 are set to 0. DR6 to 0xFFFF0FF0 and DR7 to 0x400.
IDT and GDT: Base = 0 and Limit = 0xFFFF.
LDT and TR: Selector = 0, Base = 0, Limit = 0xFFFF, Access = 0x82.
CS: Selector = 0xF000, Base = 0xFFFF0000, Limit = 0xFFFF, Access =
0x93.
DS,ES,FS,GS,SS: Selector = 0, Base = 0, Limit = 0xFFFF, Access = 0x93.
NOTE: In a multicore system the above holds for the main bootstrap
processor. For the other processors the following differences apply: EIP is
set to 0x10000 and CR0 to 0x10.
TMS320
All registers except SSR, IER and TSR are set to zero.
TriCore
All registers except PC, PSW, ICR and BTV are set to zero.
XTENSA
Program Counter (PC), Program Status (PS) and dependent on the
XTENSA configuration some other Special Registers are read from the
CPU. All other registers are set to zero.
ZSP
All registers are set to zero.
See also
■ Frame
■ Frame.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
116
Frame
Frame.REDO
Format:
Recover from UNDO registers
Frame.REDO
Register.REDO (deprecated)
Recovers the state of the registers before the last Frame.UNDO command was executed.
See also
■ Frame
■ Frame.view
Frame.SkipFunc
Format:
Change view to previous/subsequent function
Frame.SkipFunc <number>
Register.SkipFunc (deprecated)
Sets the PC temporarily to one of the subsequent (positive number) or previous (negative number) functions
in the source. The current PC value is saved and will be restored before the application is started again.
Frame.SkipFunc -1.
Frame.SkipFunc 1.
See also
■ Frame
■ Frame.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
117
Frame
Frame.SkipLine
Format:
Change view to previous/subsequent HLL line
Frame.SkipLine <number>
Register.SkipLine (deprecated)
Sets the PC temporarily to one of the subsequent (positive number) or previous (negative number) HLL lines
in the source. The current PC value is saved and will be restored before the application is started again.
Register.SkipLine +3.
; set PC 3 HLL line forward
See also
■ Frame
■ Frame.view
Frame.SWAP
Format:
Swap TRACE32 registers
Frame.SWAP
Register.SWAP (deprecated)
The processor register set and TRACE32-internal register sets are swapped. This command is useful when
an operating system-call or HLL-function call fails to restore the original registers.
See also
■ Frame
■ Frame.view
▲ ’Register and Peripherals’ in ’ICE User’s Guide’
Frame.TASK
Format:
Change view to specified task
Frame.TASK <magic_number> | <task_id> | <task_name>
Register.TASK (deprecated)
Display register set of the specified task temporarily. This will also change the source listing display
(Data.List).
The register set of the current task is saved and will be restored before the application is started again.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
118
Frame
A reddish cursor at the program counter indicates a manipulation by Register.TASK.
reddish cursor
(task) indicates that the
register set was temporarily
changed by the command
Register.TASK
<magic_number>,
<task_id>,
<task_name>
For information about the parameters, see “What to know about Magic
Numbers, Task IDs and Task Names” (general_ref_t.pdf).
Register.TASK 0x41498
; <magic_number>
; <task_id>
Register.TASK "thread 0"
; <task_name>
See also
■ Frame
■ Frame.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
119
Frame
Frame.UNDO
Format:
Recover previous registers
Frame.UNDO
Register.UNDO (deprecated)
Recovers the state of the registers before the last register change or execution command. Repeating the
command will recover earlier registers. The command Frame.REDO can be used to “undo” this command.
See also
■ Frame
■ Frame.view
Frame.Up
Format:
Go up in stack nesting
Frame.Up
Register.Up (deprecated)
The debugger “virtually” goes up one level of the call stack by switching to the stack frame of the calling
function and reconstructing its registers. The command can be repeated to traverse multiple levels of the call
stack. The current offset from the actual stack frame is shown in the status line as (2), (3) etc.
The register window will show the values of the newly selected stack frame. In Data.List windows, the bar
indicating the PC position changes its color to a reddish tone to indicate that it is not the actual PC of the
processor.
The actual register set in the processor is not affected by this. Therefore a Go would continue from the place
where the processor stopped before issuing the Frame.Up command.
The corresponding command for going down in the call hierarchy is Frame.Down.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
120
Frame
reddish cursor
back level
See also
■ Frame
■ Frame.view
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
121
Frame
Frame.view
Variable stack nesting
Format:
Frame.view [%<format>] [/<option>]
Var.Frame (deprecated)
<option>:
NoVar | Args | Locals | Caller | MODule | Size | NoSize | LIMIT <levels>
TASK <magic_number> | <task_id> | <task_name>
CORE <number> | REGSET <number>
Displays a stack back trace. Without options solely the functions together with the arguments are displayed.
The command Frame.CONFIG.Asm configures whether the back trace stops at frames that do not belong
to HLL code or attempts to trace back over those frames.
<format>
The format parameters can modify the display in various ways. For
information about format parameters, refer to section “Display Formats” in
“General Commands Reference Guide V” (general_ref_v.pdf).
NoVar
No display of variables and arguments.
Args
Display of arguments (default).
Locals
Local variables of functions.
Caller
Display of the high level language block, from which the function was
called.
MODule
Display the module (e.g. library) to which the frame entry belongs.
Size, NoSize
Show/hide the frame size.
LIMIT
Limit the number of frame levels to be displayed.
TASK
Choose a task for which you want to display the frame.
For information about the parameters, see “What to know about Magic
Numbers, Task IDs and Task Names” (general_ref_t.pdf).
CORE
Choose a core for which you want to display the frame. (Applicable only if
the architecture supports it; for example, C166 or SH2A.)
REGSET
Choose one of the switchable register sets.
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
122
Frame
A
B
C
D
A By clicking the little, gray square to the left of a variable, you can switch between the formats hex,
decimal, and binary for a value.
B By double-clicking a variable, you can modify its value.
C The numbers in the gray scale area of the Frame.view window indicate the nesting level.
Double-clicking a number will execute a Frame.Up command to get to this level.
D Click the +/- toggle button to view the variable in more detail.
See also
■
■
■
■
❏
Frame
Frame.GOTO
Frame.SkipLine
Frame.Up
FLAG.WRITE()
■
■
■
■
■
■
■
❏
Frame.CONFIG
Frame.Init
Frame.SWAP
Var.View
Frame.COPY
Frame.REDO
Frame.TASK
FLAG()
■
■
■
❏
Frame.Down
Frame.SkipFunc
Frame.UNDO
FLAG.READ()
▲ ’HLL Structures’ in ’ICE User’s Guide’
▲ ’Display Variables’ in ’Training HLL Debugging’
©1989-2017 Lauterbach GmbH
General Commands Reference Guide F
123
Frame
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising