The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

User's Guide Digital Signal Processing Solutions Printed U.S


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



XDS522A Emulation System
User's Guide
Digital Signal Processing Solutions
Printed U.S.A., August 1996 D412009-9761 revision
SPRU169B
XDS522A Emulation System User's Guide
August 1996 SPRU169
Printed Recycled Paper
Running Title-Attribute Reference
IMPORTANT NOTICE Texas Instruments (TI) reserves right make changes products discontinue semiconductor product service without notice, advises customers obtain latest version relevant information verify, before placing orders, that information being relied current. warrants performance semiconductor products related software specifications applicable time sale accordance with TI's standard warranty. Testing other quality control techniques utilized extent deems necessary support this warranty. Specific testing parameters each device necessarily performed, except those mandated government requirements. Certain applications using semiconductor products involve potential risks death, personal injury, severe property environmental damage ("Critical Applications"). SEMICONDUCTOR PRODUCTS DESIGNED, INTENDED, AUTHORIZED, WARRANTED SUITABLE LIFE-SUPPORT APPLICATIONS, DEVICES SYSTEMS OTHER CRITICAL APPLICATIONS. Inclusion products such applications understood fully risk customer. products such applications requires written approval appropriate officer. Questions concerning potential risk applications should directed through local sales office. order minimize risks associated with customer's applications, adequate design operating safeguards should provided customer minimize inherent procedural hazards. assumes liability applications assistance, customer product design, software performance, infringement patents services described herein. does warrant represent that license, either express implied, granted under patent right, copyright, mask work right, other intellectual property right covering relating combination, machine, process which such semiconductor products services might used.
Copyright 1996, Texas Instruments Incorporated
Preface
Read This First
About This Book
This book describes XDS522A emulation system, which analysis debugging tool. system adds breakpoint, tracing, timing (BTT) functionality Texas Instruments source debugger. These functions allow monitor CPU, benchmark performance, gather precise timing information, generate more compact efficient code, improve debugging efficiency.
Before start using this book, should install following tools:
Tool XDS510or XDS510PPand XDS511XDS522A (including software) TMS320C2xx source debugger Refer
XDS51x Emulator Installation Guide XDS522/XDS522A Emulation System Installation Guide TMS320C2xx Emulator Installation Guide
This Book
This book divided into four parts:
Part Overview gives broad look XDS522A emulation system describes basic steps need follow when testing debugging your code.
Chapter summarizes XDS522A emulation system's features describes components architecture. Chapter describes XDS522A interface customize meet your needs. Chapter provides quick glance steps that need follow when using system test debug your code.
This Book
Part Tutorial provides with step-by-step, hands-on tutorial system. tutorial divided into several chapters. Each chapter builds previous chapter(s). learn XDS522A emulation system correctly, should start beginning Part continue working through tutorial until reach Part rather than skipping lessons doing them order. Part III: User Reference tells configure XDS522A emulation system.
Chapter describes define events, which control most activity XDS522A. Chapters describe collect samples some system's features isolate specific samples from samples have collected. Chapters explain XDS522A perform action when event occurs. Chapter describes counters, Chapter describes sequencer, Chapter describes generate trigger pulse hardware breakpoint.
Part Appendixes provides supplementary information includes summary commands, troubleshooting section, glossary, index.
should this book depends your experience with similar products. with book, would best begin page read end. Because most people don't read technical manuals from cover cover, here some suggestions choosing what read.
have used XDS522A emulation system before, want
Read introductory material Part tutorial Part learn about unfamiliar features. Make sure your system described Chapter Read chapters Part that most interest you. appendixes Part necessary.
this first time that have used XDS522A emulation system, want Read introductory material Part Complete tutorial Part Refer chapters Part additional information. appendixes Part necessary.
Notational Conventions
Notational Conventions
This document uses following conventions:
TMS320C209 TMS320C209SE devices referred 'C2xx. Debugger commands case sensitive; enter them lowercase, uppercase, combination both. Program listings, program examples, interactive displays shown special typeface similar typewriter's. Interactive displays bold version special typeface distinguish commands that enter from items that system displays (such prompts, command output, error messages, etc.). Here sample message that might display area COMMAND window:
Cannot append binary mode
Here example command that might enter:
cfgtrace paddress,hex
syntax descriptions, instruction command bold face, parameters italics. Portions syntax that bold should entered shown; portions syntax that italics describe kind information that enter. Here example command syntax: bload filename bload command. This command parameter, indicated filename.
Square brackets identify optional parameter. optional parameter, specify information within brackets; don't enter brackets themselves. Here's example instruction that optional parameter: alias [alias name "command string"] ALIAS command optional parameters.
Braces indicate list. symbol (read separates items within list. Here's example list: TraceFilter This provides choices: TraceFilter TraceFilter off. Unless list enclosed square brackets, must choose item from list.
Read This First
Notational Conventions Information About Cautions
Part contains symbols that indicate where perform action, when task important, when task optional:
When this symbol.
Perform next instructions. application window debugger application window EVENTS setup window SEQUENCER setup window COUNTER setup window COUNTER setup window TRACE setup window ACTION setup window ensure that your system works correctly interested doing optional tasks that help learn more about XDS522A emulation system
Debug
EVENTS SEQUENCER COUNTER COUNTER TRACE ACTION
Important! This:
Information About Cautions
This book contains cautions. information caution provided your protection. Please read each caution carefully.
This example caution statement. caution statement describes situation that could potentially damage your software equipment.
Related Documentation From Texas Instruments
Related Documentation From Texas Instruments
following documentation packaged with XDS522A emulation system:
XDS522/XDS522A Emulation System Installation Guide (literature number SPRU171) describes installation emulation system. Instructions include install hardware software XDS522and XDS522ATM. XDS522A Emulation System Online Help (literature number SPRC002) online help file that provides descriptions software user interface, menus, dialog boxes.
following documents provide additional information about XDS522A emulation system. obtain copy these documents, call Texas Instruments Literature Response Center (800) 477-8924. When ordering, please identify book title literature number.
TMS320C2xx Source Debugger User's Guide (literature number SPRU151) tells invoke 'C2xx emulator simulator versions source debugger interface. This book discusses various aspects debugger interface, including window management, command entry, code execution, data management, breakpoints. also includes tutorial that introduces basic debugger functionality. TMS320C2xx Emulator Installation Guide (literature number SPRU152) tells install PCversion 'C2xx emulator source debugger interface. TMS320C2xx User's Guide (literature number SPRU127) discusses hardware aspects 'C2xx fixed-point digital signal processors. describes assignments, architecture, instruction set, software hardware applications. also includes electrical specifications package mechanical data 'C2xx devices. book features section comparing instructions from 'C2x 'C2xx. XDS51x Emulator Installation Guide (literature number SPNU070) describes installation XDS510TM, XDS510PPTM, XDS510WSemulator controllers. installation XDS511emulator also described.
Read This First
Need Assistance
Need Assistance.
want Visit online Receive general information assistance Contact Texas Instruments World Wide Web: http://www.ti.com World Wide Web: North America, South America: (214) 644-5580 Europe, Middle East, Africa Dutch: English: French: Italian: German: 33-1-3070-1166 33-1-3070-1165 33-1-3070-1164 33-1-3070-1167 33-1-3070-1168
Japan (Japanese English) Domestic toll-free: 0120-81-0026 International: 81-3-3457-0972 81-3-3457-0976 Korea (Korean English): 82-2-551-2804 Taiwan (Chinese English): 886-2-3771450 questions about Digital Signal Processor (DSP) product operation report suspected problems Hotline: Fax: Europe: Email: World Wide Web: North America: Europe: Online: (713) 274-2320 (713) 274-2324 +33-1-3070-1032 4389750@mcimail.com http://www.ti.com/dsps (713) 274-2323 8-N-1 +44-2-3422-3248 ftp.ti.com:/mirrors/tms320bbs (192.94.94.33)
Request tool updates
Software: (214) 638-0333 Software fax: (214) 638-7742 Hardware: (713) 274-2285 (800) 477-8924 Email: comments@books.sc.ti.com Mail: Texas Instruments Incorporated Technical Publications Manager, P.O. 1443 Houston, Texas 77251-1443
Order Texas Instruments documentation (see Note Make suggestions about report errors documentation (see Note
Notes:
literature number book required; lower-right corner back cover. Please mention full title book, literature number from lower-right corner back cover, publication date from spine front cover.
viii
Warning Trademarks
Warning
This equipment intended laboratory test environment only. generates, uses, radiate radio frequency energy been tested compliance with limits computing devices pursuant subpart part rules, which designed provide reasonable protection against radio frequency interference. Operation this equipment other environments cause interference with radio communications, which case user expense will required take whatever measures required correct this interference.
Trademarks
XDS510, XDS510PP, XDS510WS, XDS511, XDS522, XDS522A trademarks Texas Instruments Incorporated. trademark International Business Machines Corp. Windows trademark Microsoft Corporation.
Read This First
Contents
Contents
Part Overview
Overview XDS522A Emulation System Describes components features XDS522A emulation system system operates debugging environment. What XDS522A Emulation System? Features Components Understanding Debugging Environment using real-time monitor. Understanding TMS320C2xx Pipeline XDS522A Pipeline About XDS522A pipeline About TMS320C2xx pipeline flattener 1-10
About Software Interface Provides high-level view parts software interface manipulate them. Also, includes information about various ways enter commands. Overview Software Interface Entering Commands Entering commands with mouse Entering commands with combinations Entering commands from command line Making Window Active Making window active using mouse Making window active from command line Making window active using function Sizing Window Sizing main application window Sizing window using mouse Sizing window from command line Moving Window 2-10 Moving window using mouse 2-10 Moving window using command line 2-10 Saving Configuration Software Interface 2-11
Contents
Overview Typical Testing Debugging Session Details steps that should follow conduct testing debugging session with XDS522A. Choosing Flattener Mode Invoking Software Invoking Debugger Invoking debugger from software Invoking debugger from Windows Setting analysis module generate breakpoints Configuring Setup Window Saving loading configuration Downloading Configuration XDS522A 3-10 Enabling XDS522A 3-11 Running Your Application 3-12 Sending debugger command debugger 3-12 Starting target application 3-13 Single-stepping through code 3-13 Stopping target application 3-13 Examining Your Results 3-14 Closing Software 3-14
Part Tutorial
Getting Started Describes tutorial this book explains start testing debugging session. Before Begin Identifying procedures Using command interface software What when software doing what expect Need additional help hints? Verifying Your Hardware Setup Choosing Flattener Mode Starting Debugging/Testing Session Setting debugger software Show everything need 4-10 Summary 4-14 Need break? 4-14
Contents
Detecting Event Halting Processor Explains define event that event generate hardware breakpoint. Understanding Setup Window Defining Event Collecting Trace Samples Immediately Executing Hardware Breakpoint Downloading Configuration Enabling XDS522A Saving XDS522A Configuration 5-11 Running Application Looking TRACE Window 5-12 Summary 5-14 Need break? 5-14 Understanding Status Indicators TRACE Window Provides information about program trace status indicators shows TRACE window. Collecting Trace Samples Between Events Understanding Status Indicators Moving Through TRACE Window Displaying Information About Trace Samples Saving Contents Trace Buffer 6-10 Summary 6-12 Need break? 6-12 Using Advanced Tracing Features Explains advanced tracing features such clearing trace buffer adding samples trace buffer. Flushing Accumulating Trace Samples Detecting When Trace Buffer Full Collecting Specific Number Trace Samples Collecting large number samples reloading length value Collecting small number samples 7-12 Understanding Difference Between Trace Stop Trace Disable 7-14 Summary 7-16 Need break? 7-16 Searching Filtering Explains search specific samples TRACE window filter specific samples TRACE window. Searching Sample TRACE Window Starting search from TRACE window Searching other occurrences sample Filtering Samples TRACE Window Filtering more than event Where other samples? Summary 8-10 Need break? 8-10
Contents
xiii
Contents
Using Timestamp Provides information about setting timestamp, displaying timestamp, using timestamp show relationship between tasks, toggling through timestamp display modes, changing your timestamp configuration. Displaying Timestamp TRACE Window Showing Timing Relationship Between Tasks Toggling Through Timestamp Display Modes Changing Your Timestamp Configuration 9-12 Summary 9-13 Need break? 9-13
Using Counters 10-1 Provides information about count specific number events, single-shot counter, counter catalyst other counter. 10.1 Counters Work 10-2 What's difference between Reld Reload? 10-4 10.2 Counting Specific Number Events 10-5 10.3 Using Single-Shot Counter 10-10 10.4 Counting More Than Event 10-14 10.5 Summary 10-19 Need break? 10-19 Using Sequencer 11-1 Describes sequence events, reset sequencer event, trace start qualifier (TSQ). 11.1 Sequencer Works 11-2 11.2 Detecting Sequence Events 11-3 11.3 Resetting Sequencer Event 11-8 11.4 Starting Trace During Specified Sequencer Level 11-12 simple scenario 11-14 Further qualifying events simple scenario 11-15 Adding conditional trace scenario 11-20 11.5 Summary 11-26 Closing system 11-26
Part III: User Reference
Defining Events 12-1 Discusses EVENTS works, specify conditions that define events, monitor target system using color-coded external probes. 12.1 EVENTS Works 12-2 define event 12-2 What EVENTS fields allow define 12-2 12.2 Defining Event Cycle Activity Flattened Mode 12-4 Execution cycle activity 12-4 Memory cycle activity 12-5
Contents
12.3
12.4
12.5
Defining Event Cycle Activity Unflattened Mode 12-7 Program cycle activity 12-7 Data cycle activity 12-8 Defining Event Address Data Value 12-10 address data value event dialog works 12-10 Defining event specific address data value 12-12 Defining event specific range addresses data values 12-12 Defining event specific number addresses data values 12-13 Defining event addresses data values outside specified range 12-14 Defining address symbol address 12-14 Masking bits within specified range 12-15 Monitoring Your Target System With External Channels 12-17 External Ranges dialog works 12-18 Monitoring combination external channels 12-19
Collecting Trace Samples Using TRACE Window 13-1 Describes system collect trace samples, stop disable tracing, display trace samples TRACE window, view different parts TRACE window. 13.1 Collecting Trace Samples 13-2 Setting system collect trace samples 13-4 Collecting samples until trace buffer full 13-5 Collecting specific number trace samples 13-6 Reenabling after disable 13-7 Flushing Accumulating Trace Samples 13-8 Updating TRACE Window With Contents Trace Buffer 13-9 Moving Through TRACE Window 13-10 Using sequences move through samples 13-10 Displaying specific trace sample 13-11 Understanding Parts TRACE Window 13-12 About mnemonics cycle columns 13-14 Displaying Hiding Information About Trace Samples 13-16 Tips displaying information TRACE window 13-16 Saving TRACE window configuration 13-17 Saving Loading Contents Trace Buffer 13-18 Determining file format 13-18 Saving contents trace buffer 13-18 Loading contents trace buffer 13-20
13.2 13.3 13.4
13.5 13.6
13.7
Contents
Contents
Viewing Trace Samples 14-1 Tells filter search through TRACE window view different trace samples. Also describes view timing information about trace samples. 14.1 Filtering 14-2 Filter config dialog works 14-3 filter 14-5 filter using mask 14-6 filter using pattern 14-8 Disabling filter 14-10 14.2 Searching Specific Trace Sample 14-11 Search config dialog works 14-12 search specific sample 14-14 14.3 Using Timestamp Gather Timing Information 14-16 Displaying timestamp TRACE window 14-16 Toggling through timestamp display modes 14-17 Determining your timestamp display mode 14-18 Counters 15-1 Explains operation counters, clock them various qualifiers, configure 32-bit counter, configure counter behave watchdog timer. 15.1 Counters Work 15-2 control counters 15-2 Precedence counter inputs 15-4 What counter fields 15-4 15.2 Counting Specific Number Events 15-6 15.3 Counting Clock Cycles 15-8 15.4 Counting Number Times Sequence Completes 15-10 15.5 Configuring 32-Bit Counter 15-12 Setting COUNTER 15-12 Setting COUNTER 15-13 15.6 Configuring Counter Behave Watchdog Timer 15-14 Setting debugger 15-14 Setting counter 15-14 Sequencer 16-1 Describes sequencer detect series events, reset sequencer, sequencer start conditional trace. 16.1 Sequencer Works 16-2 16.2 Detecting Sequence 16-3 Setting sequence 16-3 Using same event more than once sequence 16-4 Setting sequencer look either events 16-5 16.3 After Sequence Detected 16-6 16.4 Resetting Sequencer 16-7 precedence sequencer inputs 16-8 16.5 Starting Trace During Specified Sequencer Level 16-9
Contents
Breakpoints Triggers 17-1 Explains operation control hardware breakpoints triggers. 17.1 17.2 Hardware Breakpoints Generating hardware breakpoint Triggers Generating trigger pulse 17-2 17-2 17-4 17-6
Part Appendixes
XDS522A Emulation System Commands Describes commands that alternatives selecting menu options using dialog boxes manage XDS522A functionality. Defining Your Command Strings Creating Batch File Echoing strings batch file Controlling command execution batch file Functional List Commands Alphabetical List Commands
Troubleshooting Provides troubleshooting tips working with XDS522A emulation system includes listing progress error messages that software might display. Solutions Common Problems XDS522A doing what expect Events being detected Samples being collected Samples collected displayed Breakpoints executing Counter will stop Symbol name recognized Filter feature working properly Search feature working properly software does recognize commands Summary Software Messages
Glossary Defines acronyms terms used this book.
Contents
xvii
Figures
Figures
12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 13-1 13-2 14-1 14-2 15-1 16-1 16-2 17-1 XDS522A Emulation System Components 4-Level Instruction Pipeline TMS320C2xx 3-Cycle Pipeline XDS522A XDS522A Pipeline Architecture Stages 'C2xx Instruction Pipeline 1-10 Flattener Affects Stages 'C2xx Instruction Pipeline 1-10 Unflattened Mode Versus Flat Multi Word Mode 1-12 Features Software Interface Setup Window Standalone Setup With Tutorial Switch Settings Flat Multi Word Mode Application Window 4-11 Setup Window Flattened Mode) Execution Cycle Dialog 12-4 Memory Cycle Dialog 12-5 Events Unflattened Mode 12-7 Program Cycle Dialog 12-7 Data Cycle Dialog 12-9 Address Data Value Event Dialog 12-10 External-Channel Connector Interface Adapter 12-17 External Ranges Dialog 12-18 TRACE 13-2 TRACE Window 13-12 Filter Config Dialog 14-3 Search Config Dialog 14-12 Counter Fields COUNTER 15-4 Sequencer Reset Operation 16-8 Operation 16-10 XDS522A Chassis 17-4
xviii
Tables
Tables
10-1 11-1 11-2 12-1 12-2 12-3 12-4 12-5 12-6 12-7 12-8 12-9 13-1 13-2 13-3 14-1 14-2 15-1 15-2 Interface Feature Descriptions Jumper Settings Standalone Mode Keys Used TRACE Window Control Counters 10-2 Status After Events Occur 11-19 Status After Events Occur 11-25 EVENTS Fields Flattened Mode 12-3 EVENTS Fields Unflattened Mode 12-3 Execution Cycle Dialog Options 12-4 Defining Memory Cycle Activities 12-6 Defining Program Cycle Activities 12-8 Defining Data Cycle Activities 12-9 Address Data Value Dialog Fields 12-11 External-Channel Assignments 12-17 External Ranges Dialog Fields 12-18 TRACE Window Column Descriptions 13-13 Mnemonics TMS320C2xx With Flattener 13-14 Mnemonics TMS320C2xx Without Flattener 13-15 Filter Config Dialog Field Descriptions 14-3 Search Config Dialog Field Descriptions 14-13 Control Counters 15-3 Counter Field Descriptions 15-5
Contents
Part
Overview
Part
Tutorial
Part
User Reference
Part
Appendixes
Chapter
Overview XDS522A Emulation System
This chapter describes features components XDS522A emulation system system operates debugging environment.
Topic
Page
What XDS522A Emulation System? Understanding Debugging Environment Understanding TMS320C2xx Pipeline XDS522A Pipeline
What XDS522A Emulation System?
What XDS522A Emulation System?
XDS522A emulation system analysis debugging tool that adds breakpoint, tracing, timing (BTT) functionality development system that includes XDS510 XDS511. These functions allow
Monitor Benchmark performance Gather precise timing information Generate smaller, more efficient code Improve debugging efficiency
User-defined events control most activity XDS522A. Events defined address data patterns combination buses, execution memory cycle types, color-coded external channel probes. When these events occur, XDS522A can:
Start, stop, disable tracing Start, stop, reload, clock counters Advance reset sequencer Generate hardware breakpoints
What XDS522A Emulation System?
Features
XDS522A includes these features:
32K-byte real-time trace buffer Event recognition sequencing Dual 16-bit counters Trace acquisition control Multiple hardware breakpoints Hardware timestamping External triggers test equipment synchronization Ability load/save screen configurations trace samples
XDS522A monitors records cycle type activity target device full operating speed target device. 'C209 device adds visibility through additional pins that monitor internal buses cycle-type signals that available production devices. These additional signals reveal internal state information that improves debugging efficiency.
Overview XDS522A Emulation System
What XDS522A Emulation System?
Components
XDS522 emulation system consists following components:
PCdisplay software source debugger XDS510 emulator controller board JTAG cable that connects XDS510 XDS511 emulator XDS511 emulator board with 'C209 device target cable adapter board XDS522A chassis interface adapter with pipeline flattener woven cables target board your design external channel probes external power supply
Figure shows components XDS522 emulation system. components within dotted lines show configuration stand-alone mode. Stand-alone mode mode used tutorial. more information about stand-alone mode, Section page 4-4.
What XDS522A Emulation System?
Figure 1-1. XDS522A Emulation System Components
display software source debugger
XDS510 emulator controller board
JTAG cable
'C209SE XDS511 emulator
16-bit slot
Power supply Interface adapter Target cable adapter board
XDS522A chassis external channel probes Target board
Scope (optional)
connect your target board XDS511 emulator without using target cable adapter board. attach XDS511 your target through three connectors bottom XDS511 (JP6, JP7, JP8).
Overview XDS522A Emulation System
Understanding Debugging Environment
Understanding Debugging Environment
XDS522A supports code-development debugging activity 'C2xx devices speeds MHz. XDS522A target application (XDS511) operate independently each other share same JTAG scan chain. When source debugger functionality, debugger actions cause XDS522A respond activity special emulation (SE) device. example, software breakpoint occurs target application, XDS522A updates TRACE window with information. typical debugging environment 'C2xx application includes with source debugger XDS510 emulator controller that connects 'C2xx device through XDS511 emulator.
using real-time monitor.
using real-time monitor, must ensure that correctly REALTIME switch interface adapter XDS522A. REALTIME (S2) switch interface adapter affects activity that with XDS522A. When 'C2xx performs emulation actions stop mode, XDS522A does collect this information. real-time monitor, XDS522A collects 'C2xx information, including actions performed real-time monitor. operate 'C2xx debugger real-time mode, must ensure that XDS522A switch that code between ETRAP ERET visible. operate 'C2xx debugger stop mode, probably want ensure that XDS522A switch Off. operating stop mode switch will collect samples when debugger performing emulation actions well normal operation information. more information REALTIME switch, Step Setting Switches Interface Adapter section XDS522 XDS522A Emulation System Installation Guide.
Understanding TMS320C2xx Pipeline XDS522A Pipeline
Understanding TMS320C2xx Pipeline XDS522A Pipeline
When working with XDS522A, need keep mind that there distinct independent pipelines:
TMS320C2xx instruction pipeline sequence operations that occur during execution instruction. instruction pipeline four independent stages: instruction fetch, instruction decode, operand fetch, instruction execute. Figure shows sequence arbitrary instruction 'C2xx instruction pipeline. more information about 'C2xx instruction pipeline, TMS320C2xx User's Guide. XDS522A pipeline sequence that XDS522A uses process data compare data with events that define control breakpoints, tracing, timing. XDS522A pipeline three independent stages: compare events, determine action, take action. pipeline XDS522A unrelated instruction pipeline 'C2xx device. Figure illustrates three clock cycles XDS522A pipeline.
Figure 1-2. 4-Level Instruction Pipeline TMS320C2xx
CLKOUT1 Fetch Decode Operand Execute
Figure 1-3. 3-Cycle Pipeline XDS522A
Clock Compare events Determine action Take action
Overview XDS522A Emulation System
Understanding TMS320C2xx Pipeline XDS522A Pipeline
About XDS522A pipeline
XDS522A evaluates processor activity simultaneously clocks data through pipeline. Information remains pipeline three cycles before discarded written trace memory. order activity follows: first clock cycle XDS522A pipeline, software compares events with incoming data. comparison evaluates true, XDS522A latches output second clock cycle. third clock cycle, your defined events manner have specified:
control counter: decrement, start, stop, reload advance sequencer next level generate hardware breakpoint generate trigger pulse start, stop, disable tracing
clock that drives pipeline free running; this sample clock stops when there valid activity when processor low-power mode. XDS522A clocks data still pipeline when sample clock stops. Figure shows parallel activity with data pipeline.
Understanding TMS320C2xx Pipeline XDS522A Pipeline
Figure 1-4. XDS522A Pipeline Architecture
Clock cycle
Data from target device
Event definition
Temporary data storage
Timestamp generator
FALSE Data discarded clock cycle
Event comparison TRUE
Output TRUE: Latched clock cycle
Clock cycle
Temporary data storage
control
Counter
Counter
Sequencer
Breakpoint
Trigger
Trace
Clock cycle
Hardware breakpoint (EMU0)
Trigger (BNC connector)
Trace memory
Overview XDS522A Emulation System
Understanding TMS320C2xx Pipeline XDS522A Pipeline
About TMS320C2xx pipeline flattener
Figure illustrates stages single instruction passes through 'C2xx instruction pipeline, well other activity occurring same time other instructions. During cycle which instruction executes, 'C2xx fetches operands instruction decodes instruction fetches instruction XDS522A contains flattener 'C2xx instruction pipeline. each execution cycle, flattener aligns 'C2xx pipeline stages single instruction. Figure shows, flattener aligns operand fetch instruction decode instruction fetch instruction execution instruction flattener also affects contents trace buffer filtering unexecuted instructions from buffer that only executed cycles collected. flattener also aligns data with corresponding execution cycle.
Figure 1-5. Stages 'C2xx Instruction Pipeline
CLKOUT1 Fetch Decode Operand Execute
operations associated with four different instructions occur cycle.
Instruction executes this clock cycle. same cycle, 'C2xx fetches operands instruction decodes instruction fetches instruction
Figure 1-6. Flattener Affects Stages 'C2xx Instruction Pipeline
With flattener, 'C2xx pipeline stages single instruction aligned execution cycle.
Fetch Decode Operand Execute
1-10
Understanding TMS320C2xx Pipeline XDS522A Pipeline
When flattener, select following modes:
Flat multi word shows addresses first second words twoword instruction. This produces more complete disassembly information, which beneficial when COFF file your target code available. However, this mode uses more trace memory because requires another sample store second word. Flat first word shows only address first word two-word instruction. this mode, address second word; data activity associated with second word, sample shows address first word that instruction. This mode uses less trace memory than flat multi word mode uses.
need instructions they occur without adjustments 'C2xx pipeline, disable flattener (unflattened mode). Section 3.1, Choosing Flattener Mode, page information about choosing flattener mode. Figure shows samples collected block code using unflattened mode. Figure shows samples collected same block code using flat multi word mode. Notice that flattener aligns data accesses particular instruction with corresponding execution cycle.
Overview XDS522A Emulation System
1-11
Understanding TMS320C2xx Pipeline XDS522A Pipeline
Figure 1-7. Unflattened Mode Versus Flat Multi Word Mode
Samples collected unflattened mode
Program address/data POPD instruction TRACE 0029: ProgCycle Fetch<Dis Fetch Fetch Fetch Fetch Fetch Fetch PipeAdv Fetch Fetch>Dis Fetch<Dis Fetch Fetch Fetch Fetch Fetch Fetch DataCycle NoCycle NoCycle NoCycle DWrNoRd DWrNoRd DWrNoRd NoCycle DWrNoRd NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle PAdr 205A 205B 205C 205D 205E 205F 2060 2061 2061 2062 2086 2087 2088 2089 208A 208B 208C PDta 8AA0 80A0 8180 B001 00E0 7980 2086 2086 8B8A BF0A B903 8B8A BF0A FFFD 8BE0 6E89 9080 DAdr 0308 0309 030A 030A DDta Label _call: 2025 0302 030A 030A POPD AR0,* AR1,* AR0,# AR0,* 2086h Data address/data POPD instruction
LACL SACL
AR2,# AR2,# *AR1
Samples collected flat multi word mode
Execution memory addresses/data POPD instruction shown same sample. TRACE 0029: ExecCycle FirstBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk LastBlk 2ndWord FirstBlk MiddleBlk MiddleBlk 2ndWord MiddleBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk LastBlk MemCycle DataWrite DataWrite DataWrite NoCycle DataRead NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle DataRead DataWrite NoCycle DataRead NoCycle EAdr 205A 205B 205C 205D 205E 205F 2060 2086 2087 2088 2089 208A 208B 208C 208D 208E 208F EDta 8AA0 80A0 8180 B001 00E0 7980 2086 B903 8B8A BF0A FFFD 8BE0 6E89 9080 BE47 1080 E388 MAdr 0308 0309 030A 030A 0307 030B 030B MDta 2025 0302 030A 030A 0000 0000 0000 Label _call: POPD LACL SACL SETC LACC BCND AR0,* AR1,* AR0,# AR0,* 2086h AR2,# *,AR1 2061h
1-12
Chapter
About Software Interface
XDS522A provides with interface that customize with keyboard commands mouse. software interface consists three windows within main application window. This chapter provides general overview parts interface explains various ways manipulate interface.
Topic
Page
Overview Software Interface Entering Commands Making Window Active Sizing Window Moving Window 2-10 Saving Configuration Software Interface 2-11
Overview Software Interface
Overview Software Interface
software interface main application window, consisting menu bar, TRACE window, setup window, COMMAND window. Figure calls major sections interface. Table lists each section with brief descriptions.
Overview Software Interface
Figure 2-1. Features Software Interface
Menu Trace status indicator Program status indicator
File
Trace
Restart
MAdr MDta
Time=F7
TrcOn=F8
Peek=F9
-00000
Stopped
TRACE 0000: EAdr
EDta
TRACE window
EVENTS Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> SEQUENCER EvtA-|-|-|-|-|-|-|-|-< EvtB-|-|-|-|-|-|-|-|-< EvtC-|-|-|-|-|-|-|-|-< EvtD-|-|-|-|-|-|-|-|-< Cnt1-|-|-|-|-|-|-|-|-< Cnt2-|-|-|-|-|-|-|-|-< Lvl: TSQ:
COMMAND
trgload sample.out Target loaded from sample.out (Clear, sconfig myconfig.cfg alias "bdownload" CPU_BTT>
------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------| ------|-| ------|-|-| ------|-|-|-| ------|-|-|-|--| ------|-|-|-|--|-| ------|-|-|-|--|-|-| Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---| ACTION Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Download Disabled
setup window
COMMAND window
Download button
Enable/Disable button
About Software Interface
Overview Software Interface
Table 2-1. Interface Feature Descriptions
This part interface. Menu File menu used Control functions XDS522A See.
Trace menu
Load target symbol table Save screen configuration Exit application Control display information TRACE window Enable disable tracing Filter displayed samples particular sample TRACE window Define search pattern search samples TRACE window Update information TRACE window Select tracing mode Save contents trace buffer Load saved contents trace buffer Close TRACE window Download configuration setup window Enable disable setup window Clears setup window connection symbols (0), except intersection Immediate trace Strt Save configuration setup window Load saved configuration setup window Select flattener mode
page
page 3-14 page 13-16 page 13-2 page 14-5 page 13-10 page 14-12
page 13-9 page 13-8 page 13-18 page 13-20
menu
page 3-10 page 3-11 page
page page 13-7
Restart menu button
Restore setup window last downloaded configuration start tracing following trace disable Toggle through three timestamp display modes TRACE window Turn tracing
Time toggle
page 14-16
TraceON/TraceOFF menu button Peek menu button
page 13-7
Display TRACE window screen samples have collected
page 13-9
Overview Software Interface
Table 2-1. Interface Feature Descriptions (Continued)
This part interface. Trace status indicator used Show status circular trace buffer: See.
When number trace status indicator negative sign, trace buffer overflowed. When number trace status indicator plus sign, trace buffer overflowing, trace samples being discarded make room trace samples
Program status indicator TRACE window setup window EVENTS SEQUENCER COUNTER boxes
Show when your program running stopped Display trace samples collected XDS522A Control functions XDS522A Configure four unique events through sequence events XDS522A when tracing Chapter Chapter Chapter page 13-12
Count clock cycles Count events Count sequence completions Count number times other counter counts zero
TRACE ACTION Download button Enable/Disable button COMMAND window
Control when XDS522A traces samples Specify XDS522A should generate hardware breakpoint trigger pulse Send current configuration setup window XDS522A Enable ignore (disable) information setup window
Chapter Chapter page 3-10 page 3-11 page Appendix
Enter commands View error messages other output XDS522A
About Software Interface
Entering Commands
Entering Commands
Like debugger, software interface flexible command entry. Using mouse combinations, enter commands through menus, dialog boxes, interactive grid setup window. also enter commands command line COMMAND window.
Entering commands with mouse
Most commands need operate software available pulldown menus, dialog boxes, interactive grid setup window. Access these menus, boxes, grid with select button your mouse.
Entering commands with combinations
prefer, keyboard enter data manipulate interface. keyboard methods software similar those debugger interface. example:
manipulate pulldown menus using combinations with key. enter information dialog boxes using combinations with SPACE key. move cursor windows dialog boxes using PAGE DOWN key.
PAGE
command history feature using combinations such SHIFT
more information about using debugger interface, TMS320C2xx Source Debugger User's Guide.
Entering commands from command line
COMMAND window does have active enter commands command line. However, cannot enter commands command line when setup window active.
Making Window Active
Making Window Active
flexible command entry software allows make windows active entering commands from COMMAND window, using mouse, using function key. Making windows active brings that window front other windows, allowing move size that window, well enter commands. COMMAND window active window default when bring software.
Making window active using mouse
make software windows active using mouse. make window active using mouse, click once anywhere border window. When window active, gray, single border around window changes double-lined, yellow border. window behind other windows, moves front when becomes active.
Making window active from command line
make windows active from command line. make TRACE COMMAND windows active from COMMAND line: Make sure that setup window active. From COMMAND window, enter:
TRACE
COMMAND
When window active, gray, single border around window changes double-lined, yellow border. window behind other windows, moves front when becomes active.
Making window active using function
also function make window active. Pressing cycles through windows application window, making each window active turn.
About Software Interface
Sizing Window
Sizing Window
software allows customize interface sizing windows. size windows entering commands from command line using mouse.
Sizing main application window
main application window consists TRACE, setup, COMMAND windows, menu bar. This main window cannot sized using mouse from COMMAND window; must command-line options from icon properties that size application window. XDS522/XDS522A Emulation System Installation Guide describes these options.
Sizing window using mouse
resize, zoom, unzoom three software windows using mouse. resize window: Make that window active. Point white area lower-right corner window border. Click drag window desired size release mouse button. zoom window clicking white area upper-left corner window border. zoomed window fills screen, covering other windows. Unzoom window clicking same area that zoom window. Unzooming window returns window previously configured size.
Sizing Window
Sizing window from command line
resize TRACE COMMAND windows from command line, cannot resize setup window from command line. When setup window active (when double-lined borders), COMMAND window does recognize commands. must resize setup window using mouse method. resize TRACE COMMAND windows from command line: Make window active that want size. From COMMAND window, enter: size [width, length where width measured characters length measured lines. exceed width length main application window. might need experiment before find your optimal window sizes. optimal size each window depends your monitor size resolution size your application window.
About Software Interface
Moving Window
Moving Window
customize software interface rearranging setup, TRACE, COMMAND windows. have windows sized that they overlap, also helpful move windows front back display.
Moving window using mouse
move three windows within main application window using mouse. move window: Make that window active. Click hold mouse pointer yellow, double-lined border left side window. Drag window desired position.
Moving window using command line
move COMMAND TRACE windows using command line, cannot move setup window from command line. COMMAND window does accept commands when setup window active. move setup window, mouse method. move TRACE COMMAND windows from command line: Make that window active. From COMMAND window, enter: move position, position where position horizontal position measured characters position vertical position measured lines. exceed length width main application window.
2-10
Saving Configuration Software Interface
Saving Configuration Software Interface
Once have sized moved three windows within main application window, save configuration interface. This allows bring this configuration from command line, rather than resizing moving windows every time software. save configuration interface: Size move three windows within main application window your desired configuration. From COMMAND window, enter: ssave filename include pathname addition filename. load interface configuration, from COMMAND window, enter: sconfig filename Include pathname stored saved configuration directory other than default directory. interface changes configuration that saved under that filename.
About Software Interface
2-11
2-12
Chapter
Overview Typical Testing Debugging Session
This chapter describes basic steps that need follow when using XDS522A test debug your code.
Topic
Page
Choosing Flattener Mode Invoking Software Invoking Debugger Configuring Setup Window Downloading Configuration XDS522A 3-10 Enabling XDS522A 3-11 Running Your Application 3-12 Examining Your Results 3-14 Closing Software 3-14
Choosing Flattener Mode
Choosing Flattener Mode
discussed About TMS320C2xx pipeline flattener subsection page 1-10, pipeline flattener filters unexecuted instructions from trace buffer that only executed cycles collected. flattener also aligns data with corresponding execution cycle trace buffer. choose between flattened modes-flat multi word flat first word-or choose unflattened mode. select flattener mode, must following: Step switches interface adapter pod: Turn power XDS522A unplug power supply. Disconnect XDS511 from interface adapter pod. switches through interface adapter following default settings settings need:
Down Down Down Down Down
more information about setting these switches, XDS522/XDS522A Emulation System Installation Guide. switches flattener mode want, listed following table:
Mode Flat multi word (default) Flat first word Unflattened Switch Setting Down Down Down
Reconnect interface adapter XDS511. Plug power supply XDS522A turn power. Step Specify mode software using option command line when invoke software: selects unflattened mode selects flat first word mode selects flat multi word mode must hardware software particular flattener mode XDS522A work properly.
Invoking Software
Invoking Software
interface XDS522A emulation system software. invoke software, follow these steps: Invoke software double-clicking Windows icons software. When apply power XDS522A emulation system, TMS320C2xx starts running, even code loaded. When invoke software, XDS522A starts tracing activity processor automatically. Select Target code from File menu load symbol-table portion object file that using. Alternatively, TRGLOAD command from command line. must load symbol-table portion sample.out object file that symbolic information when configuring XDS522A. example, want able labels associated with source functions, XDS522A must able access symbol-table information. Note: Generating Symbol-Table Information generate symbol-table information, must compile link your code with symbolic debugging information (using compiler's option). There other load-type commands available:
BTTLOAD command (such bttload btt522a.cmd) reloads XDS522A firmware, after checking firmware already loaded. LOAD command (such load btt522a.cmd) forces reload XDS522A firmware.
BTTLOAD LOAD commands reload firmware provide XDS522A with target code symbol-table information. more information about TRGLOAD, BTTLOAD, LOAD, other software commands, Appendix XDS522A Emulation System Commands.
Overview Typical Testing Debugging Session
Invoking Debugger
Invoking Debugger
debug test your code with XDS522A emulation system, software conjunction with source debugger. debugger tell processor your application software. turn, software provides environment which trace test execution your code. invoke debugger either from software from WindowsTM. plan generate hardware breakpoint, must debugger's on-chip analysis module recognize generate hardware breakpoints. This section describes analysis module.
Invoking debugger from software
invoke debugger directly from software, TRGEXE command. basic syntax TRGEXE command trgexe debugger executable [filename] options processor name
debugger executable executable name debugger (for example, emu2xxwm.exe). debugger executable current directory, must specify full pathname. filename optional parameter that names object file that debugger loads into memory during invocation. This eliminates need debugger's LOAD command once debugger invoked. debugger looks file current directory; file isn't current directory, must supply entire pathname. options supply debugger with additional information. more information about debugger options, TMS320C2xx Source Debugger User's Guide.
processor name debugger option that names processor that plan debug. processor name must match names defined your board.cfg file. debugger option that allows debugger recognize commands that send from software. invoke debugger with option, debugger will respond commands from software.
Invoking Debugger
Once invoke debugger, must following software debugger together: Provide valid memory debugger that describes your system. define this batch file that execute with TAKE command, initialization batch file, interactively. Load object code application that want debug. Ensure that modify program counter (PC) point entry point your application (for example, debugger's command modify PC). Ensure that debugger's on-chip analysis module recognize XDS522A. invoke debugger with option, send commands debugger from software. more information, Sending debugger command debugger subsection page 3-12.
Invoking debugger from Windows
invoke debugger from Windows, follow these steps: Invoke debugger double-clicking Windows icon debugger. Provide valid memory debugger that describes your system. define this batch file that execute with TAKE command, initialization batch file, interactively. Load object code application that want debug. Ensure that modify program counter (PC) point entry point your application (for example, debugger's command modify PC). Ensure that debugger's on-chip analysis module recognize XDS522A. invoke debugger with option, send commands debugger from software. more information, Sending debugger command debugger subsection page 3-12.
Overview Typical Testing Debugging Session
Invoking Debugger
Setting analysis module generate breakpoints
plan generate hardware breakpoint, must also debugger's on-chip analysis module recognize generate hardware breakpoints. following steps guide through this process. additional information about analysis module, TMS320C2xx Source Debugger User's Guide. From debugger's Analysis menu, select Enable. This toggles menu option Disable enables debugger's analysis module. From Analysis menu, select Break. This displays Analysis break events dialog box. Click next EMU0 driven enable that option. sure that Program EMU1 driven options enabled (there next these options).
Analysis break events ]Program Program Bus: [X]EMU0 driven ]EMU1 driven
Addr[.] (*)Access )Read )Write )Fetch <<OK>> <Cancel>
Click
Configuring Setup Window
Configuring Setup Window
setup window, shown Figure 3-1, controls want XDS522A monitor activity processor cause actions occur. find information about setting setup window following chapters:
EVENTS configure four unique conditions SEQUENCER configure 8-level state machine detect particular sequence events counter outputs COUNTER boxes configure 16-bit counters TRACE define when start, stop, and/ disable tracing ACTION define when generate hardware breakpoints trigger pulses Chapter Defining Events Sequencer
Counters Collecting Trace Samples Using TRACE Window Breakpoints Triggers
Before configure setup window, clear previous configurations. clear configuration these ways:
Select Clear from menu. Enter BCLEAR from COMMAND window.
Overview Typical Testing Debugging Session
Configuring Setup Window
Figure 3-1. Setup Window
EVENTS Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> SEQUENCER EvtA-|-|-|-|-|-|-|-|-< EvtB-|-|-|-|-|-|-|-|-< EvtC-|-|-|-|-|-|-|-|-< EvtD-|-|-|-|-|-|-|-|-< Cnt1-|-|-|-|-|-|-|-|-< Cnt2-|-|-|-|-|-|-|-|-< Lvl: TSQ: ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------| ------|-| ------|-|-| ------|-|-|-| ------|-|-|-|--| ------|-|-|-|--|-| ------|-|-|-|--|-|-| Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---| ACTION Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Download Disabled
EVENTS
SEQUENCER
COUNTER boxes
TRACE
ACTION
Configuring Setup Window
Saving loading configuration
save XDS522A configuration that define setup window. This allows load reuse configurations. save current XDS522A configuration: Select Save from menu. This displays save dialog box:
save File: Comment: <<OK>> <Cancel>
Enter filename File field. want 33-character comment saved file, Comment field. this comment describe configuration, which will help distinguish among several saved configurations. view file with your usual text editor; comment shown beginning file. Click also save configuration using command. syntax BSAVE command bsave filename load saved configuration, select Load from menu. This displays load dialog which enter file name. also BLOAD command load configuration: bload filename
Overview Typical Testing Debugging Session
Downloading Configuration XDS522A
Downloading Configuration XDS522A
Once have configured setup window, must download configuration XDS522A. download configuration these ways:
Click Download button bottom setup window. Select Download from menu. Enter BDOWNLOAD from COMMAND window.
Download button bottom setup window changes color depending what XDS522A doing what need When make changes setup window, Download button turns yellow remind download configuration XDS522A. button also turns yellow first time click setup window following configuration download. During download, Download button turns gray. When configuration downloaded, Download button blue.
3-10
Enabling XDS522A
Enabling XDS522A
Once have downloaded configuration, must sure that XDS522A enabled. enabled, look lower right corner setup window.
word Enabled, XDS522A enabled. word Disabled, XDS522A disabled.
enable XDS522A these ways: Click Disabled button bottom setup window. Clicking word Disabled toggles button Enabled enables XDS522A. Likewise, clicking word Enabled toggles button Disabled disables XDS522A. Enabled/Disabled button always shows current state XDS522A (enabled disabled). Select Enable from menu. Enter BENABLE from COMMAND window.
Overview Typical Testing Debugging Session
3-11
Running Your Application
Running Your Application
Once have configured enabled XDS522A, your program. debugger cause processor your program. Follow these basic steps: Ensure that modify program counter (PC) point entry point your application (for example, debugger's command modify debugger's RESTART command). application using debugger command (such GO). invoke debugger with option (either from Windows with TRGEXE command), software send commands debugger. This allows perform following from software:
Send debugger command debugger Start target application wait until enters debug mode Single-step through target application wait until enters debug mode Stop target application
remainder this section describes send commands debugger from software.
Sending debugger command debugger
software send debugger command debugger. This useful when want enter debugger commands periodically avoid switching between software debugger applications. send commands debugger, TRGSEND command. syntax TRGSEND command trgsend debugger command debugger command that specify sent directly debugger's command interpreter. progress error messages generated debugger shown software's COMMAND window. want these error messages, must look debugger's COMMAND window. When TRGSEND command, control immediately returned command line software-the software does wait debugger finish executing command.
3-12
Running Your Application
TRGSEND command useful when want enter debugger commands periodically avoid switching between software debugger applications. Here some typical command sequences that might want send debugger:
analysis feature recognize generate hardware breakpoints:
trgsend take analysis.cmd trgsend asys_on trgsend stop_emu0
Reset program entry point program:
trgsend restart trgsend
frequently enter these commands, create alias command sequence. more information, Section A.1, Defining Your Command Strings, page A-2.
Starting target application
send debugger's command debugger using TRGRUNWAIT command, which causes target application start running wait until processor finishes running software breakpoint analysis break event. This command freezes software interface until target stops running until press either application windows.
Single-stepping through code
single-step through your target application using TRGSTEPWAIT command, which causes processor single-step through target application wait until processor finishes stepping software breakpoint analysis break event. This command freezes software interface. cancel wait mode, press application window.
Stopping target application
While processor running, send escape sequence debugger using TRGSTOP command, which causes processor stop executing target application.
Overview Typical Testing Debugging Session
3-13
Examining Your Results Closing Software Examining Your Results
Examining Your Results
most cases, will TRACE window examine results your testing session. TRACE window shows current contents trace buffer. Chapter Collecting Trace Samples Using TRACE Window, describes update TRACE window, display information about trace samples, move through TRACE window. Chapter Viewing Trace Samples, tells filter search TRACE window view different trace samples.
Closing Software
There several methods that close software source debugger:
close software these methods
From File menu, select Exit. From COMMAND window, enter:
quit
From Control upper left corner application window), select Close. Double-click Control box. From debugger's COMMAND window, enter:
quit
source debugger
From Control box, select Close. Double-click Control box.
3-14
Part
Overview
Part
Tutorial
Part
User Reference
Part
Appendixes
Chapter
Getting Started
This chapter describes tutorial this book find help when track. also shows choose flattener mode start testing debugging session.
This tutorial assumes that have correctly completely installed your XDS522A emulation system. more information, XDS522/XDS522A Emulation System Installation Guide. addition, assumed that have correctly installed emulator version TMS320C2xx source debugger that already familiar with debugger's basic features. have never used source debugger, complete tutorial TMS320C2xx Source Debugger User's Guide before start this tutorial.
Important!
Topic
Page
Before Begin Verifying Your Hardware Setup Choosing Flattener Mode Starting Debugging/Testing Session Summary 4-14
Before Begin
Before Begin
Before lessons this tutorial, need understand identify procedures, alternate ways perform tasks, what unexpected results, where more help.
Important! Please familiarize yourself with Notational Conventions sec-
tion Preface, particularly boxed symbols shown page lessons about related topics grouped into chapters. These groups lessons long, because lessons each chapter closely related, it's best take breaks between chapters rather than between lessons.
Identifying procedures
Once have completed parts tutorial, might want refer many lessons presented recall procedures that followed. find procedures easily, look shaded boxes. This example procedure:
Load previously saved XDS522A configuration. Clear current configuration selecting Clear from menu. From menu, select Load. This displays load dialog box. Enter myconfig.btt filename click
Using command interface software
Like debugger, software interface flexible command entry. type commands mouse, function keys, pulldown menus, dialog boxes. tutorial assumes that using mouse perform most functions. However, prefer, keyboard enter data manipulate interface. keyboard methods software similar those debugger interface. more information, Entering commands with combinations subsection page 2-6.
Before Begin
What when software doing what expect
Because XDS522A emulation system powerful complex, might experience some difficulty when trying configure software, there many places where information, it's easy tell XDS522A something that intend. first lessons software does seem doing what expect, following: through tutorial steps that section again. you're still experiencing problems, Appendix Troubleshooting, additional information.
Need additional help hints?
Online help available provide information about menu options, dialog boxes, contents application window. have installed online help, find XDS522A Online Help diskette that came with your XDS522A emulation system. diskette includes readme file with installation instructions. After have installed online help, Windows program group that contains icon online help:
open online help, double-click icon.
Getting Started
Verifying Your Hardware Setup
Verifying Your Hardware Setup
This tutorial assumes that have configured your hardware standalone mode, shown Figure 4-1. This setup includes XDS510 XDS511 hardware, device, target cable adapter board, interface adapter pod, XDS522A.
Figure 4-1. Standalone Setup With Tutorial
display software debugger
XDS510 emulator controller
JTAG cable
'C209SE XDS511 emulator
16-bit slot
Power supply Interface adapter Target cable adapter board
XDS522A
this tutorial, sure that hardware shown Figure that configure your jumper settings described Table 4-1. more information about installing components XDS522A about jumper settings, XDS522/XDS522A Emulation System Installation Guide XDS51x Emulator Installation Guide.
Verifying Your Hardware Setup
Table 4-1. Jumper Settings Standalone Mode
Jumper settings XDS511 emulator
Jumper Jumper Settings Jumper only following: 9-10 Jumper only following: 11-12
Jumper settings target cable adapter board
Jumper Jumper Settings Jumper only following: 1B-1C 2B-2C 3B-3C 4B-4C 5B-5C 6B-6C 7B-7C 8B-8C Jumper only 2B-3B
Jumper settings interface adapter
Jumper Jumper Settings Jumper pins together Jumper pins together Jumper pins labeled XTDO ETDI
Getting Started
Choosing Flattener Mode
Choosing Flattener Mode
discussed About TMS320C2xx pipeline flattener subsection page 1-10, XDS522A provides flattener that assists debugging applications 'C2xx. flattener filters unexecuted instructions from trace buffer that only executed cycles collected. flattener also aligns data with corresponding execution cycle trace buffer. There flattened modes that choose between:
Flat multi word shows addresses first second words twoword instruction. Flat first word shows only address first word two-word instruction.
need disable flattener features. This mode called unflattened mode. select flattened modes select unflattened mode, must following: switches interface adapter pod. Specify mode software using option. must hardware software particular flattener mode order XDS522A work properly. parts this tutorial, you'll using flat multi word mode. Before turn your XDS522A invoke software, must ensure that switches interface adapter correctly that specify option command line.
Choosing Flattener Mode
switches flat multi word mode: Turn power XDS522A unplug power supply. Disconnect XDS511 from interface adapter pod. Examine switches interface adapter pod. sure that they flat multi word settings shown Figure 4-2. Reconnect interface adapter XDS511. Plug power supply XDS522A turn power.
Figure 4-2. Switch Settings Flat Multi Word Mode
Down
Specify flat multi word mode software using option: Windows, select icon flat multi word version software. From File menu, select Properties. This displays Properties dialog box. Move your cursor Command Line box. sure that option appears following: Click
Getting Started
Starting Debugging/Testing Session
Starting Debugging/Testing Session
debug test your code with XDS522A emulation system, software conjunction with source debugger. debugger tell processor your application software. turn, software provides environment trace test execution your code. start debugging testing session, must invoke debugger software load sample program. After have invoked these tools, resize your windows maximize information shown your screen.
Setting debugger software
Debug
source debugger: Invoke source debugger double-clicking Windows icon debugger. From COMMAND window, enter:
take se_init
This command sets correct memory directing debugger execute memory commands contained se_init.cmd file. From COMMAND window, load sample.out program entering:
load sample
When using debugger with software, must ensure that modify program counter (PC) point entry point your application (for example, debugger's command modify PC). this lesson, when load sample.out file, already pointing entry point sample program (c_int0).
software: Invoke software double-clicking Windows icon flat multi word version software. This brings application window. might take seconds application window display software finish executing initialization routine.
Starting Debugging/Testing Session
When apply power XDS522A emulation system, TMS320C2xx starts running, even code loaded. When invoke software, XDS522A starts tracing activity processor automatically. Load symbol-table portion sample.out object file: From File menu, select Target Code. This displays Target code load dialog box. Enter sample.out File parameter. sure that asterisk next Clear set, click
Target code load File: [SAMPLE.OUT.] (*)Clear )Append <<OK>> <Cancel>
must load symbol-table portion sample.out object file that symbolic information when configuring XDS522A. example, want able labels associated with source functions, XDS522A must able access symbol-table information. Note: Understanding Different Load Commands this lesson, used FileTarget Code command load symbol table sample.out file. This equivalent entering TRGLOAD command from COMMAND window. There other load-type commands available:
BTTLOAD command (such bttload btt522a.cmd) reloads XDS522A firmware, after checking firmware already loaded. LOAD command (such load btt522a.cmd) forces reload XDS522A firmware.
this tutorial, BTTLOAD LOAD commands load symbol table sample.out file. Attempting could confuse debugger, will need close software reinvoke more information about TRGLOAD, BTTLOAD, LOAD, other software commands, Appendix XDS522A Emulation System Commands.
Getting Started
Starting Debugging/Testing Session
Show everything need
When invoke debugger software, application windows-one software debugger-cover most your screen overlap another. will need view portions both these windows same time. This lesson discusses some tips resizing application windows windows inside application window. Note: Manipulating Software Windows Menus most cases, interface software works same that source debugger interface works. size, move, zoom windows using same techniques, access menu options same way. more information about using debugger interface, TMS320C2xx Source Debugger User's Guide.
XDS522/XDS522A Emulation System Installation Guide describes command-line options that size application window. start with window that least characters wide lines long. Figure shows typical application window. There three windows inside application window:
TRACE window displays samples that trace buffer allows search filter information that collect. setup window allows define events that specify when collect samples when generate breakpoints triggers. COMMAND window provides area entering commands displaying command output, errors, messages.
4-10
Starting Debugging/Testing Session
Figure 4-3. Application Window
Menu window
File
Trace
MAdr MDta
Time=F7
Label
TrcOn=F8
-00000
Stopped
TRACE 0000: EAdr
EDta
EVENTS Timestamp Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> SEQUENCER EvtA-|-|-|-|-|-|-|-|-< EvtB-|-|-|-|-|-|-|-|-< EvtC-|-|-|-|-|-|-|-|-< EvtD-|-|-|-|-|-|-|-|-< Cnt1-|-|-|-|-|-|-|-|-< Cnt2-|-|-|-|-|-|-|-|-< Lvl: TSQ:
COMMAND rev. 0.98, 0.94, Prot 0.27 rev. 1.02 COFF rev. 1.10 Clock period: 50.0 CPU_BTT>
------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------| ------|-| ------|-|-| ------|-|-|-| ------|-|-|-|--| ------|-|-|-|--|-| ------|-|-|-|--|-|-| Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---| ACTION Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Download Disabled
COMMAND window
TRACE window
lesson continues next page
Getting Started
4-11
Starting Debugging/Testing Session
Resize TRACE COMMAND windows: Make TRACE window active: from COMMAND window, enter:
TRACE
With TRACE window active, resize show many trace samples possible:
size 80,41
Depending your monitor size resolution size your application window, this cause TRACE window cover most application window. Make COMMAND window active, move bottom screen, resize
COMMAND move 0,36 size 70,8
cannot size setup window entering SIZE command from COMMAND window. When setup window active (when double-lined borders), COMMAND window does recognize commands. need resize setup window using mouse method. Resize setup window: Press enough times bring setup window display. Like debugger, pressing cycles through windows application window, making each window active turn. Point lower right corner setup window. Press hold left mouse button; move mouse make window longer. Make window large enough word Download bottom window (Figure shows entire setup window). When window proper size, click left mouse button stop resizing window.
4-12
Starting Debugging/Testing Session
This: avoid entering WIN, SIZE, MOVE commands size
move windows each time invoke software, create batch file that includes these commands. From COMMAND window, enter TAKE command execute commands listed this batch file (for more information about creating batch files using TAKE command, Section A.2, Creating Batch File, page A-4). also following commands your batch file automatically resize setup window:
size 26,45
These commands work batch file because batch file does require COMMAND window active command recognized.
This: don't want create batch file, save your current
screen configuration file. From COMMAND window, enter SSAVE command:
ssave myconfig.cfg
This saves current screen configuration file this case, myconfig.cfg). When exit software reinvoke call your saved screen configuration using SCONFIG command:
sconfig myconfig.cfg
This restores screen configuration that saved myconfig.cfg.
Debug
Resize move debugger application window: Resize debugger application window move that lower right corner screen. Position debugger application window that application window same time. You'll switching between these applications frequently.
Getting Started
4-13
Summary
Summary
Congratulations! this chapter, learned following:
Choose flat multi word mode Invoke software debugger Load sample code symbolic information Resize application windows software windows
feel uncomfortable performing these tasks, take some time review material this chapter. comfortable with these tasks, you're ready move Chapter Detecting Event Halting Processor.
Need break?
need break want close software debugger, follow these directions:
close software, select Exit from File menu. close debugger, from COMMAND window, enter:
quit
start software again, follow instructions Section 4.4, Starting Debugging/Testing Session, page 4-8.
4-14
Chapter
Detecting Event Halting Processor
XDS522A emulation system driven conditions that specify. These conditions referred events. functional control blocks XDS522A (such sequencer, counters, trace control) respond events that define. define four events. this chapter, will define condition (event) detecting particular execution address. When that address detected, hardware breakpoint will occur.
Topic
Page
Understanding Setup Window Defining Event Collecting Trace Samples Immediately Executing Hardware Breakpoint Downloading Configuration Enabling XDS522A Saving XDS522A Configuration 5-11 Running Application Looking TRACE Window 5-12 Summary 5-14
Understanding Setup Window
Understanding Setup Window
configure XDS522A using setup window. Figure shows setup window with default settings. setup window uses grid lines that create intersections which place connection symbols (connection symbols look like zeros intersections). When setting breakpoint, tracing, timing functionality, remember these conventions:
Gray lines indicate valid intersections defining setup. Yellow lines indicate invalid intersections where connection symbols allowed. symbol indicates input condition. symbol indicates output condition.
Important! Before configure setup window, want clear
previous configuration that might have made. Clear previous configurations selecting Clear from menu. This clears setup window default settings, shown Figure 5-1. Notice that connection symbols cleared, except intersection Immediate trace Strt. through steps this tutorial, believe you've made mistake want start configuration, reset setup window selecting Clear option from menu.
Understanding Setup Window
Figure 5-1. Setup Window Flattened Mode)
EVENTS Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> SEQUENCER EvtA-|-|-|-|-|-|-|-|-< EvtB-|-|-|-|-|-|-|-|-< EvtC-|-|-|-|-|-|-|-|-< EvtD-|-|-|-|-|-|-|-|-< Cnt1-|-|-|-|-|-|-|-|-< Cnt2-|-|-|-|-|-|-|-|-< Lvl: TSQ: ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------| ------|-| ------|-|-| ------|-|-|-| ------|-|-|-|--| ------|-|-|-|--|-| ------|-|-|-|--|-|-| Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---| ACTION Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Download Disabled
Event definitions (EVENTS box)
8-level sequencer (SEQUENCER box)
16-bit counters (COUNTER boxes)
Indicates input condition Indicates output condition
Tracing (TRACE box)
Actions (ACTION box)
Detecting Event Halting Processor
Defining Event
Defining Event
setup window EVENTS box. define four events (A-D). When these predefined events occur, XDS522A count, sequence, start stop tracing, and/or generate triggers hardware breakpoints. define events using more qualifiers. either flattened modes, specify these qualifiers:
Execution cycle types Execution addresses Data execution Memory cycle types Memory addresses Data memory External-channel activity
this lesson, you'll define Event with qualifier. qualifier defines Event access address associated with xcall( function. This function that want generate hardware breakpoint.
Define Event access address associated with xcall(): EVENTS qualifier Event clicking intersection EXEC Address Event
EVENTS Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-|
Click here
This causes EXEC Addr Ranges dialog appear. Since defining Event access address associated with xcall(), want XDS522A examine information program (execution) 'C2xx.
Defining Event
EXEC Addr Ranges dialog box, click first listing:
Event EXEC Addr Ranges ||Mode| Beg| End| Len||MSB Click here Pattern <Cancel>
This switches
Event EXEC Addr Ranges <Cancel>
||Mode| Beg| End| Len||MSB Pattern ||INCL|0000|FFFF|0000||xxxx xxxx xxxx xxxx
Under (beginning address) heading, click 0000 press SPACE key. This displays Symbol Address dialog box. Symbol Address dialog box, enter _xcall Symbol:
Symbol Address Case sensitivity: Symbol:[_xcall <<OK>> (*)Off <Cancel>
Click This dismisses Symbol Address dialog box. EXEC Addr Ranges dialog should look like this:
Event EXEC Addr Ranges ||Mode| Beg| End| Len||MSB Pattern ||INCL|20A6|20A6|0001||_xcall <Cancel>
Click should connection symbol intersection EXEC Address Event EVENTS setup window.
Detecting Event Halting Processor
Collecting Trace Samples Immediately
Collecting Trace Samples Immediately
TRACE setup window control when XDS522A traces execution code. This different from TRACE window, which displays trace samples that XDS522A collects. With TRACE box, direct XDS522A following:
Start collecting trace samples:
soon your code begins running When particular event occurs When counter reaches zero When sequence events completes
Stop collecting trace samples:
When particular event occurs When counter reaches zero When sequence events completes When trace buffer full When XDS522A collects specific number trace samples
Note: Start Stop Tracing Same Event start stop tracing same event, XDS522A collects only sample. this lesson, you'll system start collecting trace samples soon sample.out begins running. This type tracing called trace immediate.
Collecting Trace Samples Immediately
XDS522A start tracing immediately: TRACE Look intersection Immediate Strt.
Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---|
Look here
there connection symbol (0), click intersection. This creates connection that intersection. there already connection symbol, TRACE ready.
Detecting Event Halting Processor
Executing Hardware Breakpoint
Executing Hardware Breakpoint
ACTION setup window allows specify what XDS522A should upon detection certain conditions. With ACTION box, direct XDS522A following:
Generate hardware breakpoint. generate hardware breakpoint:
When trace buffer full When particular event occurs When counter reaches zero When sequence events completes
Generate low-to-high trigger pulse connector. generate trigger pulse: When particular event occurs When counter reaches zero When sequence events completes
system execute hardware breakpoint when Event occurs: ACTION Click intersection Break Event
ACTION Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Enabled Click here
Download
This creates connection symbol intersection Break Event
Downloading Configuration Enabling XDS522A
Downloading Configuration Enabling XDS522A
that have configured EVENTS box, TRACE box, ACTION box, your setup window should look like following:
EVENTS Exec Cycle-----------> EXEC Address---------> EXEC Data------------> Memory Cycle---------> Address----------> Data-------------> Channels---------> SEQUENCER EvtA-|-|-|-|-|-|-|-|-< EvtB-|-|-|-|-|-|-|-|-< EvtC-|-|-|-|-|-|-|-|-< EvtD-|-|-|-|-|-|-|-|-< Cnt1-|-|-|-|-|-|-|-|-< Cnt2-|-|-|-|-|-|-|-|-< Lvl: TSQ: ------|-|-|-| ------0-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------|-|-|-| ------| ------|-| ------|-|-| ------|-|-|-| ------|-|-|-|--| ------|-|-|-|--|-| ------|-|-|-|--|-|-| Immediate-> ------| Clock Cycle-> ----|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< -|-|--|-|-|-|--|-|-| Reload Stop----< -|-|--|-|-|-|--|-|-| FFFF Reld----< -|-|--|-|-|-|--|-|-| SnglOFF Zero----> -|-|--|-|-|-|--|-|-| COUNTER Clk----< -|-|--|-|-|-|--|-|-| FFFF Strt----< ---|--|-|-|-|--|-|-| Reload Stop----< ---|--|-|-|-|--|-|-| FFFF Reld----< ---|--|-|-|-|--|-|-| SnglOFF Zero----> ---|--|-|-|-|--|-|-| TRACE Strt----< ---0--|-|-|-|--|-|-| Stop----< -|----|-|-|-|--|-|-| Disa----< -|-|--|-|-|-|--|-|-| Len:00 Zero----> TrcFull----> ---| ACTION Break----< ---|--0-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Download Disabled
only connection symbols should ones shown here.
lesson continues next page
Detecting Event Halting Processor
Downloading Configuration Enabling XDS522A
Each time configure setup window, must download configuration XDS522A. Download configuration XDS522A clicking Download button bottom setup window. might take seconds configuration downloaded. Download button changes color depending what XDS522A doing what need
Important!
When make changes setup window, Download button turns yellow remind download configuration XDS522A. button also turns yellow first time click setup window following configuration download. During download, Download button turns gray. When configuration downloaded, Download button blue.
XDS522A work properly, must enable XDS522A selecting Enable from menu. When XDS522A enabled, setup window shows word Enabled lower right corner. Clicking word Enabled toggles button Disabled disables XDS522A. Likewise, clicking word Disabled toggles button Enabled enables XDS522A.
Important!
5-10
Saving XDS522A Configuration
Saving XDS522A Configuration
save XDS522A configuration that define setup window. This allows load reuse configurations. Save current XDS522A configuration: Select Save from menu. This displays save dialog box:
save File: Comment: <<OK>> <Cancel>
Enter myconfig.btt File click This dismisses dialog saves current configuration file called MYCONFIG.BTT current (working) directory. load saved configuration, select Load from menu. This displays load dialog which enter file name.
Detecting Event Halting Processor
5-11
Running Application Looking TRACE Window
Running Application Looking TRACE Window
software source debugger work together. debugger causes processor your application. software provides environment trace test execution your code.
Debug
Because want generate hardware breakpoint when particular address detected, must debugger's on-chip analysis module recognize generate hardware breakpoints. following steps take through this process. additional information about analysis module, TMS320C2xx Source Debugger User's Guide. debugger's on-chip analysis module recognize generate hardware breakpoints: From Analysis menu, select Enable. This toggles menu option Disable enables debugger's analysis module. From Analysis menu, select Break. This displays Analysis break events dialog box. Click next EMU0 driven enable that option. sure that Program EMU1 driven options enabled (there next these options). Your dialog should look similar this:
Analysis break events ]Program Program Bus: [X]EMU0 driven ]EMU1 driven
Addr[.] (*)Access )Read )Write )Fetch <<OK>> <Cancel>
Click From Analysis menu, select View. This displays ANALYSIS window.
5-12
Running Application Looking TRACE Window
that you've software debugger's analysis module, ready program: Reset program entry point: from debugger's COMMAND window, enter:
restart
program:
processor should until XDS522A stops execution function xcall().
cycle through windows bring TRACE window make active. Alternatively, click border TRACE window make window active.
TRACE window displays newest samples bottom window. Notice that processor executed several instructions past _xcall label; this latency between XDS522A detecting this condition, XDS522A asserting EMU0 signal, 'C2xx processor responding signal.
TRACE 000B: EAdr 2080 2081 2082 20A6 20A7 20A8 20A9 20AA 20AB 20AC 20AC EDta 90A0 7A80 20A6 8AA0 80A0 8180 B001 00E8 BC04 1A6E MAdr 030B 030C 030D 030E 030E 206E MDta 0002 2083 030A 030E 030E 00A9 Label SACL CALL _xcall POPD LACC _xcall,* AR0,*+ AR1,* AR0,#1 AR0,*0+,AR0 006eh,10 Event (_xcall)
Samples collected during latency
Detecting Event Halting Processor
5-13
Summary
Summary
Congratulations! this chapter, learned following:
Clear XDS522A configuration Define event with qualifier Collect trace samples soon application begins running (trace immediate) Execute hardware breakpoint Download configuration XDS522A Enable disable XDS522A Save XDS522A configuration Configure debugger recognize generate hardware breakpoints application looking TRACE window
feel uncomfortable performing these tasks, take some time review material this chapter. comfortable with these tasks, you're ready move Chapter Understanding Status Indicators TRACE Window.
Need break?
need break want close software debugger, follow these directions:
close software, select Exit from File menu. close debugger, from COMMAND window, enter:
quit
start software again, follow instructions Section 4.4, Starting Debugging/Testing Session, page 4-8.
5-14
Chapter
Understanding Status Indicators TRACE Window
Chapter learned define event generate hardware breakpoint when that event occurs. When sample program, TRACE window showed contents trace buffer (the listing samples collected XDS522A). this chapter, you'll look more closely parts TRACE window contents trace buffer.
Topic
Page
Collecting Trace Samples Between Events Understanding Status Indicators Moving Through TRACE Window Displaying Information About Trace Samples Saving Contents Trace Buffer 6-10 Summary 6-12
Collecting Trace Samples Between Events
Collecting Trace Samples Between Events
this lesson, will define events. will then XDS522A collect trace samples between those events.
From menu, select Clear reset XDS522A configuration. setup window, XDS522A start tracing when Event detected stop tracing when Event detected: EVENTS Define Event access address associated with call( function: Click intersection EXEC Address Event EXEC Addr Ranges dialog box, click first listing switch Under (beginning address) heading, click 0000 press SPACE key. Symbol Address dialog box, enter _call Symbol, then click EXEC Addr Ranges dialog box, click Define Event access address 0x2026 Click intersection EXEC Address Event EXEC Addr Ranges dialog box, click first listing turn Under (beginning address) heading, click 0000 enter address 2026. Notice that XDS522A automatically updates field with same address. Click
Collecting Trace Samples Between Events
TRACE tracing start detection Event disable detection Event sure that immediate tracing enabled looking intersection Immediate Start.
there connection symbol, click intersection disable connection. there connection symbol (0), action required.
Click intersection Strt Event Click intersection Disa Event
Don't forget download XDS522A configuration and, necessary, enable XDS522A.
Important!
Debug
Reset program entry point program:
restart
Because tell XDS522A generate hardware breakpoint because code causes infinite loop, processor runs indefinitely. ahead processor run. This allows explore XDS522A features described following lessons.
Understanding Status Indicators TRACE Window
Understanding Status Indicators
Understanding Status Indicators
Look upper right corner application window. should word Running. This program status indicator. While processor running your code, status Running. When program running, program status indicator says Stopped. left program status indicator number that indicates status circular trace buffer: trace status indicator.
When trace status indicator negative sign, XDS522A currently collecting trace samples. negative sign also indicates that trace buffer overflowed. When trace status indicator plus sign, trace buffer overflowing, trace samples being discarded make room trace samples. While trace buffer overflowing, constantly changing number preceded plus sign.
Some common values trace status indicator are:
When trace status indicator -00000 +00000 +00001
trace buffer Empty. Full, samples have been overwritten. trace buffer contains (0x8000) samples. Full, oldest trace sample been discarded.
Keep mind that when XDS522A stops collecting trace samples, processor does necessarily stop running code. processor might might continue running code, depending whether execution code completes, halt execution code, etc.
Understanding Status Indicators
Currently, trace status indicator should -00029 (from previous lesson). This means that XDS522A collected 0x0029 samples trace buffer before XDS522A detected Event disabled tracing. samples that XDS522A collected, select Update from Trace menu. This updates TRACE window with contents trace buffer. Notice that first column line TRACE window (the header line) sample number 00029. This tells that trace buffer contains 0x0029 samples (labeled 28). This matches number trace status indicator.
Understanding Status Indicators TRACE Window
Moving Through TRACE Window
Moving Through TRACE Window
that know where status indicators what they mean, it's time look TRACE window.
bring TRACE window make active.
TRACE window should look similar this:
Total number samples collected TRACE 0029: ExecCycle LastBlk 2ndWord FirstBlk MiddleBlk 2ndWord MiddleBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk MiddleBlk LastBlk FirstBlk MiddleBlk MemCycle NoCycle NoCycle NoCycle NoCycle NoCycle NoCycle DataRead NoCycle DataWrite NoCycle NoCycle DataRead DataRead NoCycle NoCycle DataRead FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF EAdr 2068 2069 209A 209B 209C 209D 209E 209F 20A0 20A1 20A2 20A3 20A4 20A5 2025 2026 EDta 7980 209A 8B8A BF0A FFFD 8BE0 1080 BC04 9000 8B89 7C02 0090 7680 EF00 8B9E 4F80 MAdr 0307 0200 0309 0308 0303 MDta 0000 0000 0302 2025 0000 Label LACC SACL SBRK PSHD 209ah AR,# 0000h AR0,* *-,AR *,15 Oldest sample shown window
Newest sample
Sample number
TRACE window displays trace samples from oldest newest bottom. newest sample always trace sample number When TRACE window active, keys listed Table move through samples.
Table 6-1. Keys Used TRACE Window
Scroll through newest samples, window length time Scroll through oldest samples, window length time Scroll through most recent samples using value that Goto trace sample dialog (see page 6-7) Scroll through least recent samples using value that Goto trace sample dialog (see page 6-7) Press.
PAGE DOWN
PAGE
CONTROL
PAGE DOWN
CONTROL
PAGE
Moving Through TRACE Window
Table 6-1. Keys TRACE Window (Continued)
Adjust window's contents that newest sample shown window Adjust window's contents that oldest sample shown window Move cursor line time Move cursor down, line time Press.
HOME
software allows move specific trace sample scroll through specific number samples. move specific trace sample scroll through specific number samples, select Goto from Trace menu. This displays Goto trace sample dialog box:
Goto trace sample Sample number field Sample Number:[0.] Control PgUp/PgDn Offset: )1000 )400 )100 )Set Value(hex):[80.] <Goto> <<OK>> <Cancel>
Scrolling options
display specific trace sample, enter number that sample Sample Number field click Goto. select specific number samples scroll TRACE window, configure scrolling options:
Click next 1000 scroll 0x1000 samples time. Click next scroll 0x0400 samples time. Click next scroll 0x0100 samples time. Click next specify hexadecimal value other than 1000, 400, 100; specify value Value field.
Once
configure scrolling options, CONTROL PAGE sequences move through TRACE window.
CONTROL PAGE DOWN
Understanding Status Indicators TRACE Window
Displaying Information About Trace Samples
Displaying Information About Trace Samples
TRACE window allows display following each trace sample:
cycle type data 16-bit program/execution address data 16-bit program/execution data data 16-bit data/memory address data 16-bit data/memory data data from external channels program disassembly code 48-bit hardware timestamp
large amount information stored each trace sample make your display difficult read. hide some fields TRACE window. display hide fields TRACE window, follow these steps: From Trace menu, select Config. This displays Trace configuration dialog box. Select deselect options that want display hide clicking next option name. When finished, click When change TRACE window configuration, XDS522A saves changes automatically recalls configuration when reinvoke software. more information about Trace configuration dialog box, Section 13.6, Displaying Hiding Information About Trace Samples, page 13-16 XDS522A Emulation System Online Help.
Displaying Information About Trace Samples
this lesson, sure that execution address showing; should heading EAdr TRACE window. EAdr heading, modify your TRACE window configuration: don't already have Trace configuration dialog displayed, select Config from Trace menu. sure that there next P/Exe Adrs option.
Trace configuration [X]Cycle [X]Type (*)Hex [X]Mnemonic )Long(+) ]External (*)Hex [X]P/Exe Adrs (*)Hex [X]P/Exe Data (*)Hex [X]D/Mem Adrs (*)Hex [X]D/Mem Data (*)Hex [X]Disasm [X]Timestamp (*)Time(G) Disasm Len:[34.] Time format: )Bin )hours (*)Short(-) )minutes )Bin )seconds )Bin )milliseconds )Bin (*)microseconds )Bin Timestamp: )Bin )Absolute )Relative )Count(Z) (*)Delta Clock Period (ns):[50.0.]
<<OK>> <Cancel>
Important!
sure this selected
Click Look EAdr column TRACE window. With TRACE window active, press HOME oldest sample. Notice that oldest sample 0x205A execution address. This sample corresponds _call label that defined Event Press newest sample (shown bottom window). EAdr column newest sample shows 0x2026, which execution address that used define Event
Understanding Status Indicators TRACE Window
Saving Contents Trace Buffer
Saving Contents Trace Buffer
save contents trace buffer file. This useful want reload trace buffer with contents previous trace want trace information text format. Note that plan reload trace buffer contents, sure save trace buffer binary (Bin) format. Save current contents trace buffer selecting Save from Trace menu. This displays Trace save dialog box:
Select file format Trace save (*)Text )Bin )All (*)Range Start:[00000.] End:[00000.] Select Range control which samples saved selected Range, specify Start values
file exists:
(*)Abort )Append )Overwrite
File:[SAVE.TRC.] Comment:[.] <<OK>> <Cancel>
Save trace buffer contents text format, starting trace number ending trace number Select Text save file text format. Select Range specify range trace samples. Start field, enter 0001F. field, enter 00000. Select Overwrite write over previous contents saved trace file. Enter mytrace.trc File. Enter following 33-character Comment field:
Saved 0x20 samples text format
Click This dismisses dialog saves trace buffer contents file called MYTRACE.TRC.
6-10
Saving Contents Trace Buffer
Because saved contents trace buffer text, view MYTRACE.TRC file your Windows Notepad. see, XDS522A records time date when saved file, software revision, number samples that were saved:
Remember, when save contents trace buffer text file, cannot reload trace buffer with that file. plan reload trace buffer with contents saved file, save file binary (Bin) format.
Understanding Status Indicators TRACE Window
6-11
Summary
Summary
Congratulations! this chapter, learned following:
Collect trace samples between events Locate read program status indicator trace status indicator Move through samples TRACE window Customize display information about each trace sample Save contents trace buffer
feel uncomfortable performing these tasks, take some time review material this chapter. comfortable with these tasks, you're ready move Chapter Using Advanced Tracing Features.
Need break?
need break want close software debugger, follow these directions:
close software, select Exit from File menu. close debugger, from COMMAND window, enter:
quit
start software again, follow instructions Section 4.4, Starting Debugging/Testing Session, page 4-8.
6-12
Chapter
Using Advanced Tracing Features
Chapter learned trace particular event. lessons this chapter show advanced tracing features XDS522A such clearing trace buffer adding samples trace buffer.
Topic
Page
Flushing Accumulating Trace Samples Detecting When Trace Buffer Full Collecting Specific Number Trace Samples Understanding Difference Between Trace Stop Trace Disable 7-14 Summary 7-16
Flushing Accumulating Trace Samples
Flushing Accumulating Trace Samples
previous tracing lessons, trace buffer cleared each time performed trace. This means that anything that been displayed TRACE window when started trace overwritten. This tracing mode called trace flush. This default tracing mode when invoke software. change tracing mode prevent previous trace samples from being overwritten. This tracing mode called trace accumulate. This lesson demonstrates difference between trace accumulate mode trace flush mode.
From menu, select Clear reset XDS522A configuration. Select trace flush mode: From Trace menu, select Mode. This displays Trace Mode configuration dialog box:
Trace Mode configuration (*)Flush )Accumulate <<OK>> <Cancel>
Click next Flush, click
Flushing Accumulating Trace Samples
setup window, XDS522A trace Events EVENTS Define Event access address associated with call( function: Click intersection EXEC Address Event EXEC Addr Ranges dialog box, click first listing turn Under (beginning address) heading, click 0000 press SPACE key. Symbol Address dialog box, enter _call Symbol, then click EXEC Addr Ranges dialog box, click Using qualifiers, define Event data write memory address 0x030C: Click intersection Memory Cycle Event This displays Memory Cycle dialog box. Click next Write next Data. dialog should look like following:
Memory Cycle Event )Read (*)Write )Access ]Idle ]Reset <<OK>> )Program (*)Data )I/O )Any )None <Cancel> <Clear>
Click Click intersection Address Event Memory Addr Ranges dialog box, click first listing turn Under (beginning address) heading, click 0000 enter address 030C.
sure that (ending address) field value 030C. Click
lesson continues next page Using Advanced Tracing Features
Flushing Accumulating Trace Samples
TRACE tracing start detection Event sure that immediate tracing enabled. Click intersection Strt Event ACTION system execute hardware breakpoint occurrence Event clicking intersection Break Event Don't forget download XDS522A configuration and, necessary, enable XDS522A.
Important!
Debug
debugger's on-chip analysis module recognize generate hardware breakpoints: sure that analysis module enabled. From Analysis menu, select Break. This displays Analysis break events dialog box. Select EMU0 driven enable that option. sure that Program EMU1 driven options enabled. Click that debugger program. Reset program entry point program:
restart
When XDS522A detects data write memory address 0x030C, causes processor stop running.
bring TRACE window make active.
Press HOME oldest trace sample. That sample contains statement associated with call( function. Press newest trace samples. Notice that there 0x00D6 samples trace buffer.
Flushing Accumulating Trace Samples
that what trace buffer, it's time Change trace accumulate mode: From Trace menu, select Mode. Trace Mode configuration dialog box, select Accumulate click
Debug
Reset program entry point program:
restart
Again, when XDS522A detects data write memory address 0x030C, causes processor stop running. Look TRACE window. There twice many samples buffer there were previous lesson (0x01AC samples, exact). Because selected trace accumulate mode, software overwrite previous contents trace buffer added samples
Using Advanced Tracing Features
Detecting When Trace Buffer Full
Detecting When Trace Buffer Full
trace buffer hold (0x8000) samples. this lesson, you'll trace buffer full condition generate event this case, hardware breakpoint).
From menu, select Clear reset XDS522A configuration.
Important! sure that tracing mode Flush:
From Trace menu, select Mode. Trace Mode configuration dialog box, select Flush click setup window, XDS522A detect when trace buffer full: EVENTS Define Event access address associated with xcall( function: Click intersection EXEC Address Event EXEC Addr Ranges dialog box, click first listing turn Under (beginning address) heading, click 0000 press SPACE key. Symbol Address dialog box, enter _xcall Symbol, then click EXEC Addr Ranges dialog box, click TRACE tracing start detection Event sure that immediate tracing enabled. Click intersection Strt Event
Detecting When Trace Buffer Full
ACTION system execute hardware breakpoint when trace buffer full clicking intersection Break TrcFull:
TRACE ---|--0-|-|-|--|-|-| -|----|-|-|-|--|-|-| -|-|--|-|-|-|--|-|-| ---| Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Strt----< Stop----< Disa----< Zero----> TrcFull----> Enabled Click here
Len:00 ACTION
Download
Don't forget download XDS522A configuration and, necessary, enable XDS522A.
Important!
Debug
Unless have closed debugger, should still have analysis interface enabled analysis break event EMU0 driven low. have analysis interface follow debugger steps page 7-4. Reset entry point program:
restart
This time processor stops running when trace buffer full.
bring TRACE window make active.
Press HOME oldest trace sample. That trace sample numbered 7FFF. Press newest trace sample. That trace sample numbered
this lesson, there 0x8000 768) samples stored trace buffer. Notice that trace status indicator +0000A. isn't +00000 (meaning that trace buffer full contains 0x8000 samples)? Remember that there latency between time XDS522A detects breakpoint condition, time XDS522A asserts EMU0 signal, time 'C2xx processor responds signal. Even though told XDS522A assert hardware breakpoint when trace buffer full, trace samples were overwritten because latency.
Using Advanced Tracing Features
Collecting Specific Number Trace Samples
Collecting Specific Number Trace Samples
XDS522A tracing feature allows collect specific number trace samples. field TRACE allows specify number additional samples that want collect after certain condition occurs. enter length value hexadecimal number. Once XDS522A detects start condition that specify, begins with length value internally decrements that value each sample collects. XDS522A detects start condition again before count reaches zero, reloads length value that specified starts decrementing again. Each time start condition detected, XDS522A reloads length value that specified starts decrementing. Once count reaches zero, XDS522A stops disables tracing.
XDS522A detects only start condition does reload length value, trace buffer contains Length trace samples. XDS522A detects start condition more times before count reaches zero, trace buffer contains Length trace samples plus samples collected before length value last reloaded.
following lessons demonstrate what happens when start condition occurs more than once when start condition occurs only once.
Collecting large number samples reloading length value
This lesson demonstrates XDS522A detects more than occurrence start condition reloads length value that specified.
From menu, select Clear reset XDS522A configuration. setup window, XDS522A collect specific number samples: EVENTS Define Event access address associated with xcall( function. need review specific steps, EVENTS setup shown page 7-6.
Collecting Specific Number Trace Samples
TRACE tracing start detection Event start collecting 0xFF trace samples: tracing start detection Event sure that immediate tracing enabled. Click intersection Strt Event Click field. Type length. Click intersection Zero Disa. Zero field allows specify what XDS522A should when finishes collecting samples.
Length field TRACE ------0-|-|-|--|-|-| -|----|-|-|-|--|-|-| -0-|--|-|-|-|--|-|-| ---| Break----< ---|--|-|-|-|--|-|-| Trigger----< ------|-|-|-|--|-|-| Strt----< Stop----< Disa----< Zero----> TrcFull----> Enabled
Len:FF ACTION
Click here
Download
Don't forget download XDS522A configuration and, necessary, enable XDS522A.
Important!
Debug
Reset entry point program:
restart
processor will indefinitely with this configuration. Recall that program status indicator upper right corner application window tells status processor.
lesson continues next page Using Advanced Tracing Features
Collecting Specific Number Trace Samples
Look trace status indicator upper right corner application window. Currently, trace status indicator shows -0017A, indicating that XDS522A collected 0x017A samples trace buffer. Because XDS522A collect 0x00FF samples after Event occurs, might expect trace status indicator show -000FF -00100. understand difference between actual number samples expected number samples, need look contents TRACE buffer. contents trace buffer, select Update from Trace menu. bring TRACE window make active, press
Notice that first column header line TRACE window sample number 0017A. first sample collected (the oldest sample), press
HOME
see, XDS522A detected start condition (_xcall), started collecting trace samples, used length value begin decrementing:
TRACE 0017A: EAdr 179: 20A6 178: 20A7 177: 20A8 176: 20A9 175: 20AA 174: 20AB 173: 20AC 172: 20AD 171: 20AE 170: 20AF 16F: 20B0 EDta 8AA0 80A0 8180 B001 00E8 BC04 1A6E 9080 BE47 138A BF0A MAdr 030C 030D 030E 030E 026E 030E 030E MDta 2083 030A 030E 030E 00AB AC00 AC00 Label _xcall
POPD LACC SACL SETC LACC
AR0,*+ AR1,* AR0,#1 AR0,*0+,AR0 006eh,10 *,3,AR2 AR2,#fffdh
example, however, XDS522A detected another occurrence _xcall.
7-10
Collecting Specific Number Trace Samples
display sample that contains second occurrence _xcall, follow these steps: From Trace menu, select Goto. This displays Goto trace sample dialog box:
Goto trace sample Sample Number:[0.] Control PgUp/PgDn Offset: )1000 )400 )100 )Set Value(hex):[80.] <Goto> <<OK>> <Cancel>
Sample Number field, enter Click Goto. When XDS522A detected this occurrence _xcall, reloaded length value that specified started decrementi

Other recent searches


X98014 - X98014   X98014 Datasheet
SS6610 - SS6610   SS6610 Datasheet
SN74LV125 - SN74LV125   SN74LV125 Datasheet
SN54LV125 - SN54LV125   SN54LV125 Datasheet
SN74AVC4T245 - SN74AVC4T245   SN74AVC4T245 Datasheet
MHW9247 - MHW9247   MHW9247 Datasheet
KMM372E213CK - KMM372E213CK   KMM372E213CK Datasheet
AT1382A - AT1382A   AT1382A Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive