| Datasheets.org.uk - 100 Million Datasheets from 7500 Manufacturers. |
TMS320C5x
Top Searches for this datasheetvde 0413 - vde 0413 tms320c50 mnemonic description - tms320c50 mnemonic description sprt125 - sprt125 schematic diagram vga to rca - schematic diagram vga to rca internal diagram of 76810 - internal diagram of 76810 IC LM7805 FEATURES - IC LM7805 FEATURES Experiment Manual of TMS320C50 - Experiment Manual of TMS320C50 assembly language program to sampling the signal - assembly language program to sampling the signal 75189 - 75189 TMS320C5x - TMS320C5x TMS320C5x Starter User's Guide Literature Number: SPRU101A Reprinted November 1997 Copyright 1997, Texas Instruments Incorporated Preface Read This First About This Manual This book describes (digital signal processor) Starter (DSK) with these tools: assembler debugger This Manual goal this book help learn assembler debugger. This book divided into three parts: Part Hands-On Information presented first that start using your same receive Chapter describes features provides overview TMS320C5x Starter Kit. Chapter contains installation instructions your assembler debugger. lists hardware software tools you'll need tells environment. Chapter lists features assembler debugger tells steps need take assemble debug your program. Part Assembler Description contains detailed information about using assembler. Chapter explains create assembler source files invoke assembler. Chapter discusses valid directives gives alphabetical reference these directives. Part III: Debugger Description contains detailed information about using debugger. Chapter explains invoke debugger pulldown menus, dialog boxes, debugger commands. Notational Conventions Notational Conventions This document uses following conventions. Program listings, program examples, interactive displays, filenames, symbol names shown special typeface similar typewriter's. Examples bold version special typeface emphasis; interactive displays bold version special typeface distinguish commands that enter from items that system displays (such prompts, command output, error messages, etc.). Here sample program listing: 00001 0a00 00002 >>>>> ENTRY POINT 0a00 00003 0a00 8b88 00004 0a01 8ba9 loop 0a00h .entry *,AR0 Here example system prompt command that might enter: dska testfile.asm syntax descriptions, instruction, command, directive bold face font parameters italics. Portions syntax that bold should entered shown; portions syntax that italics describe type information that should entered. Syntax that entered command centered bounded box. Syntax that used text file left-justified unbounded box. Here example directive syntax: .include "filename" .include directive. This directive parameter, indicated filename. When .include, parameter must actual filename, enclosed double quotes. Square brackets identify optional parameter. optional parameter, specify information within brackets; don't enter brackets themselves. Here's example instruction that optional parameter: LACC 16-bit constant shift] Notational Conventions Information About Cautions Warnings LACC instruction parameters. first parameter, 16-bit constant, required. second parameter, shift, optional. optional second parameter, must precede with comma. Braces indicate list. symbol (read separates items within list. Here's example list: This provides three choices: Unless list enclosed square brackets, must choose item from list. assembler syntax statements, column usually reserved first character optional label symbol. label symbol required parameter, symbol label will shown starting against left margin shaded example below. instruction, command, directive, parameter, other than symbol label, should begin column one. symbol .set symbol value Note that .word does begin column above example, symbol required .set directive must begin column Some directives have varying number parameters. example, .word directive have several parameters. syntax this directive .word 0abcdh,56 This syntax shows that .word must have least value parameter, have option supplying label additional value parameters, separated commas. Information About Cautions Warnings This book contain warnings. This example warning statement. warning statement describes situation that could potentially cause harm you. Read This First Related Documentation From Texas Instruments Related Documentation From Texas Instruments following books describe TMS320C5x related support tools. obtain copy these documents, call Texas Instruments Literature Response Center (800) 477-8924. When ordering, please identify book title literature number. TMS320C5x User's Guide (literature number SPRU056) describes 'C5x 16-bit, fixed-point, general-purpose digital signal processors. Covered architecture, internal register structure, instruction set, pipeline, specifications, DMA, ports, on-chip peripherals. TMS320C1x/C2x/C2xx/C5x Assembly Language Tools User's Guide (literature number SPRU018) describes assembly language tools (assembler, linker, other tools used develop assembly language code), assembler directives, macros, common object file format, symbolic debugging directives 'C1x, 'C2x, 'C2xx, 'C5x generations devices. TMS320C2x/C2xx/C5x Optimizing Compiler User's Guide (literature number SPRU024) describes 'C2x/C2xx/C5x compiler. This compiler accepts ANSI standard source code produces TMS320 assembly language source code 'C2x, 'C2xx, 'C5x generations devices. TMS320C5x Source Debugger User's Guide (literature number SPRU055) tells invoke 'C5x emulator, evaluation module, 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. TMS320 Designer's Notebook: Volume (literature number SPRT125) presents solutions common design problems using 'C2x, 'C3x, 'C4x, 'C5x, other DSPs. 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 Fax: Europe: Email: World Wide Web: Bulletin Board Service (BBS) 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.53) Request tool updates Software: (214) 638-0333 Software fax: (214) 638-7742 Hardware: (713) 274-2285 Literature Response Center: (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. Read This First 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 IBM, PC-DOS registered trademarks International Business Machines Corp. MS-DOS registered trademark Microsoft Corp. trademark International Business Machines Corp. viii Contents Contents Part Hands-On Information Introduction Describes features provides functional overview TMS320C5x Starter (DSK) Features Overview Memory Installing Assembler Debugger Provides installation information system running under What You'll Need Hardware checklist Software checklist module connections Step Connecting Your Step Installing Software Step Modifying Your config.sys File Step Modifying PATH Statement Step Verifying Installation Installation errors 2-10 Overview Code Development Debugging System Covers assembler, debugger, code development Description Assembler features assembler Description Debugger features debugger Developing Code Getting Started Contents Part Assembler Description Using Assembler Describes assembler, constants, symbols, expressions, assemble your program Creating Assembler Source Files Using valid labels Using mnemonic field Using operand field Commenting your source file Constants Decimal integers Hexadecimal integers Binary integers Character constants Symbols Labels Constants Using Symbols Expressions Assembling Your Program 4-10 Generating output file option) 4-10 Creating temporary object file option) 4-10 Defining assembler statements from command line (asm option) 4-11 Assembler Directives Describes assembler directives Using Assembler Directives Directives That Define Sections Directives That Reference Other Files Directives that Enable Conditional Assembly Directives That Initialize Memory Miscellaneous Directives 5-10 Directives Reference 5-11 Contents Part III: Debugger Description Using Debugger Describes invoke debugger Invoking Debugger Displaying list available options option) Selecting baud option) Identifying serial port (com# option) Defining entry point option) Selecting data terminal ready (DTR) logic level option) Selecting screen size options) Setting configuration mode memory option) Using Pulldown Menus Debugger Escaping from pulldown menus submenus Using Display submenu Using Fill submenu Using Load submenu Using Help submenu Using eXec submenu Using Quit submenu Using Modify submenu Using Break submenu 6-10 Using Init submenu 6-10 Using Watch submenu 6-10 Using Reset submenu 6-10 Using Save submenu 6-11 Using Copy submenu 6-11 Using Op-sys submenu 6-11 Using Dialog Boxes 6-13 Closing dialog 6-15 Using Software Breakpoints 6-16 Setting software breakpoint 6-16 Clearing software breakpoint 6-17 Finding software breakpoints that 6-17 Quick-Reference Guide 6-18 Starter (DSK) Circuit Board Dimensions Schematic Diagrams Contains schematics Glossary Defines acronyms terms used this book Contents Running Title-Attribute Reference Figures 'C5x Block Diagram Memory 'C5x RS-232 Connections Module Connections RS-232 Cable Connecting Your RS-232 Cable Into Your Board Command Setup Environment (Sample autoexec.bat File) Basic Debugger Display Basic Debugger Display Software Development Flow .space Directive Main Menu Monitor Information Screen Setting Software Breakpoint 6-16 TMS320C5x Circuit Board Dimensions Running Title-Attribute Reference Tables 6-10 6-11 6-12 6-13 6-14 Indirect Addressing Summary Assembler Options 4-10 Assembler Directives Summary Memory-Mapped Registers 5-25 Summary Debugger Options Screen Size Options Submenu Selections Displaying Information Submenu Selections Filling Memory Submenu Selections Loading Information into Memory Submenu Selections Executing Code Submenu Selections Modifying Code Submenu Selections Handling Breakpoints 6-10 Submenu Selections Watching Data 6-10 Submenu Selections Saving Code 6-11 Submenu Selections Copying Information 6-11 Debugger Function Definitions 6-18 Debugger Floating-Point Formats 6-18 Debugger Register Definitions 6-19 Contents xiii Running Title-Attribute Reference Examples Source File try1.asm Assembler Created List File try1.lst Analyzing Expressions With Using Continuous Strings Sections Directives Chapter Introduction This chapter provides overview TMS320C5x Starter (DSK). 'C5x low-cost, simple, stand-alone application board that lets experiment with 'C5x DSPs real-time signal processing. 'C50 onboard allow full-speed verification 'C5x code. also gives freedom create your software board, allows build boards, expand system many ways. supplied debugger windows-oriented, which simplifies code development debugging capabilities. Topic Page Features Overview Memory Features Features This section describes features TMS320C5x DSK: Industry standard 'C50 fixed-point instruction cycle time 32K-byte PROM (programmable read-only memory) Voice quality analog data acquisition TLC32040 (analog interface circuit) Standard connectors analog input output that provide direct connection microphone speaker XDS510 emulator connector expansion external design Overview Overview Figure depicts basic block diagram 'C50. shows interconnections, which include host interface, analog interface, emulation interface. communications RS-232 port board. bytes PROM contain kernel program boot loading. pins 'C50 connected external interfaces. external interfaces include four 24-pin headers, 4-pin header, 14-pin XDS510 header. TLC32040 interfaces 'C50 serial port. connectors provide analog input output board. Figure 1-1. 'C5x Block Diagram Expansion connector TNS320C50 Control Serial port D0-D15 port A0-A15 JTAG emulation port Analog interface TLC32040 Analog Analog PROM bootcode XDS510 port 14-pin header Introduction Memory Memory 'C5x simplest 'C5x application boards. Even though external memory available board, on-chip 'C50 provides enough memory most application programs. kernel program contained 32K, 8-bit PROM. PROM only boot loading cannot accessed after boot loading, this portion on-chip memory reserved kernel program. Figure shows memory 'C5x DSK. Figure 1-2. Memory 'C5x Program 0000h Memory registers 0060h Reserved kernel Data Bootloader (on-chip) 0800h Interrupt vectors 0840h Debugger kernel program 0980h 0080h Reserved 0100h 0300h 0500h Reserved 0800h User's program 0980h 2C00h External space 2C00h FE00h FFFFh INT2 TRAP reserved DSK. Reserved debugger kernel User's space External space FFFFh configured either program data memory, depending value status register ST1. Memory on-chip, dual-access, random-access-memory (DARAM) reserved buffer status registers. single-access, random-access-memory (SARAM) configured program data memory. kernel program stored this area from 0x840h-0x980h. kernel program performs overwrite, reset signal required reload kernel program. Since kernel program stored SARAM, this on-chip memory cannot configured data memory only (RAM interrupt vectors allocated, starting from 0x800h. IPTR PMST register should modified (refer subsection 3.6.3, Status Control Registers TMS320C5x User's Guide). TLC32040 board provides single-channel, input/output, voice-quality analog interface with following features: Single-chip digital-to-analog (D/A) analog-to-digital (A/D) conversion with bits dynamic range Variable sampling rate filtering interfaces directly 'C50 serial port. master input clock provided 10-MHz timer output from 'C50. hard-wired 16-bit word mode operation. reset connected 'C50. analog capabilities suited many applications, including audio data processing. directly connect most preamplified microphones speakers analog input output. more information concerning AIC, refer data sheet, literature number SLAS014E. provides headers, including XDS510, help design your external hardware. majority 'C50 other integrated circuit (IC) signals board connected these headers. XDS510 header allows become portable XDS510 target system. 'C5x windows-oriented debugger that makes easy develop debug software code. communicates with using pins through RS-232 serial port. Figure shows module connections between RS-232 serial port DSK. Introduction Memory Figure 1-3. RS-232 Connections RS-232 line buffers (XMIT) PC/AT (RCV) host asynchronous (RS) serial port 'C50 assembler. Refer Chapters description assembler debugger their uses. Chapter Installing Assembler Debugger This chapter describes install Starter (DSK) system running under PC-DOS MS-DOS Topic Page What You'll Need Step Connecting Your Step Installing Software Step Modifying Your config.sys File Step Modifying PATH Statement Step Verifying Installation What You'll Need What You'll Need following checklists detail items that shipped with assembler debugger additional items you'll need these tools. module connections RS-232 cable also discussed this section. Hardware checklist host memory display power requirements 100% compatible with hard disk system 1.2M-byte floppy-disk drive Minimum 640K bytes Monochrome color (color recommended) greater) power supply with 2.1-mm power jack connector, which common most wall-mounted transformers. low-current transformer recommended, because designed hold during brief power surges. Notes: want DSK's on-board power supply regulators external circuits. must overload circuit. External loads cause regulators operate higher temperature. Loads recommended. using external power supply, sure connect correctly; warrantied after have made modifications minimize risk electric shock fire hazard, power supply adapter should rated class safety extra-low voltage. adapter personal computer providing energy this product should certified more following: CSA, VDE, TUV. board port cable circuit board Asynchronous RS-232 serial communications link RS-232 with interface What You'll Need optional hardware EGA- VGA-compatible graphics display card large monitor. debugger options that allow change overall size debugger display. larger screen size, must invoke debugger with option. more information about debugger options, refer page 6-2. Blank, formatted disks miscellaneous materials Software checklist operating system files MS-DOS PC-DOS (version 4.01 later) dsk5a.exe executable file assembler. dsk5d.exe executable file needed running debugger interface. miscellaneous files Other files included your package, such sample source files additional documentation. find brief description these files Readme file included your disk. sure check Readme file latest information software changes operation. Note: Other applications also downloaded from TMS320 Internet file transfer protocol (FTP) site. Need Assistance subsection page vii, Internet address. Installing Assembler Debugger What You'll Need module connections need RS-232 cable connect your your board. designed with RS-232 connection mounted board. Figure shows module connections. Figure 2-1. Module Connections RS-232 Cable Female DB25 Male DB25 Female Male Assignments Signal Name Protective ground Transmit data Receive data Request send Clear send Data ready Signal ground Carrier detect Data terminal ready Ring indicator These signals used DSK. DB25 Step Connecting Your Step Connecting Your Follow these steps connect your board your Turn your PC's power. Connect your RS-232 cable either communication port your Connect your RS-232 cable 25-to-9 adapter, necessary. Plug RS-232 cable adapter) into board. Refer Figure details. Figure 2-2. Connecting Your RS-232 Cable Into Your Board System clock Analog interface circuit Plug your RS-232 cable into this socket (DB9 female) Analog 320C50 Analog Power supply connector PROM store kernel program schematics more detail board, refer Appendix Connect 9-Vac transformer onto board. Refer Figure details. Plug transformer into wall socket. Turn your PC's power Note: following suitable RS-232 connections: male connected DB25 female male connected female Installing Assembler Debugger Step Installing Software Step Installing Software This section explains process installing debugger software hard disk system. Make backup copy product disk. necessary, refer manual that came with your computer.) your hard disk system disk, create directory named dsktools. This directory assembler debugger software. create this directory, enter: c:\dsktools Insert your product disk into drive Copy contents disk: copy a:\*.* c:dsktools\*.* Step Modifying Your config.sys File Step Modifying Your config.sys File When using debugger, have only files open active time. tell system allow more than active files, must following line your config.sys file: FILES=20 Once edit your config.sys file line, invoke file turning PC's power turning again. Installing Assembler Debugger Step Modifying PATH Statement Step Modifying PATH Statement ensure that your debugger works correctly, must modify PATH statement identify dsktools directory. only must this before invoke debugger first time, must time power reboot your accomplish this entering individual commands, it's simpler commands your system's autoexec.bat file. general format doing this This allows invoke debugger without specifying name directory that contains debugger executable file. modifying your autoexec.bat file already contains PATH statement, simply include ;C:\dsktools statement shown Figure 2-3. Figure 2-3. Command Setup Environment (Sample autoexec.bat File) DATE TIME ECHO PATH=c:\dos;c:\dsktools PATH statement modify autoexec.bat file, sure invoke before invoking debugger first time. invoke this file, enter: autoexec Step Verifying Installation Step Verifying Installation ensure that have correctly installed your board, assembler, debugger, enter following commands system prompt: using serial communication port (com1), enter: dsk5d using serial communication port (com2), enter: dsk5d using serial communication port (com3), enter: dsk5d using serial communication port (com4), enter: dsk5d identify serial port that debugger uses communicating with your default setting After entering dsk5d command, should display similar this one: Figure 2-4. Basic Debugger Display Display Fill Load Help eXec Quit Modify Break Init Watch Reset Save Copy TMS320C50 Reverse Assembler ADDR CODE WORD MNMC OPERANDS 0a00 0a01 0a02 0a04 0a05 0a07 0a08 0a09 0a0b a0ac 0a0d 0a0e 0a0f 0a10 be41 SETC bcic bf80 0000 LACC c000 bf09 0e00 8b89 bb06 a2a0 0e00 be04 APAC 90a0 SACL 1100 LACC 90a0 SACL 1101 LACC 90a0 SACL FIELD TMS320C50 Watches (1010h) edffh 0166777o TMS320C50 Register :00000000 ACCB :00000000 OV:0 :00000000 PM:0 TRG0 :0000TRG1:0000 TRG2 :0000 0000 ST0:0600 ST1: 01fc 0a00 AR0: 0000 St0: 0000 AR1: 000a St1: 0000 AR2: 0000 St2: 0000 AR3: 0000 St3: 0000 AR4: 0000 St4: 0000 AR5: 0000 St5: 0000 AR6: 0000 St6: 0000 AR7: 0000 DRR: 0000 DXR: 0000 TIM: 2932 PRD: ffff IMR: 0002 IFR: 000b PMST:0834 INDX:0000 DBMR:0000 BMAR:0000 CWSR:0000 GRG: ff00 SPCR:0800 TCR: 0000 INIM #0000h,0 #0000h AR1,#0e00h *,AR1 0e00h,*+ *+,0 0000h,1 *+,0 0001h,1 *+,0 TMS320C50 Display Data Memory: 'Hexadecimal' format 1000: 1007: 100e: 1015: 101c: 0000 0800 2000 0000 1101 ffef ffff 0000 0000 0000 feef ffff edff 0010 2841 bfdf fffd 7ffe fdff 0000 0100 fffe ffbf 7fff ff7d 0008 0001 ffff ffff ffff 0000. 1200. 0240 fef7. ffff.() A.}. INPUT COMMAND Installing Assembler Debugger Step Verifying Installation display similar this one, have correctly installed your board, assembler, debugger. don't display, your software cables installed properly. through installation instructions again make sure that have followed each step correctly; then reenter command above. Installation errors still display, more following conditions cause: Your baud setting incorrect. Some Windows OS/2 applications notebook computers have low-level software limitations that affect baud settings. Refer page valid baud settings. have used incorrect communication port (com1 versus Refer page more information communication ports. Your communication port channel interrupted noisy. using lower baud rate. Refer page valid baud rates. mouse driver other software using same communication port attempting with DSK. another communication port DSK. Refer page more information communication ports. Your RS-232 cable connectors connected snugly. Your 9-Vac transformer plugged both ends. When receiving power LM7805 voltage regulator warm touch. 2-10 Chapter Overview Code Development Debugging System Starter (DSK) lets experiment with realtime signal processing. gives freedom create your software board build boards expand system number ways. assembler debugger software interfaces that help develop, test, refine assembly language programs. This chapter provides overview assembler debugger describes overall code development process. Topic Page Description Assembler Description Debugger Developing Code Getting Started Overview Code Development Debugging System Description Assembler Description Assembler assembler simple easy-to-use interface. Only most significant features assembler have been incorporated. Note that this COFF assembler; however, create object files using TMS320 fixed-point assembly language tools that load DSK. features assembler Quick. assembler differs from many other assemblers that does through linker phase create output file. Instead, uses special directives assemble code absolute address during assembly phase. result, create small programs quickly easily. Easy use. want create larger programs, simply chaining files together with .include directive. Description Debugger Description Debugger debugger easy learn about use. friendly, window-oriented interface reduces learning time eliminates need memorize complex commands. debugger capable loading executing code with single-step, breakpoint, run-time halt capabilities. Figure identifies several features debugger display. When invoke debugger, should display similar this exactly same, should close). Figure 3-1. Basic Debugger Display menu Display Fill Load Help eXec Quit Modify Break Init Watch Reset Save Copy TMS320C50 Reverse Assembler ADDR CODE WORD MNMC OPERANDS FIELD TMS320C50 Watches (1010h) edffh 0166777o TMS320C50 Register :00000000 ACCB :00000000 OV:0 :00000000 PM:0 TRG0 :0000TRG1:0000 TRG2 :0000 0000 ST0:0600 ST1: 01fc 0a00 AR0: 0000 St0: 0000 AR1: 000a St1: 0000 AR2: 0000 St2: 0000 AR3: 0000 St3: 0000 AR4: 0000 St4: 0000 AR5: 0000 St5: 0000 AR6: 0000 St6: 0000 AR7: 0000 DRR: 0000 DXR: 0000 TIM: 2932 PRD: ffff IMR: 0002 IFR: 000b PMST:0834 INDX:0000 DBMR:0000 BMAR:0000 CWSR:0000 GRG: ff00 SPCR:0800 TCR: 0000 register display reverse assembly display 0a00 0a01 0a02 0a04 0a05 0a07 0a08 0a09 0a0b a0ac 0a0d 0a0e 0a0f 0a10 be41 SETC bcic bf80 0000 LACC c000 bf09 0e00 8b89 bb06 a2a0 0e00 be04 APAC 90a0 SACL 1100 LACC 90a0 SACL 1101 LACC 90a0 SACL INIM #0000h,0 #0000h AR1,#0e00h *,AR1 0e00h,*+ *+,0 0000h,1 *+,0 0001h,1 *+,0 watch display data memory display TMS320C50 Display Data Memory: 'Hexadecimal' format 1000: 1007: 100e: 1015: 101c: 0000 0800 2000 0000 1101 ffef ffff 0000 0000 0000 feef ffff edff 0010 2841 bfdf fffd 7ffe fdff 0000 0100 fffe ffbf 7fff ff7d 0008 0001 ffff ffff ffff 0000. 1200. 0240 fef7. ffff.() A.}. command entry INPUT COMMAND features debugger Easy use, window-oriented interface. debugger separates code, data, commands into manageable portions. Powerful command set. Unlike many other debugging systems, this debugger doesn't force learn large, intricate command set. debugger supports small powerful command set. Flexible command entry. There main ways enter commands: command line using menu bar. Choose method that like better. Overview Code Development Debugging System Developing Code Developing Code Figure illustrates code development flow. Figure 3-2. Software Development Flow Assembler source Assembler Executable file Debugger target system following list describes tools shown Figure 3-2. assembler translates assembly language source files into machine language object files TMS320C5x family processors. Only most essential features assembler have been incorporated. This COFF assembler, although executable object files created TMS320 fixed-point assembly language tools will also load DSK. goal development process produce module that executed target system. debugger refine correct your code. assembler debugger Getting Started Getting Started This section provides quick walkthrough that started without reading entire user's guide. These examples show most common methods invoking assembler debugger. Create short source file walkthrough; call try1.asm. Example 3-1. Source File try1.asm Saw-toothed Wave Generator Ramp rate determined interrupt rate step size. Ramp made numerical rollover. initialization, using default value. Declare memory-mapped registers program block address .mmregs Include memory 0080ch XINT transmit interrupt vector 00a00h .entry Initial address Load Data Page (Zero) CALL SP_init Call serial port initialize function LAMM #20h Unmask receive interrupt (XINT) SAMM SPLK #0ffffh, IFR; Clear pending interrupt LOOP: Increment ACCU SACL DXR,3 Shift ACCU left bits when storing IDLE Wait interrupt LOOP XINT: RETE Reenable interrupts SP_init: SPLK #01h,PRD Generate clock from TOUT SPLK #20h,TCR support master clock *,AR0 LACC #0080h 00000080h SACH Clear SACL GREG GREG 80h, >8000h memory Global AR0,#0FFFFh point global memory #9999 Bring 10000 cycles LACC *,0,AR0 (.5ms 50ns) SACH GREG Disable global memory LACC #0008h serial port reset configure SACL burst mode, input, data length bits LACC #80c8h SACL Bring serial port reset Overview Code Development Debugging System Getting Started Enter following command assemble try1.asm: dsk5a try1 This command invokes TMS320C5x assembler. input file extension .asm (for example, try1.asm), don't have specify extension; assembler uses .asm default. more information about invoking assembler, refer Section 4.5. When enter this command, debugger creates executable file called try1.dsk. listing errors warnings that have occurred during assembly, assemble try1.asm with option (lowercase dsk5a try1 This time, assembler only creates executable file, creates listing file called try1.lst. listing file helpful because contains list unresolved symbols opcodes. Getting Started Example 3-2. Assembler Created List File try1.lst 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 >>>>> 00013 00014 00015 00016 00017 00018 00019 0020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 >>>>> >>>>> ---- ---- ---- ---- *Saw-toothed Wave Generator ---- ---- Ramp rate determined interrupt rate step size. Ramp made ---- ---- numerial rollover. initialization, using default value.* ---- ---- ---- ---- Declare memory-mapped registers ---- ---- program block address ---- 0000 .mmregs Include memory ---- 080c 0080ch 080c 7980 XINT transmit interrupt vector 080d 0000 ---- 0a00 00a00h ---- 0000 .entry Initial address ENTRY POINT 0a00 0a00 bc00 Load Data Page (Zero) 0a01 7a80 CALL SP_init Call serial port initialize function 0a02 0000 0a03 0804 LAMM 0a04 bfc0 #20h Unmask receive interrupt (XINT) 0a05 0020 0a06 8804 SAMM 0a07 ae06 SPLK #0ffffh,IFR Clear pending interrupt 0a08 ffff 0a09 b80a LOOP: Increment ACCU 0a0a 9321 SACL DXR,3 Shift ACCU left bits when storing 0a0b be22 IDLE Wait interrupt 0a0c 7980 LOOP 0a0d 0a09 0a0e be3a XINT: RETE Re-enable interrupts ---- ---- SP_init: 0a0f ae25 SPLK #01h,PRD Generate clock from TOUT 0a10 0001 0a11 ae26 SPLK #20h,TCR support master clock 0a12 0020 0a13 8b88 *,AR0 0a14 bf80 LACC #0080h 00000080h 0a15 0080 0a16 9821 SACH Clear 0a17 9005 SACL GREG GREG 80h, >8000h memory Global 0a18 bf08 AR0,#0FFFFh point global memory 0a19 ffff 0a1a bec4 #9999 Bring 10000 cycles 0a1b 270f 0a1c 1088 LACC *,0,AR0 (.5ms 50ns) 0a1d 9805 SACH GREG Disable global memory 0a1e bf80 LACC #0008h serial port reset configure 0a1f 0008 0a20 9022 SACL burst mode, input, data length bits 0a21 bf80 LACC #80c8h 0a22 80c8 0a23 9022 SACL Bring serial port reset 0a24 ef00 FINISHED READING FILES ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 Overview Code Development Debugging System Getting Started ready debug your program. Enter following command invoke debugger: dsk5d This command brings TMS320C5x debugger your screen. load your try1.dsk sample program using LOAD command. more information using debugger, refer Chapter Chapter Using Assembler This chapter tells assembler describes valid source files. Topic Page Creating Assembler Source Files Constants Symbols Using Symbols Expressions Assembling Your Program 4-10 Using Assembler Creating Assembler Source Files Creating Assembler Source Files create assembler source file, almost ASCII program editor. careful using word processors; these files contain various formatting codes special characters which word processors alter. assembly language source programs consist source statements that contain assembler directives, assembly language instructions, comments. Your source statement lines characters line. following example shows several lines source statements: Begin: .set .word sacl 0a00h #sym 016h LAB_1 LAB_2 LAB_3 ;initialize ;symbol sym=2 ;add accumulator ;initialize word with 016h ;store accumulator-location sym(5) LAB_1: LAB_2: LAB_3: ;location LAB_1 LAB_2 same ;LAB_3 next address Your source statement contain four ordered fields. general syntax source statements follows: [label][:] mnemonic [operand list] comment] Follow these guidelines: statements must begin with label, blank, asterisk, semicolon. Labels optional; them, they must begin column more blanks must separate each field. Note that characters equivalent blanks. Comments optional. Comments that begin column begin with asterisk semicolon comments that begin other column must begin with semicolon. Creating Assembler Source Files Using valid labels Labels optional assembly language instructions most (but all) assembler directives. When them, label must begin column source statement. label contain alphanumeric characters (A-Z, a-z, 0-9, Labels case sensitive first character cannot number. example: .entry Start: lacl sacl 0a00h *,AR0 AR0,#0 #03fh Your code start here Turn interrupts ;IMR located page ;store mask preceding example, colon optional. assembler does require label terminator. When label, value current value section program counter (the label points statement with which associated). example, .word directive initialize several words, label would point first word. following example, label Begins value 0a00h. 00001 00002 00003 00004 ---- ---- ---- 0a00 0a01 0a02 ---- *assume other code assembled ---- 0a00 0a00h 000a Begins: .word 0Ah,3,7 0003 0007 When label appears line itself, points instruction next line: 00018 00019 00020 00021 ---- ---- fb00 ---- fb00 ---- Here: 000a ---- 0fb00h .word 0Ah,3,7 When opcode directive references label, label substituted with address label's location memory. only exceptions .set directive, which assigns value label, opcode, which loads nine most significant bits (MSB) address. don't label, first character position must contain blank, semicolon, asterisk. Using Assembler Creating Assembler Source Files Using mnemonic field mnemonic field follows label field. mnemonic field must start column will interpreted label. mnemonic field contain following opcodes: Machine-instruction mnemonic (such ADD, MPY, POP) Assembler directive (such .data, .set, .entry) have label first column, space, colon, must separate mnemonic field (opcode) from label. example: .entry START: lacl 0a00h *,AR0 AR0,#0 #03fh Your code start here Turn interrupts Refer your TMS320C5x User's Guide syntax specifications individual opcodes. Creating Assembler Source Files Using operand field operand field list operands that follow mnemonic field. operand constant (see Section 4.2) symbol (see Section 4.3). must separate operands with commas. assembler allows specify that constant, symbol, expression should used address, immediate value, indirect value. following rules apply operands instructions. prefix operand well-defined immediate value. assembler expects well-defined immediate value, such register symbol constant. This example instruction that uses operands without prefixes: Label: assembler adds contents address contents accumulator. prefix operand register indirect address. sign prefix, assembler treats operand indirect address; that uses operand address. example: Label: *+,AR3 following symbols used indirect addressing, including bitreversed (BR) addressing. indicates that contents used data memory address plus functions indicated. Table 4-1. Indirect Addressing Operand *BRO+ *BRO- Incremented after access Decremented after access contents INDX added after access contents INDX subtracted from after access contents added with reverse carry (rc) propagation after access contents subtracted from with reverse carry (rc) propagation after access Additional Functions more information indirect addressing bit-reversed addressing, refer Memory Addressing Modes TMS320C5x User's Guide. Using Assembler Creating Assembler Source Files Commenting your source file comment begin column extend source line. comment contain ASCII character, including blanks. Comments printed assembly source listing, they affect assembly. comment your source file ways. most common place semicolon anywhere line want comment. text placed after semicolon ignored assembler. example: Your code start here 0a00h .entry START: *,AR0 AR0,#0 lacl #03fh Turn interrupts Another comment your source file asterisk first column your code. Your code start here 0a00h .entry START: *,AR0 AR0,#0 Turn interrupts lacl #03fh asterisk first column, assembler assumes part your code generate error. source statement that contains only comment valid. Constants Constants assembler supports four types constants: Decimal integer constants Hexadecimal integer constants Binary integer constants Character constants assembler maintains each constant internally 32-bit quantity. Constants sign extended. example, constant 0FFh equal 00FF (base (base 10); does equal Decimal integers decimal integer constant string decimal digits, ranging from 295. Examples valid decimal constants are: 1000 -32768 Constant equal 100010 3E816 Constant equal 76810 800016 Constant equal 2510 1916 Hexadecimal integers hexadecimal integer constant string eight hexadecimal digits followed suffix Hexadecimal digits include decimal values letters a-f. hexadecimal constant must begin with decimal value (0-9). These examples valid hexadecimal constants: 37ACh Constant equal 12010 007816 Constant equal 1510 000F16 Constant equal 25210 37AC16 Binary integers binary integer constant string followed suffix Examples valid binary constants include: 0101b 10101b -0101b Constant equal Constant equal Constant equal Character constants character constant single character enclosed double quotes. characters represented 8-bit ASCII characters. Using Assembler Symbols Symbols Symbols used labels, constants, substitution symbols. symbol name string alphanumeric characters (A-Z, a-z, 0-9, symbols cannot contain embedded blanks. first character symbol cannot number special character. symbols define case sensitive; example, assembler recognizes ABC, Abc, three unique symbols. Labels Symbols that used labels become symbolic addresses that associated with locations program. label must unique. register names labels. .the label Begins value a00h. 00001 ---- ---- *assume other code assembled 00002 ---- ---- 00003 ---- 0a00 0a00h 00004 0a00 000a Begins: .word 0Ah,3,7 0a01 0003 0a02 0007 Constants Symbols constant values. using constants, equate meaningful names with constant values. .set directive enables constants symbolic names. Symbolic constants cannot redefined. following example shows these directives used: Example showing valid symbols, labels references 0a00h Initialize .set constant definition .set constant definition .set 01010101b; 055h max_buf .set constant definition max_buf .set constant definition Incorrect lacl loads lacl loads lacl #K*2 loads lacl max_buf loads lacl !BIN loads 0AAh Using Symbols Expressions Using Symbols Expressions Unlike other assemblers, assembler capable analyzing numerical logical expressions. However, removing spaces within field that expression continuous string, entire string specific value (see Example 4-1). Example 4-1. Analyzing Expressions With Using Continuous Strings Expression analysis with COFF assembler .set LACC AR0, #FFT #FFT ;expression analysis Expression analysis with assembler .set FFT-1 .set LACC ;set string FFT-1 AR0, #FFT #FFT-1 ;FFT-1 complete string Example FFT-1 continuous string. .set directive equates value symbol symbol FFT-1; these symbols used place their values. opcodes contain following: AR0, #256 LACC #255 Using Assembler Assembling Your Program Assembling Your Program Before attempt debug your programs, must first assemble them. Here's command invoking assembler when preparing program debugging: dsk5a dsk5a [filename(s)] [-options] command that invokes assembler. more assembly language source files. Filenames case sensitive. affect assembler processes input files. filenames -options Options filenames specified order command line. Table lists assembler options; following subsections describe options. Table 4-2. Summary Assembler Options Option Description Generates output file regardless errors warnings Generates temporary file containing list unresolved opcodes symbols Allows define assembler statements from command line Generating output file option) default, deletes file corrupted with errors. debugging purposes, option tells assembler generate output file despite errors warnings found. Creating temporary object file option) assembler generates intermediate listing file containing unresolved opcodes when (lowercase option. example, want assemble file named test.asm create listing file, enter: dsk5a test above example creates file test.lst from file test.asm. unresolved symbols resolved after assembler read entire assembly file. 4-10 Assembling Your Program Defining assembler statements from command line (asm option) option allows define assembler statements from command line. Since does have linker, using option allows specify constants load addresses. general format command containing this option dsk5a filename asm"statement" [asm"statement" example: dsk5a test.asm asm"FFT .set 256" asm" .entry 0a00h" This statement specifies program entry point load address) 0a00h generates file test.inc, following format: .SET .entry 0a00h statements written include file named file.inc, overwriting previous file. statement also useful controlling parameter values such .set, controlling conditional assembler execution using such directives .if/.else/.endif. dsk5a test.asm asm"fft .set 256" this example, statement assigning value symbol fft. Using Assembler 4-11 4-12 Chapter Assembler Directives Assembler directives supply program data control assembly process. They allow following: Assemble code data into specified sections Reserve space memory uninitialized variables Control appearance listings Initialize memory Assemble conditional blocks Define global variables Topic Page Using Assembler Directives Directives That Define Sections Directives That Reference Other Files Directives That Enable Conditional Assembly Directives That Initialize Memory Miscellaneous Directives 5-10 Directives Reference 5-11 Using Assembler Directives Using Assembler Directives Table summarizes assembler directives. Note that source statements that contain directive have label comment. improve readability, they shown part directive syntax. Table 5-1. Assembler Directives Summary Directives that define sections Mnemonic Syntax .data [address] .entry [address] Description Assemble into data memory Assemble into data memory (initialize data address) Initialize starting address program counter when loading file Assemble into program memory (initialize program address) Assemble into program memory [address] .text Directives that reference other files Mnemonic Syntax .copy ]filename .include ]filename Description Include source statements from another file Include source statements from another file Conditional assembly directives Mnemonic Syntax .else .endif well-defined expression Description Optional conditional assembly conditional assembly Begin conditional assembly Using Assembler Directives Table 5-1. Assembler Directives Summary (Continued) Directives that initialize constants (data memory) Mnemonic Syntax .bfloat value1 [,., valuen Description Initialize 16-bit, 2s-complement exponent 32-bit, 2s-complement mantissa-an unpacked floating-point number Initialize more successive words current section Initialize 64-bit, IEEE double-precision, floatingpoint constant Initialize 16-bit, 2s-complement exponent 16-bit, 2s-complement mantissa-a less accurate unpacked floating-point number Initialize 32-bit, IEEE single-precision, floatingpoint constant Initialize more 16-bit integers Initialize more 32-bit integers Initialize 32-bit, signed 2s-complement integer whose decimal point displaced places from Initialize 16-bit, signed 2s-complement integer whose decimal point displaced places from Reserve size bits current section; note that label points beginning reserved space Initialize more text strings Initialize 32-bit, 2s-complement exponent 64-bit, 2s-complement mantissa; note that initialized integers unpacked form Initialize more 16-bit integers .byte value1 [,., valuen .double value1 [,., valuen .efloat value1 [,., valuen .float value1 [,., valuen .int value1 [,., valuen .long value1 [,., valuen .lqxx value1 [,., valuen .qxx value1 [,., valuen .space size bits .string "string1 [,., "stringn .tfloat value1 [,., valuen .word value1 [,., valuen Miscellaneous directives Mnemonic Syntax .end .listoff .liston .set .mmregs Description Program source listing (overrides assembler option) Restart source listing (overrides assembler option) Equate value with local symbol Enter memory-map registers into symbol table Assembler Directives Directives That Define Sections Directives That Define Sections Five directives associate various portions assembly language program with appropriate sections: .data directive identifies portions code placed data memory. Data memory usually contains initialized data. directive functions like .data; however, with specify optional address initialize data address. .entry directive identifies starting address program counter. current address used default, specify optional address. directive identifies portions code placed program memory. With specify additional address initialize program address. .text directive identifies portions code .text section. .text section usually contains executable code. Example shows sections directives associate code data with proper sections. This output listing; column shows line numbers, column shows section program counter (SPC) values. (Each section section program counter, SPC. When code first placed section, equals When resume assembling into section, resumes counting there been intervening code. After code Example assembled, sections contain: .text .data Initialized bytes with values Initialized bytes with values Directives That Define Sections Example 5-1. Sections Directives 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 >>>>> >>>>> ---- ---- ---- ---- Initialize section addresses ---- ---- ---- 0a00 0a00h ---- 0e00 0e00h ---- ---- ---- ---- Start assembling into .text ---- ---- ---- ---- .text 0a00 0001 .byte 0a01 0002 0a02 0003 .byte 0a03 0004 ---- ---- ---- ---- Start assembling into .data ---- ---- ---- ---- .data 0e00 0009 .byte 9,10 0e01 000a 0e02 000b .byte 11,12 0e03 000c ---- ---- ---- ---- Resume assembling into .text ---- ---- ---- ---- .text 0a04 0005 .byte 0a05 0006 FINISHED READING FILES ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 Note: directives assemble your code same memory locations. This won't cause assembly error; however, possible overwrite previously defined memory blocks. Assembler Directives Directives That Reference Other Files Directives That Reference Other Files .copy .include directives tell assembler read source statements from another file. This syntax these directives: .copy "filename" .include "filename" .copy .include directives tell assembler begin reading source statements from another file. When assembler finishes reading source statements copy/include file, resumes reading source statements from current file. statements read from copied included files printed listing file. filename names copy/include file that assembler reads statements from. filename complete pathname, partial pathname, filename with path information. assembler searches file directory that contains current source file. current source file file being assembled when .copy .include directive encountered. Directives that Enable Conditional Assembly Directives that Enable Conditional Assembly .if/.else/.endif directives tell assembler conditionally assemble block code according evaluation expression. Note that cannot nest statements. expression directive marks beginning conditional block assembles code condition true (not zero). .else directive marks block code assembled false. .endif directive marks conditional block terminates block. expression parameter either numeric value previously defined symbol. Assembler Directives Directives That Initialize Memory Directives That Initialize Memory Each these directives, with exception .byte .string directives, aligns object 16-bit word boundary. .byte directive places more 8-bit values into consecutive words current section. .word directive places more 16-bit values into consecutive words current section. .string directive places 8-bit characters from more character strings into current section. .long directive places more 32-bit values into consecutive 32-bit fields current section. .int directive places more 16-bit values into consecutive words current section. .qxx directive places more 16-bit, signed 2s-complement values into consecutive words current section. Note that decimal point displaced places from LSB. .lqxx directive places more 32-bit, signed 2s-complement values into consecutive 32-bit fields current section. Note that decimal point displaced places from LSB. .float directive calculates 32-bit IEEE floating-point representations single precision floating-point value stores consecutive words current section. .bfloat directive calculates 16-bit, signed 2s-complement exponent 32-bit, signed 2s-complement mantissa. .efloat directive calculates 16-bit, signed 2s-complement exponent 16-bit, signed 2s-complement mantissa. .tfloat directive calculates 32-bit, signed 2s-complement exponent 64-bit, signed 2s-complement mantissa. .double directive calculates 64-bit IEEE floating-point representation double precision floating-point value stores four consecutive words current section. Directives That Initialize Memory .space directive reserves specified number bits current section. assembler advances skips reserved words. When label with .space, points first word reserved block. Figure shows example .space directives. Assume following code been assembled this example: .word .space .word 0a00h 100h, 200h RES_1: ;Reserve bits words Res_1 points first byte space reserved .space. Figure 5-1. .space Directive words reserved Res_1 0a02h Assembler Directives Miscellaneous Directives Miscellaneous Directives This section discusses miscellaneous directives. .end directive terminates assembly. should last source statement program. This directive same effect end-of-file character. .listoff directive overrides option prohibits source listing. .liston directive begins source listing. .mmregs directive defines symbolic names memory-mapped register. Using .mmregs same executing .set memorymapped registers-for example, greg .set 4-and makes unnecessary define these symbols. Table 5-2, page 5-25, list memorymapped registers. .set directive equates meaningful symbol names constant values strings. symbol stored symbol table cannot redefined; example: bval .set .byte 0100h bval bval 5-10 Directives Reference Directives Reference remainder this chapter reference. Generally, directives organized alphabetically, directive page; however, related directives (such .if/.else/.endif) presented same page. Here's alphabetical table contents directive reference: Directive .bfloat .byte .copy .data .double .efloat .else .end .endif .entry .float .include .int .listoff .liston .long .lqxx .mmregs .qxx .set .space .string .text .tfloat .word Page 5-18 5-12 5-13 5-15 5-18 5-15 5-18 5-20 5-16 5-20 5-17 5-18 5-20 5-13 5-33 5-21 5-21 5-23 5-24 5-25 5-31 5-24 5-28 5-29 5-12 5-31 5-18 5-33 Assembler Directives 5-11 .byte/.string Syntax Directives Reference .byte value1 valuen .string string1 stringn Description .byte .string directives place more 8-bit values into consecutive bytes current section. value string either: expression that assembler evaluates treats 8-bit signed number, character string enclosed double quotes. Each character string represents separate value. .byte directive places more 8-bit values into consecutive words current section. Unlike .byte directive, .string directive places 8-bit values into memory packed form order they encountered. word filled, remaining bits filled with zeros. Example This example shows several 8-bit values placed into consecutive bytes memory. label strx value a00h, which location first initialized byte. label stry value a07h, which location first byte initialized .string directive. 00001 ---- 0a00 0a00h 00002 0a00 000a strx: .byte 10,-1,2,0Ah,"abc" 0a01 00ff 0a02 0002 0a03 000a 0a04 0061 0a05 0062 0a06 0063 00003 0a07 0aff stry: .string 10,-1,2,0Ah,"abc" 0a08 020a 0a09 6162 0a0a 6300 >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 above example, converted into three ASCII characters. 5-12 Directives Reference .copy/.include Syntax .copy "filename" "filename" .include Description .copy .include directives tell assembler read source statements from different file. assembler: Stops assembling statements current source file Assembles statements copied/included file Resumes assembling statements main source file, starting with statement that follows .copy .include directive filename required parameter that names source file; filename must enclosed double quotes must follow operating system conventions. specify full pathname (for example, c:\dsktools\file1.asm). specify full pathname, assembler searches file current directory. statements that assembled from included file printed assembly listing, depending .liston/.listoff directives option. .copy .include directives nested within file being copied included. assembler limits this type nesting eight levels; host operating system additional restrictions. Example This example shows .include directive used tell assembler read assemble source statements from other files, then resume assembling into current file. Source file: (source.asm) .space .include .space "byte.asm" ;filename: ;filename: ;filename: ;filename: ;filename: source.asm source.asm source.asm source.asm source.asm First copy file: (byte.asm) .byte .include .byte 'a', 0ah, "word.asm" 11,12,13 ;filename: ;filename: ;filename: ;filename: ;filename: byte.asm byte.asm byte.asm byte.asm byte.asm Second copy file: (word.asm) .word 0abcdh, ;filename: word.asm ;filename: word.asm ;filename: word.asm Assembler Directives 5-13 .copy/.include Directives Reference Listing file: 00001 ---- 0e00 0e00h ;filename:source.asm 00002 ---- ---- ;filename:source.asm 00003 0e00 0010 .space ;filename:source.asm 00004 ---- ---- .include "byte.asm" ;filename:source.asm OPENING INCLUDE FILE byte.asm 00001 ---- ---- ;filename:byte.asm 00002 0e01 0061 .byte "a",0ah,32 ;filename:byte.asm 0e02 000a 0e03 0020 00003 ---- ---- .include "word.asm" ;filename:byte.asm OPENING INCLUDE FILE word.asm 00001 ---- ---- ;filename:word.asm 00002 0e04 abcd .word 0abcdh,56 ;filename:word.asm 0e05 0038 00003 ---- ---- ;filename:word.asm >>>>> FINISHED READING FILES CLOSING FILE word.asm 00004 0e06 000b .byte 11,12,13 ;filename:byte.asm 0e07 000c 0e08 000d CLOSING FILE byte.asm 00005 ---- ---- ;filename:source.asm 00006 0e09 0020 .space ;filename:source.asm >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 5-14 Directives Reference .data/.ds Syntax .data [address] Description .data directives tell assembler begin assembling source code into data memory. .data sections normally used contain tables data preinitialized variables. address optional parameter that specifies 16-bit address. Normally, section program counter first time .data section assembled; this parameter assign initial value SPC. Note that assembler assumes that .text default section. Therefore, beginning assembly, assembler assembles code into .text section unless specify section control directive. Example This example shows assembly code into .data .text sections. .entry .include .text setup: .data .int .text .data .float 0a00h "VECT.ASM" 0400h *,AR0 AR0,#0 AR1,#0 AR2,#0 AR3,#0 ;initialize registers ;set load addresses val_1 loop: 0,1,2,3,4,5,6,7 ;init. integer values ;continue with some code *+,AR1 *+,AR2 *+,AR3 loop,*+,AR0 val_2 0,1,2,3,4,5,6,7 ;init. flt-pt values Assembler Directives 5-15 .end Directives Reference Syntax .end Description .end directive optional directive that terminates assembly. should last source statement program. assembler ignores source statements that follow .end directive. This example shows .end directive terminates assembly. Source file: .entry .end 0a00h Example START START Listing file: 00001 00002 >>>>> 00003 00004 00005 00006 00007 >>>>> >>>>> >>>>> ---- 0a00 ---- 0000 .entry ENTRY POINT 0a00 0a00 8b00 START 0a01 8b00 0a02 8b00 0a03 7980 0a04 0a00 ---- ---- .end LINE:7 .END ENCOUNTERED FINISHED READING FILES ASSEMBLY COMPLETE: ERRORS:0 0a00h START WARNINGS:0 5-16 Directives Reference .entry Syntax .entry [value] Description .entry directive tells assembler address program counter when file loaded. value parameter, current program memory address, determined .text section, becomes starting address. have more than .entry directive your file, then last .entry directive encountered becomes starting address your code. Here example .entry directive. LOOP: .entry 0a00h *+,AR1 LOOP,*+,AR0 *,AR0 AR0,#0 AR1,#0 LOOP infinite loop ;Start program Example ;call routine Assembler Directives 5-17 Syntax .float .bfloat .double .efloat .tfloat Description Directives Reference value [,., valuen value [,., valuen value [,., valuen value [,., valuen value [,., valuen .float directive places floating-point representation single floating-point constant into words current section. value must floating-point constant. Each constant converted floating-point value 32-bit IEEE floating-point format. IEEE floating-point format consists three fields: 1-bit sign field 8-bit biased exponent (exponent) 23-bit normalized mantissa (mantissa) exponent mantissa mantissa .bfloat directive format slightly different that 16-bit exponent both high mantissa: exponent .bfloat .efloat mantissa (high) mantissa (low) Example Here example floating-point directives. Source file: .bfloat .bfloat .efloat .end 0400h 1.5,3,6 -1.5,3,6 1.5,3,6 5-18 Directives Reference Listing file: 00001 ---- 0400 0400h 00002 0400 0000 .bfloat 1,5,3,6 0401 6000 0402 0000 0403 0000 0404 6000 0405 0001 0406 0000 0407 6000 0408 0002 00003 0409 0000 .bfloat -1,5,3,6 040a a000 040b 0000 040c 0000 040d 6000 040e 0001 040f 0000 0410 6000 0411 0002 00004 0412 6000 .efloat 1,5,3,6 0413 0000 0414 6000 0415 0001 0416 6000 0417 0002 00005 ---- ---- .end >>>>> LINE:5 .END ENCOUNTERED >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 Assembler Directives 5-19 .if/.else/.endif Syntax Directives Reference well-defined expression .else .endif Description Three directives provide conditional assembly: directive marks beginning conditional block. well-defined expression required parameter. Example expression evaluates true (nonzero), assembler assembles code that follows .else .endif). expression evaluates false (0), assembler assembles code that follows .else present) .endif. .else directive identifies block code that assembler assembles when expression false (0). This directive optional conditional block; expression false there .else statement, assembler continues with code that follows .endif. .endif directive terminates conditional block. Nested .if/.else/.endif directives valid. Here some examples conditional assembly: B0_Dat B1_Dat If_1: .set .set .set .set .endif .endif B0_Dat 0100h B1_Dat 0300h If_2: Note: this instance, option particularly useful turning conditional statement from command line. example, could enter: dsk5a test asm"B0_Dat .set 5-20 Directives Reference .liston/.listoff Syntax .liston .listoff Description .liston .listoff directives useful debugging. They override assembler option, which turns output listing. source listing always written file with extension .lst. Here's example source file output listing file. Source file: .liston/off example 0400h .listoff DATA .word 1,2,3,4,5 want this listed! .liston ;Note this line isn't listed 0a00h lacl #PROG AR0,#DATA ;move words from tblw loop loop .word 0,0,0,0 Example Assembler Directives 5-21 .liston/.listoff Directives Reference Listing file: 00001 00002 00003 00004 00005 00008 00009 00010 00011 00012 00013 00014 00015 ---- ---- ---- ---- .liston/off example ---- ---- ---- 0400 0400h ---- ---- .listoff ---- 0a00 0a00h 0a00 bf80 lacc #PROG 0a01 0a09 0a02 bf08 AR0,#DATA 0a03 0400 0a04 bb03 0a05 a7a0 tblw 0a06 8b00 loop 0a07 7980 loop 0a08 0000 0a09 0000 PROG .word 0,0,0,0 0a0a 0000 0a0b 0000 0a0c 0000 FINISHED READING FILES ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 >>>>> >>>>> 5-22 Directives Reference .long Syntax .long value1 valuen Description .long directive places more 32-bit values into consecutive words current section. value either: expression that assembler evaluates treats 32-bit signed number, character string enclosed double quotes. Each character string represents separate value. label, points location which assembler places first byte. Example This example shows several 32-bit values placed into consecutive bytes memory. label strx value 0FB00h, which location first initialized byte. 00001 ---- fb00 0fb00h 00002 fb00 2710 strx: .long 10000,"String","A" fb01 0000 fb02 0053 fb03 0000 fb04 0074 fb05 0000 fb06 0072 fb07 0000 fb08 0069 fb09 0000 fb0a 006a fb0b 0000 fb0c 0067 fb0d 0000 fb0e 0041 fb0f 0000 >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 Assembler Directives 5-23 .lqxx/.qxx Syntax Directives Reference .lqxx value1 valuen .qxx value1 valuen Description .qxx .lqxx directives generate signed, 2s-complement fractional integers long integers whose decimal points displaced places from LSB. Here's example .qxx directive. ---- 0400 0x400 0400 2000 .Q15 0.25 0401 4000 .Q15 0402 6000 .Q15 0.75 0403 e000 .Q15 -0.25,-0.5,-0.75 0404 c000 0405 a000 00006 0406 0000 .LQ24 9,10 0407 0900 0408 0000 0409 0a00 >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 00001 00002 00003 00004 00005 Example 5-24 Directives Reference .mmregs Syntax Description .mmregs .mmregs directive defines global symbolic names TMS320 registers places them global symbol table. equivalent executing greg .set .set etc. symbols local absolute. Using .mmregs directive makes unnecessary define these symbols. symbols placed shown Table 5-2. Table 5-2. Memory-Mapped Registers Address Name GREG PMST RPTC BRCR PASR PAER TREG0 TREG1 TREG2 DBMR Description Reserved Interrupt mask register Global memory allocation register Interrupt flag register Processor mode status register Repeat counter register Block repeat counter register Block repeat program address start register Block repeat program address register Temporary register used multiplicand Temporary register used dynamic shift count Temporary register used pointer dynamic test Dynamic manipulation register Auxiliary register Auxiliary register Auxiliary register Auxiliary register Auxiliary register Auxiliary register Assembler Directives 5-25 .mmregs Directives Reference Table 5-2. Memory-Mapped Registers (Continued) Address Name INDX ARCR CBSR1 CBER1 CBSR2 CBER2 CBCR BMAR PDWSR IOWSR CWSR 43-47 TRCV TDXR TSPC 2B-2F Description Auxiliary register Auxiliary register Index register Auxiliary register compare register Circular buffer start register Circular buffer register Circular buffer start register Circular buffer register Circular buffer control register Block move address register Data receive register Data transmit register Serial port control register Reserved Timer register Period register Timer control register Reserved Program wait-state register wait-state register wait-state control register Reserved data receive register data transmit register serial port control register 5-26 Directives Reference .mmregs Table 5-2. Memory-Mapped Registers (Continued) Address Name TCSR TRTA TRAD 54-79 36-4F Description channel select register Receive/transmit address register Received address register Reserved Assembler Directives 5-27 .set Directives Reference Syntax symbol .set value Description .set directive equates constant value symbol. symbol then used place value assembly source. This allows equate meaningful names with constants other values. Example symbol must appear label field. value must well-defined expression; that symbols expression must previously defined current source module. This example shows symbols assigned with .set. zero zero+1 .set .set LACL zero #zero+1 ;zero symbol ;zero replaced ;symbol Result LACL 5-28 Directives Reference .space Syntax .space size bits Description .space directive reserves size number bits current section. incremented point word following reserved space. When label with .space directive, points first word reserved. Example This example shows .space directive reserves memory. Source file: Begin assembling into .text .text Reserve words .text .space 0f0h .word 100h, 200h Begin assembling into .data .data .string ".data" Reserve words .data; Res_1 points first reserved word .space 020h .word Assembler Directives 5-29 .space Directives Reference Listing file: 00001 ---- ---- 00002 ---- ---- Begin assembling into .text 00003 ---- ---- 00004 ---- 0000 .text 00005 ---- ---- 00006 ---- ---- Reserve words .text 00007 ---- ---- 00008 0a00 00f0 .space 0f0h 00009 0a0f 0100 .word 100h,200h 0a10 0200 00010 ---- ---- 00011 ---- ---- 00012 ---- ---- Begin assembling into .data 00013 ---- ---- 00014 ---- 0000 .data 00015 0e00 2e64 .string ".data" 0e01 6174 0e02 6100 00016 ---- ---- 00017 ---- ---- 00018 ---- ---- 00019 ---- ---- 00020 ---- ---- Reserve words .data 00021 ---- ---- Res_1 points reserved word 0022 ---- ---- 00023 0e03 0020 Res_1 .space 020h 00024 0e05 000f .word 00025 0e06 0e03 .word Res_1 00026 ---- ---- 00027 ---- ---- >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 5-30 Directives Reference .text Syntax .text [address] Description .text directives tell assembler begin assembling into .text sections (program memory), which usually contain executable code. section program counter a00h nothing been assembled into .text sections. code already been assembled into respective sections, section program counter restored previous value section. address optional parameter directive that specifies 16-bit address. This address sets initial value SPC. address specified, default value a00h used. Note that assembler assumes that .text default section. Therefore, beginning assembly, assembler assembles code into .text section unless specify other sections directives (.data, .ps, .ds, .entry). Assembler Directives 5-31 .text Directives Reference Example This example shows code assembled into .text .data sections. .data section contains integer constants, .text section contains character strings. 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 >>>>> >>>>> ---- ---- ---- ---- Begin assembling into .data ---- ---- ---- fb00 0fb00h fb00 0005 .byte fb01 0006 ---- ---- ---- ---- Begin assembling into ---- ---- ---- 7000 7000h 7000 0001 .byte 7001 0002 .byte 7002 0003 ---- ---- ---- ---- Begin assembling into .data ---- ---- ---- ---- .data fb02 0007 .byte fb03 0008 ---- ---- ---- ---- Begin assembling into ---- ---- ---- ---- 7003 0004 .byte FINISHED READING FILES ASSEMBLY COMPLETE: ERRORS:0 WARNINGS:0 5-32 Directives Reference .word .int Syntax .word value1 valuen .int value1 valuen Description .int .word directives place more 16-bit values into consecutive words current section. value must absolute. many values single line characters). label, must point first initialized word. Example This example shows .word directive initialize words. symbol WordX points first reserved word. 00001 ---- fe00 00002 fe00 0c80 fe01 00ff fe02 0003 00003 ---- ---- 00004 ---- ---- WordX: .word 0fe00h 3200,0ffh,3 Example Here's example .int directive. 00005 ---- ff00 00006 ff00 0000 LAB1 .int ff01 ffff ff02 0002 ff03 abcd >>>>> FINISHED READING FILES >>>>> ASSEMBLY COMPLETE: ERRORS:0 0ff00h 0,-1,2,0ABCDh WARNINGS:0 Assembler Directives 5-33 5-34 Chapter Using Debugger This chapter tells invoke debugger pulldown menus. Topic Page Invoking Debugger Using Pulldown Menus Debugger Using Dialog Boxes 6-13 Using Software Breakpoints 6-16 Quick Reference Guide 6-18 Using Debugger Invoking Debugger Invoking Debugger Here's basic format command that invokes debugger: dsk5d [options] dsk5d command that invokes debugger. supply debugger with additional information. options Table lists debugger options; following subsections describe options. Table 6-1. Summary Debugger Options Option brate com# eaddress [0,1] Description Displays listing available options Selects valid baud rate Selects serial communication port Defines program entry point Selects logic level (data terminal ready) reset; note that default inverse Selects EGA/VGA screen sizes Sets configuration (default Selects default screen length Displaying list available options option) display contents Table your screen using option. example, enter: dsk5d Selecting baud option) valid baud settings are: b4800 b9600 b19200 b38400 b57600 Invoking Debugger Identifying serial port (com# option) option identifies serial port that debugger uses communicating with your default setting, used when your serial port connected serial communication port (com1). Depending your serial port connection, replace serial port with these values: using com1, enter: dsk5d using com2, enter: dsk5d using com3, enter: dsk5d using com4, enter: dsk5d Defining entry point option) option initial program entry address. address select must four-digit hexadecimal value. example: dsk5d ea00h above example sets debugger initial address 0a00h. Selecting data terminal ready (DTR) logic level option) Using option tells dsk5d invert reset signal. Usually, RS-232 line high pulses reset signal. However, option (inverse), line pulses high reset signal. Selecting screen size options) default, debugger uses 80-character-by-25-line screen. options Table switch between screen sizes. Table 6-2. Screen Size Options Option Description characters lines characters lines (default) Using Debugger Invoking Debugger Setting configuration mode memory option) option configure memory sections same SETC/ CLRC instruction works. Refer your TMS320C5x User's Guide more information SETC instruction. Using Pulldown Menus Debugger Using Pulldown Menus Debugger Figure shows main menu debugger. Figure 6-1. Main Menu Display Fill Load Help eXec Quit Modify Break Init Watch Reset Save Copy Many debugger's pulldown menus have additional submenus. submenu indicated main menu selection enclosed characters. example, here's Display submenu Format, which submenu Display: display submenu format submenu <display> Data Program Version Status Breakpoints Format Memory <format> Unsgnd Char Pckdstrng Long Double B-E-T float Because debugger supports over commands, it's practical discuss commands associated with submenu choices. Here's help with commands: highlighted letters show press corresponding debugger command. example, highlighted letters Display Format Char show that press that order, display submenus. Escaping from pulldown menus submenus display submenu then decide that don't want make selection press return main menu bar. Using Display submenu Table lists submenu selections Display submenu. highlighted letters show keys that select choices. Using Debugger Using Pulldown Menus Debugger Table 6-3. Submenu Selections Displaying Information display this Data memory Program memory Current version debugger Register status List breakpoints Format Unsigned integer Integer Character String Long Floating-point number Double Signed Octal Hexadecimal floating-point number (exponent mantissa 32/Q30) Short floating-point number (exponent mantissa 16/Q14) Long floating-point number (exponent mantissa 64/Q62) Memory address (exponent 16;mantissa 32/Q30) Double Short floating-point number Long floating-point number Floating-point number Integer Long Octal Unsigned integer Hexidecimal Select Display Data Program Version Status Breakpoints Format Unsgnd Char pckdStrng Long Double B-E-T float B-E-T float B-E-T float Memory Address B-E-T float Double B-E-T float B-E-T float Float Long Unsgnd Using Pulldown Menus Debugger Using Fill submenu Table lists selections filling memory. highlighted letters show keys select choices. Table 6-4. Submenu Selections Filling Memory fill this Data memory Program memory Select Fill Data Program Using Load submenu Table lists selections Load submenu. highlighted letters show keys select choices. Table 6-5. Submenu Selections Loading Information into Memory load this COFF file file List breakpoints Format Unsigned integer Integer Character String Long Floating-point number Double Signed Octal Hexadecimal floating-point number (exponent mantissa 32/Q30) Short floating-point number (exponent =16; mantissa 16/Q14) Long floating-point number (exponent mantissa 64/Q62) Program counter Select Load COFF Breakpoints Format Unsgnd Char pckdStrng Long Double B-E-T float B-E-T float B-E-T float Programcounter Using Debugger Using Pulldown Menus Debugger Using Help submenu press bring Help Window Display shown Figure 6-2. Choose from menu selections listed below find additional information. Figure 6-2. Monitor Information Screen Help Window Display Usage Options: -------- Bxxxxx COMx Exxxx program: dskd [[-|\][options] Please note that options case significant this display xxxxx selects baudrates! Work today: comport: [default] x=2, optional 'C1,' 'C2,' 'C3' 'C4' used defines with following digits entry point format e|E[0z]xxxx[h] selects logic level DIR->Reset (default-> inverse) selects EGA/VGA scree length selects default screen length (25) Function definitions ======================== Help Information PGUP PGDN HOME newPage File Quit 01/17 move through Help Window Display, following submenu selections: PGUP move ahead page PGDN move back page HOME return first page help menu last page help menu newPage specific page number help menu File print file help.txt Quit exit help menu return debugger exit help menu return debugger Using Pulldown Menus Debugger Using eXec submenu Table lists selections executing code. highlighted letters show keys that select choices. Table 6-6. Submenu Selections Executing Code execute code from beginning your program particular address line code next line number next beginning certain function beginning your program with break point disabled (free run) Select eXec Address Singlestep/ret/blank Num_steps Function Using Quit submenu exit debugger return operating system, enter this command: program running submenu displayed, press before quit debugger halt program execution return main menu. Using Modify submenu Table lists selections modifying your code. highlighted letters show keys select choices. Table 6-7. Submenu Selections Modifying Code modify register Your program Data port Select Modify Register Program Data In/out ports Using Debugger Using Pulldown Menus Debugger Using Break submenu Table lists selections setting software breakpoints your program. highlighted letters show keys select choices. Table 6-8. Submenu Selections Handling Breakpoints perform following breakpoint specific address breakpoint unknown address Clear breakpoint Find breakpoints Select Break Refer Section 6.4, Using Software Breakpoints more information. Using Init submenu Using Init submenu initializes registers entry point your program. Using Watch submenu Table lists selections watching your code during program execution. highlighted letters show keys select choices. Table 6-9. Submenu Selections Watching Data change your watch settings variable/value watch Delete variable/value watch Format variables/values watching Modify variables/values watching Select Watch Delete Format Modify Using Reset submenu reset board, enter this command: submenu displayed, press reset board. 6-10 return main menu before Using Pulldown Menus Debugger Using Save submenu Table 6-10 lists menu selections saving code during debugging session. highlighted letters show keys select choices. Table 6-10. Submenu Selections Saving Code save register value Data Your program certain format Select Save Register Data Program Format Using Copy submenu Table 6-11 lists menu selections copying information. highlighted letters show keys select choices. Table 6-11. Submenu Selections Copying Information copy from Data data program another program Data your program Your program data Select Copy Data data Program program dAta program pRogram data Using Op-sys submenu debugger provides simple method entering commands without explicitly exiting debugger environment. this, Op-sys submenu. Op-sys displayed main menu bar, entering this command: submenu displayed, press return main menu before attempting enter operating system (op-sys). debugger opens system shell displays prompt. this point, enter command. Using Debugger 6-11 Using Pulldown Menus Debugger When finished entering commands ready return debugger environment, enter: exit Note: Available memory limit Op-sys commands that enter from system shell. example, cannot invoke another version debugger. 6-12 Using Dialog Boxes Using Dialog Boxes Some debugger commands have parameters. When execute these commands from pulldown submenus, must have some providing parameter information. debugger allows this displaying dialog that asks this information. Entering text dialog much like entering commands operating system. example, when select Program from Fill submenu, debugger displays dialog that asks parameter information. dialog looks like this: Fill Program Memory Fill Program Memory Start Address: enter start address, simply type press appears dialog box: next parameter Fill Program Memory Fill Program Memory Start Address: 0500h Length: Using Debugger 6-13 Using Dialog Boxes omit entries optional parameters pressing debugger won't allow skip required parameters. When have entered appropriate parameter values, Fill Program Memory finished appears bottom dialog box. case Modify menu when select Data from submenu, empty dialog appears screen: Modify Data Memory 320c50 Startadd Press debugger display first parameter: Modify Data Memory 320c50 Startadd 1000 Address: 1000 efff new: Enter address want modify press dialog box. next parameter appears Modify Data Memory 320c50 Startadd Address: Address: Address: Address: 1003 0002 1001 1000 1000 ffff 0003 0002 0001 6-14 Using Dialog Boxes Closing dialog When you've entered value final parameter, there three ways exit from dialog box: Press Press Press Performing last these options prompt causes debugger close dialog execute command with parameter values supplied. Using Debugger 6-15 Using Software Breakpoints Using Software Breakpoints This section describes processes setting clearing software breakpoints obtaining listing breakpoints that set. During debugging process, want halt execution temporarily that examine contents selected variables, registers, memory locations before continuing with program execution. this setting software breakpoints assembly language code. software breakpoint halts program execution, whether you're running single-stepping through code. Setting software breakpoint When software breakpoint, debugger highlights breakpointed line bolder brighter font. highlighted statement appears reverse assembly window. After execution halted breakpoint, continue program execution reissuing single-step commands. software breakpoint entering either command. know address where you'd like software breakpoint, This command useful because doesn't require search through code find desired line. When enter debugger asks enter absolute address. Once have entered address, asked choose line number where want breakpoint set. Figure shows breakpoint address ffd4 line number Note that cannot more than breakpoint same statement. Figure 6-3. Setting Software Breakpoint Breakpoints 00000h 00000h 00000h 00000h 0ffd4h 00000h 00000h 00000h Instr Instr Instr Instr Instr Instr Instr Instr 00000h 00000h 00000h 00000h 00000h 00000h 00000h 00000h Enabled Disabled Disabled Disabled Enabled Disabled Disabled Disabled don't know specific address, enter (breakpoint enable/ disable) command. debugger displays list addresses shown Figure 6-3, asks what line number want breakpoint 6-16 Using Software Breakpoints Clearing software breakpoint you'd like clear breakpoint, command. When enter Breakpoints appears screen (see Figure 6-3). debugger then asks which line number contains breakpoint want delete. When enter line number, breakpoint disabled. Finding software breakpoints that Sometimes need know where software breakpoints set. command provides easy complete listing software breakpoints that currently your program. command displays Breakpoints shown Figure 6-3. Using Debugger 6-17 Quick-Reference Guide Quick-Reference Guide Table 6-12, Table 6-13, Table 6-14 provide quick-reference guide debugger function definitions, floating-point formats, register definitions. Table 6-12. Debugger Function Definitions Function Description Displays help information Prints contents screen file named screen.srn Displays directory used Executes your program next breakpoint used used Single-steps your program used Single-steps your program steps past calls SPACE SPACE Displays reverse assembly window Turns trace (this acts toggle switch) Table 6-13. Debugger Floating-Point Formats Floating-Point Format .float .double .bfloat .tfloat .efloat Description 32-bit IEEE standardized floating-point format 64-bit IEEE standardized double floating-point format 16-bit exponent 32-bit mantissa (exponent complement mantissa Q30) 32-bit exponent 64-bit mantissa (exponent complement mantissa Q62) 16-bit exponent 16-bit mantissa (exponent complement mantissa Q14) 6-18 Quick-Reference Guide Table 6-14. Debugger Register Definitions Register ACCU ACCB PREG TRG0 TRG1 TRG2 PMST STCKi GREG (ST0) (ST0) (ST0) IN(ST0) (ST0) (ST1) (ST1) (ST1) (ST1) (ST1) (ST1) Definition Accumulator Accumulator buffer Product register Temporary multiplicand Temporary register Temporary register Auxiliary register Status register Status register Status register Serial port control register Stack register Data receive register address Data transmit register address Timer register address Period register address Interrupt mask register address Global register address Auxiliary register pointer Overflow flag Overflow mode Data page pointer Auxiliary register pointer buffer DARAM program/data configuration Test/control flag Sign-extension mode enable Carry Hold mode selection Description bits with carry bits temporarily store ACCU bits used multiplication bits multiplication special instructions bits dynamic shift bits pointer test bits with used counter pointer bits bits bits bits bits with used hardware stacking bits serial port bits serial port bits bits bits masking interrupts bits define data memory global bits bits bits Interrupt mode (enable global interrupt) debugger uses stack level itself. Using Debugger 6-19 Quick-Reference Guide Table 6-14. Debugger Register Definitions (Continued) Register (ST1) IPTR (PMST) OVLY (PMST) (PMST) Definition PREG ACCU shift mode Interrupt vector pointer Data SARAM enable Program SARAM enable Description bits bits MP/MC (PMST) Micro processor/computer mode (SPC) (SPC) (SPC) (SPC) mode CLKX clock mode (internal/external) Frame synch mode (burst/continuous) Format (8/16 mode) 6-20 Running Title-Attribute Reference Appendix Appendix Starter (DSK) Circuit Board Dimensions Schematic Diagrams This appendix contains circuit board dimensions schematic diagrams TMS320C5x DSK. Chapter Title-Attribute Reference Circuit Board Dimensions Figure A-1. TMS320C5x Circuit Board Dimensions 4.100 0.0500 2.350 2.200 TLC32040CFN 1.655 1.592 2.500 1.100 0.605 0.100 Datum -0.150 -0.150 Datum 3.656 3.800 3.950 0.608 Note: Dimensions inches. DDDDDDDDDDDDDDDD D[0.15] 4.7K 4.7K 4.7K 4.7K 4.7K VVVVVVVVVVVVVVVV DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD STRB READY HOLDA HOLD TRST EMU0 EMU1/OFF A[0.15] INT1\ INT2\ INT3\ INT4\ NMI\ IACK\ MP/MC\ BIO\ TOUT CLKR CLKX TCLKR TCLKX TFSR TFSX INT1 INT2 INT3 INT4 IACK MP/MC- TOUT CLKR CLKX TCLKR TCLKX TFSR/TADD TFSX/TFRM X2/CLKIN CLKIN2 CLKMD1 CLKMD2 CLKOUT1 STRB\ READY HOLDA\ HOLD\ IAQ\ TRST\ EMU0 EMU1 Starter (DSK) Circuit Board Dimensions Schematic Diagrams TMS320C50_QFP CLKIN2 CLKMD1 CLKMD2 CLKOUT 4.7K 4.7K 4.7K VVVVVVVVVVVVVVVV Schematic Diagram TEXAS INSTRUMENTS 40MHz Title Size Date: January 1994 TMS320C5x STARTERS Document Number 2617687 Sheet 4.7K 75189 CONNECTOR 75189 75188 INT2\ BIO\ 75189 AIN+ AUXIN+ AUXIN- OUT+ OUT- VCC- AUXIN+ AUXIN- OUT+ OUT- VCC+ VCC- AGND AGND RESET EODR EODX MCLK SCLK BYTE DGND EODR\ EODX\ TOUT CLKX CLKR TLC32040_PLCC TEXAS INSTRUMENTS Title Size Date: January 1994 TMS320C5x STARTERS Document Number 2617687 Sheet Schematic Diagram D[0.15] A[0.15] D[0.15] 27PC256FM A[0.15] READY BIO\ 4.7K 4.7k Starter (DSK) Circuit Board Dimensions Schematic Diagrams HOLD\ MP/MC\ HEADER 12X2 INT1\ INT3\ NMI\ INT2\ INT4\ 4.7K 4.7K EMU0 TRST\ (KEY) HEADER 12X2 Schematic Diagram TEXAS INSTRUMENTS EMU1 Title TMS320C5x STARTERS Size Date: January 1994 Document Number 2617687 Sheet XDS510 HEADER EODR\ OUT- AUXIN- EODX\ OUT+ AUXIN+ AIN+ CLKR CLKX IACK\ CLKOUT CLKMD1 STRB\ TOUT IAQ\ HOLDA\ CLKIN2 CLKMD2 VCC- TCLKR TCLKX TFSR TFSX HEADER 12X2 HEADER 12X2 HEADER DJ005A 1N4002 1000uF .1UF LM7805 1000uF 1N4002 .1UF 4.7uF .1UF VCC- VCC- 1N5817 LM7905 4.7uF .1UF .1UF .1UF .1UF .1UF .1UF .1UF .1UF Title Size Date: January 1994 TMS320C5x STARTERS Document Number 2617687 Sheet TEXAS INSTRUMENTS Schematic Diagram Running Title-Attribute Reference Appendix Appendix Glossary absolute address: location. address that permanently assigned memory A/D: Analog-to-digital. Conversion continuously variable electrical signals discrete discontinuous electrical signals. AIC: Analog interface circuit. Integrated circuit that performs serial conversions. assembler: software program that creates machine-language program from source file that contains assembly language instructions, directives, macro directives. assembler substitutes absolute operation codes symbolic operation codes, absolute relocatable addresses symbolic addresses. assignment statement: statement that assigns value variable. autoexec.bat: batch file that contains commands initializing your batch file: file containing accumulation data processed. This data either commands execute debugger commands debugger execute. BBS: Bulletin board service. Computer program which accessed remote users, allowing them post questions view responses. block: declarations statements grouped together braces treated entity. breakpoint: place computer program, usually specified instruction, where execution interrupted external intervention. byte: sequence eight adjacent bits operated upon unit. Chapter Title-Attribute Reference Glossary code-display windows: Windows that show code, text files, codespecific information. COFF: Common object file format. system object files configured according standard developed AT&T. These files relocatable memory space. command: character string provide system, such assembler, that represents request system action. command file: file created user which names initialization options input files linker debugger. command line: portion COMMAND window where enter instructions system. command-line cursor: on-screen marker that identifies current character position command line. comment: source statement portion source statement) that used document improve readability source file. Comments assembled. constant: fixed invariable value data item. cross-reference listing: output file created assembler that lists symbols that were defined, line they were defined lines that referenced them, their final values. cursor: on-screen marker that identifies current character position. D/A: Digital-to-analog. Conversion discrete discontinuous electrical signals continuously variable signals. DARAM: Dual-access, random-access memory. Memory that altered twice during each cycle. D_DIR: environment variable that identifies directory containing commands files necessary running debugger. debugger: software interface that permits user identify eliminate mistakes program. Glossary directive: Special-purpose commands that control actions functions software tool opposed assembly language instructions, which control actions device). disassembly: process translating contents memory from machine language assembly language. Also known reverse assembly. DSK: Digital signal processor starter kit. Tools documentation provided users enable rapid product. DSP: Digital signal processor. DSPs process manipulate digital signals, which discrete discontinuous electrical impulses. DTR: Data terminal ready. signal defined RS-232 standard that allows data source, such computer terminal, indicate that ready transmission. EGA: Enhanced graphics array. industry-standard video card. entry point: point target memory where program begins execution. expression: more operations assembler programming represented combination symbols, constants, paired parentheses separated arithmetic operators. external symbol: symbol that used current program module defined another program module. field: software-configurable data type which programmed from eight bits long. file header: portion COFF object file that contains general information about object file, such number section headers, type system object file downloaded number symbols symbol table, symbol table's starting address. global symbol: symbol that either defined current module accessed another accessed current module defined another. Glossary Glossary Integrated circuit. tiny wafer substitute material upon which etched imprinted complex electronic components their interconnections. input section: module. section from object file that linked into executable label: symbol that begins column source statement corresponds address that statement. listing file: output file created assembler that lists source statements, their line numbers, unresolved symbols opcodes. LSB: Least significant bit. binary digit, bit, binary number that least influence value number. LSByte: Least significant byte. byte multibyte word that least influence value word. member: element structure, union, enumeration. memory map: target system memory space that partitioned into functional blocks. menu bar: pulldown menu selections debugger display. mnemonic: instruction name that assembler translates into machine code. MSB: Most significant bit. binary digit, bit, binary number that most influence value number. MSByte: Most significant byte. byte multibyte word that most influence value word. named section: Either initialized section that defined with .sect directive, uninitialized section that defined with .usect directive. Glossary object file: related records treated unit that output assembler compiler input linker. operand: arguments parameters assembly language instruction, assembler directive, macro directive. options: Command parameters that allow request additional specific functions when invoke software tool. Personal computer program counter, depending context where it's used. this book, installation instructions, information relating hardware boards, means personal computer PC). general debugger program-related information, means program counter, which register that identifies current statement your program. PROM: Programmable read-only memory. integrated circuit which information programmed user. This circuit read from written pulldown menu: command menu that accessed name from menu debugger display. data: Executable code initialized data output section. reverse assembly: process translating contents memory from machine language assembly language. Also known disassembly. SARAM: Single-access, random-access memory. Memory that altered only once during each cycle. section: relocatable block code data that ultimately occupies space adjacent other blocks code memory map. serial port: access point that debugger uses sequentially transmit receive data from emulator applications board. port address represents communication port which debugger attached. Glossary Glossary single step: form program execution which program executed statement statement. debugger pauses after each statement update data-display window. source file: file that contains code assembly language code that will assembled form temporary object file. SPC: Section program counter. specific register that holds address section where following directive obtained. static variable: variable that allocated before execution program begins remains allocated duration program. string table: table that stores symbol names that longer than eight characters. Symbol names eight characters longer cannot stored symbol table; instead, they stored string table. name portion symbol's entry points location string string table. structure: collection more variables grouped together under single name. symbol: string alphanumeric characters that represents address value. tag: optional type name that assigned structure, union, enumeration. unconfigured memory: Memory that defined part memory cannot loaded with code data. unsigned value: value that treated positive number, regardless actual sign. VGA: Video graphics array. industry-standard video card. word: character string considered entity. Index Index debugger option baud rate error 2-10 command 6-17 .bfloat 6-18 assembler directive 5-8, E-18 binary integers command 6-17 block, definition breakpoints. software breakpoints bulletin board, updating software, .byte, assembler directive 5-8, E-12 byte, definition absolute address, definition transformer, power requirements assembler option 4-11 assembler 3-4, 4-12 option constants definition description directives 5-11 executable file expressions features options 4-10 source, listings source statement format symbols assembler directives. directives assembling your program 4-10 assembly-time constants E-28 assigning value symbol E-28 assignment statement, definition autoexec.bat autoexec.bat file, definition debugger option c1/c2/c3/c4 debugger option error 2-10 cable, requirements 2-2, character, constants CLRC, clear code-display windows, definition code, developing com1/com2/com3/com4 debugger option error 2-10 command file, definition command line defining assembler statements 4-11 definition command-line cursor, definition comments definition communication, link between communication port, error 2-10 debugger option command 6-16 backup, product disk batch files config.sys definition invoking, autoexec.bat Index-1 Index conditional assembly, directives conditional block E-20 definition config.sys modifying sample connecting board your constant, definition constants 4-7, assembly-time 4-7, E-28 binary integers character decimal integers floating-point E-18 hexadecimal integers symbols contacting Texas Instruments, .copy assembler directive copy files E-13 Copy submenu 6-11 disk hard drive files information 6-11 cross-reference listing cursors, definition 5-6, E-13 debugger (continued) options pulldown menus, using decimal integer constants dialog closing 6-15 using 6-13 D_DIR environment variable, definition .data assembler directive section 5-4, E-15 DB25 connection connection 5-4, E-15 debugger definition description display, basic environment, setting executable file exiting exiting operating system installation invoking features menu Index-2 6-11 directives 5-34 alphabetical reference 5-11 assembly-time constants E-28 conditional assembly 5-2, .else E-20 .endif 5-7, E-20 5-7, E-20 define sections 5-2, .data 5-4, E-15 .entry 5-4, E-31 .text 5-4, E-31 definition initialize constants .bfloat 5-8, E-18 .byte 5-8, E-12 .double 5-8, E-18 .efloat 5-8, E-18 .float 5-8, E-18 .int .long 5-8, E-23 .lqx 5-8, E-24 5-8, E-24 .space 5-9, E-29 .string 5-8, E-12 .tfloat 5-8, E-18 .word 5-8, E-33 initializing load address, E-15 listing your output, .liston E-21 miscellaneous 5-10 .end 5-10, E-16 Index directives (continued) .entry E-17 .listoff 5-10 .liston 5-10 .set 5-10 reference other files .copy 5-6, E-13 .include 5-6, E-13 directories dsktools directory debugger software 2-6, disassembly, definition display requirements 2-2, 6-18 entry point defining definition eXec submenu execute program breakpoint, function method 6-18 executing code, menu selections exiting debugger expressions external symbol, definition field, definition file header, definition filename, copy/include file Fill submenu filling memory, menu selections .float 6-18 assembler directive 5-8, E-18 floating-point constants E-18 function keys, definition 6-18 display reverse assembly contents Display submenu Format submenu Memory submenu display, function method .double 6-18 assembler directive assembler directive section dska command dska.exe file dskd.exe file DSP, defined dskd command 2-9, 3-5, 5-4, E-15 6-18 displaying information, menu selections 5-8, E-18 3-5, 4-10 getting started global symbol, definition defined logic level, selecting debugger option hardware requirements Help submenu function display 6-18 hexadecimal integers host system debugger option 5-8, E-18 5-7, E-20 6-16 5-10, E-16 5-7, E-20 5-4, E-17 .efloat 6-18 assembler directive EGA, definition debugger option .if, assembler directive 5-7, E-20 .include, assembler directive 5-6, E-13 include, files include, files E-13 Init submenu 6-10 .else, assembler directive .end, assembler directive .endif, assembler directive .entry, assembler directive enabling software breakpoints Index-3 Index initializing registers 6-10 program entry point 6-10 input section, definition installation debugger software errors 2-10 hardware connections verifying .int, assembler directive 5-8, E-33 invoking, assembler 4-10 invoking debugger assembler option 4-10 memory (continued) requirements memory map, definition menu definition menu selections, definition (pulldown menu), .mmregs assembler directive 5-10, E-25 mnemonic, definition mnemonic field syntax Modify submenu MS-DOS, software requirements MSb, definition MSByte, definition assembler option 4-10 debugger option option label, definition labels 4-3, case sensitivity assembly language source syntax using with .byte directive E-12 listing file, definition listing software breakpoints 6-17 .listoff, assembler directive 5-10, E-21 .liston, assembler directive 5-10, E-21 Load submenu loading information, menu selections .long, assembler directive 5-8, E-23 .lqxx, assembler directive 5-8, E-24 5-8, E-24 defined LSByte, defined named section, definition object file creating 4-10 definition opcodes, defining operand, definition operands labels prefixes operating system accessing from within debugger environment 6-11 requirements returning debugger 6-11 Op-sys submenu 6-11 options assembler 4-10 4-12 debugger definition output file, generating 4-10 member, definition memory filling loading information into, menu selections Index-4 PATH statement definition PC-DOS, software requirements Index assignments RS-232 connections port, definition power requirements print screen, function method 6-18 program assembling 4-10 entry point 6-10 defining definition program execution, using pulldown menus assembler directive 5-4, E-31 section pulldown menus 6-12 Copy submenu 6-11 definition Display submenu escaping from eXec submenu Fill submenu Help submenu Init submenu 6-10 Load submenu Modify submenu Op-sys submenu 6-11 Quit submenu Reset submenu 6-10 Save submenu 6-11 Watch submenu 6-10 debugger option Save submenu 6-11 saving code 6-11 screen size, selecting section, definition section program counter. serial port identifying requirements .set, assembler directive 5-10, E-28 setc, debugger command signal name RS-232 connections single-step, definition singlestep, function method 6-18 software breakpoints 6-16 command 6-16 command 6-17 command 6-16 command 6-17 clearing 6-17 definition listing 6-17 setting 6-16 software requirements source source file, definition source files commenting labeling opcodes .space, assembler directive 5-9, E-29 assigning label assigning initial value E-15 definition setting starting address value, associated with labels statements, defining from command line static variable, definition .string, assembler directive 5-8, E-12 string table, definition structure, definition submenus symbol, definition symbols assigning values E-28 Quit submenu .qxx, assembler directive 5-8, E-24 data, definition reference guide 6-18 register definitions 6-19 requirements power software Reset submenu 6-10 resetting board 6-10 RS-232 connections 4-11 Index-5 Index tag, definition 4-10 temporary object file, creating .text assembler directive section .tfloat 6-18 assembler directive trace, turning on/off unconfigured memory, definition unsigned, definition VGA, definition 5-4, E-31 5-8, E-18 warranty information Watch submenu 6-10 .word, assembler directive word, definition 5-8, E-33 6-18 transformer, power requirements Index-6 Other recent searchesWP5603VGDL - WP5603VGDL WP5603VGDL Datasheet RT9198T - RT9198T RT9198T Datasheet PIC16C712 - PIC16C712 PIC16C712 Datasheet ILX516K - ILX516K ILX516K Datasheet HGTG27N60C3R - HGTG27N60C3R HGTG27N60C3R Datasheet
Privacy Policy | Disclaimer |