The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


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

 

 

Symbolic Debugging Directives Topics Symbolic Debugging Dire


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



MSP430 Family
Symbolic Debugging Directives
Topics
Symbolic Debugging Directives
Symbolic Debugging Directives
MSP430 Family
MSP430 Family
Symbolic Debugging Directives
Symbolic Debugging Directives
MSP430 fixed-point assembler supports several directives that high level programming language symbolic debugging:
.sym directive defines global variable, local variable, function. Several parameters allow associate various debugging information with symbol function. .stag, .etag, .utag directives define structures, enumerations, unions, respectively. .member directive specifies member structure, enumeration, union. .eos directive ends structure, enumeration, union definition. .func .endfunc directives specify beginning ending lines function. .block .endblock directives specify bounds blocks. .file directive defines symbol symbol table that identifies current source file name. .line directive identifies line number source statement.
These symbolic debugging directives usually listed assembly language file that compiler creates. want them listed, invoke compiler shell with option, shown below:
cl430 input file
This appendix contains alphabetical directory symbolic debugging directives. Each directive contains example source resulting assembly language code.
Symbolic Debugging Directives
MSP430 Family
Syntax
.block beginning line number .endblock [ending line number]
Description
.block .endblock directives specify beginning block. line numbers optional; they specify location source file where block defined. Line numbers relative beginning current function. Note that block definitions nested. assembler will detect improper block nesting.
Example
Here example source that defines block resulting assembly language code. source:
a,b; block Beginning block
Resulting assembly language code:
.block .sym _a,1,4,1,8 .sym _b,2,4,1,8 .line 2(SP), 1(SP) .endblock
MSP430 Family
Symbolic Debugging Directives
Syntax Description
.file filename .file directive allows debugger locations memory back lines source file. filename name file that contains original source program. first characters filename significant; pathname information stripped away. .file directive assembly code provide name file improve program readability.
Example
Here's example .file directive. file named text.c contained source that produced this directive.
.file "text.c"
Symbolic Debugging Directives
MSP430 Family
Syntax
.func [beginning line number] .endfunc [ending line number] register save mask1 register save mask2 frame size
Description
.func .endfunc directives specify beginning function. line numbers optional; they specify location source file where function defined. register save masks indicate which registers were saved this function. mask2 saved function; mask2 saved; mask1 saved; etc. frame size parameter indicates many bytes were reserved local frame this function. Note that function definitions cannot nested.
Example
Here example source that defines function resulting assembly language code. source:
power(x, Beginning function x,n; register ++i) return function
MSP430 Family
Symbolic Debugging Directives
Resulting assembly language code:
.sym _power,_power,36,2,0 .global _power .text .func FUNCTION _power _power:; INCW #4,STK A,-2(STK) A,-3(STK) FP,-1,A A,-1(STK) FP,A A,@STK MOVW STK,FP INCW #2,STK R23,A A,-1(STK) R24,A A,@STK .sym _x,-4,4,9,8 .sym _n,-5,4,9,8 .sym _i,23,4,4,8 .sym _p,24,4,4,8 .line .line #01h,R24 .line #01h,R23 -4(FP),A R24,A B,R24 -5(FP),A R23,A .line R24,R8 EPI0_1: .line @STK,A A,R24 -1(STK),A A,R23 MOVW FP,STK @STK,A A,FP -1(STK),A A,FP-1 -2(STK),A -3(STK),A INCW #-4,STK .endfunc 8,00180H,00000H,0 .end
Symbolic Debugging Directives
MSP430 Family
Syntax Description
.line line number address] .line directive creates line number entry object file. Line number entries used symbolic debugging associate addresses object code with lines source code that generated them. .line directive operands:
Line number indicates line source that generated portion code. Line numbers relative beginning current function. This required parameter. Address expression that address associated with line number. This optional parameter; don't specify address, assembler will current value.
Example
.line directive followed assembly language source statements that generated indicated line source. example, assume that lines source below lines original source; lines produce assembly language source statements that shown below. source:
++i) p*=x return
Resulting assembly language code:
.line #01h, #01h, -4(FP), R24, -5(FP), R23, .line R24,
MSP430 Family
Symbolic Debugging Directives
Syntax Description
.member name, value type, storage class, size, tag, dims] .member directive defines member structure, union, enumeration. valid only when appears structure, union, enumeration definition.
Name name member that symbol table. first characters name significant. Value value associated with member. legal expression (absolute relocatable) acceptable. Type type member. Appendix contains more information about types. Storage class storage class member. Appendix contains more information about storage classes. Size number bits memory required contain this member. name type any) structure which this member type. This name must have been previously declared .stag, .etag, .utag directive. Dims four expressions separated commas. This allows four dimensions specified member.
order parameters significant. Name value required parameters. other parameters omitted empty (adjacent commas indicate empty entry). This allows skip parameter specify parameter that occurs later list. Operands that omitted empty assume null value.
Example
Here example structure definition corresponding assembly language statements: source:
struct char title; char group; job_number; doc_info;
Resulting assembly language code:
.stag doc,24 .member _title,0,2,8,8 .member _group,8,2,8,8 .member _job_number,16,4,8,8 .eos
Symbolic Debugging Directives
MSP430 Family
Syntax
.stag name size] member definitions .eos .etag name size] member definitions .eos .utag name size] member definitions .eos
Description
.stag directive begins structure definition. .etag directive begins enumeration definition. .utag directive begins union definition. .eos directive ends structure, enumeration, union definition.
Name name structure, enumeration, union. first characters name significant. This required parameter. Size
number bits structure, enumeration, union occupies memory. This optional parameter; omitted, size unspecified.
.stag, .etag, or.utag directive should followed number .member directives, which define members structure. .member directive only directive that appear inside structure, enumeration, union definition. assembler does allow nested structures, enumerations, unions. compiler "unwinds" nested structures defining them separately then referencing them from structure they referenced
Example
Here example structure definition. source:
struct char title; char group; job_number; doc_info;
Resulting assembly language code:
.stag .member .member .member .eos _doc,24 _title,0,2,8,8 _group,8,2,8,8 _job_number,16,4,8,8
B-10
MSP430 Family
Symbolic Debugging Directives
Example
Here example union definition. source:
union u_tag val1; float val2; char valc; valu;
Resulting assembly language code:
.utag .member .member .member .eos _u_tag,24 _val1,0,4,11,8 _val2,0,6,11,24 _valc,0,2,11,8
Example
Here example enumeration definition. Source:
enum o_ty reg_1, reg_2, result optypes;
Resulting assembly language code:
.etag .member .member .member .eos _o_ty,8 _reg_1,0,4,16,8 _reg_2,1,4,16,8 _result,2,4,16,8
B-11
Symbolic Debugging Directives
MSP430 Family
Syntax Description
.sym name, value type, storage class, size, tag, dims] .sym directive specifies symbolic debug information about global variable, local variable, function.
Name name variable that object symbol table. first characters name significant. Value value associated with variable. legal expression (absolute relocatable) acceptable. Type? type variable. Appendix contains more information about types. Storage class? storage class variable. Appendix contains more information about storage classes. Size? number bits memory required contain this variable. name type any) structure which this variable type. This name must have been previously declared .stag, .etag, .utag directive. Dims four expressions separated commas. This allows four dimensions specified variable.
order parameters significant. Name value required parameters. other parameters omitted empty (adjacent commas indicate empty entry). This allows skip parameter specify parameter that occurs later list. Operands that omitted empty assume null value.
Example
These lines source produce .sym directives shown below: source:
struct member1, member2; str; ext; array[5][10]; long *ptr; strcmp(); main(arg1,arg2) arg1; char *arg2; register
B-12
MSP430 Family
Symbolic Debugging Directives
Resulting assembly language code:
.sym .sym .sym .sym .sym .sym .sym .sym _str,_str,8,2,16,_s _ext,_ext,4,2,8 _array,_array,244,2,400,,5,10 _ptr,_ptr,21,2,16 _main,_main,36,2,0 _arg1,-4,4,9,8 _arg2,-6,18,9,16 _r1,23,4,4,8
B-13
Symbolic Debugging Directives
MSP430 Family
B-14

Other recent searches


XMUY100C - XMUY100C   XMUY100C Datasheet
TC7WH14FU - TC7WH14FU   TC7WH14FU Datasheet
TC7WH14FK - TC7WH14FK   TC7WH14FK Datasheet
NC7NZU04 - NC7NZU04   NC7NZU04 Datasheet
IRF5YZ48CM - IRF5YZ48CM   IRF5YZ48CM Datasheet
APTGT100DH170 - APTGT100DH170   APTGT100DH170 Datasheet
AN-110 - AN-110   AN-110 Datasheet
HI-868X - HI-868X   HI-868X Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive