SourcePoint AMD Help
Table of Contents
- Using Help
- Contacting ASSET InterTech
- Introduction to SourcePoint
- SourcePoint Environment
- SourcePoint Overview
- SourcePoint Parent Window Introduction
- SourcePoint Icon Toolbar
- File Menu
- File Menu - Project Menu Item
- File Menu - Layout Menu Item
- File Menu - Program Menu Item
- File Menu - Macro Menu Item
- File Menu - Print Menu Items
- File Menu - Update Emulator Flash Menu Item
- File Menu - Program Target Device Menu Item
- File Menu - Other Menu Items
- Edit Menu
- View Menu
- Processor Menu
- Options Menu
- Options Menu - Preferences Menu Item
- Options Menu - Target Configuration Menu Item
- Options Menu - Load Target Configuration File Menu Item
- Options Menu - Save Target Configuration File Menu Item
- Options Menu - Emulator Configuration Menu Item
- Options Menu - Emulator Connection Menu Item
- Options Menu - Emulator Reset Menu Item
- Options Menu - Confidence Tests Menu Item
- Window Menu
- Help Menu
- How To -- SourcePoint Environment
- Add Emulator Connections
- Configure Custom Macro Icons
- Configure Autoloading Macros
- Display Text on the Icon Toolbar
- Edit Icon Groups to Customize Your Toolbars
- Modify a Defined Memory Region
- Refresh SourcePoint Windows
- Save a Program
- Start SourcePoint With Command Line Arguments
- Use the New Project Wizard
- Verify Emulator Network Connections
- SourcePoint Overview
- Breakpoints Window
- Breakpoints Window Overview
- How To - Breakpoints
- Code Window
- Command Window
- Command Window Overview
- Confidence Tests Window
- Confidence Tests Window Overview
- Descriptors Tables Window
- Descriptors Tables Window Overview
- How To - Descriptors
- Devices Window
- Devices Window Overview
- How To - Devices Window
- Log Window
- Log Window Overview
- Memory Window
- Memory Window Overview
- How To - Memory Window
- Page Translation Window
- Page Translation Windows Overview
- PCI Devices Window
- PCI Devices Window Overview
- How To - PCI Devices Window
- Registers Window
- Registers Window Overview
- How To - Registers
- Symbols Windows
- Symbols Window Overview
- How To - Symbols Window
- Viewpoint Window
- Viewpoint Window Overview
- Watch Window
- Watch Window Overview
- How To - Watch Window
- Technical Notes
- SourcePoint Command Language
- Overview
- Commands and Control Variables
- aadump
- abort
- abs
- acos
- advanced
- asin
- asm
- asmmode
- atan
- atan2
- autoconfigure
- base
- bell (beep)
- bits
- break
- breakall
- cachememory
- cause
- Character Functions
- clock
- continue
- cos
- cpubreak commands
- cpuid_eax
- cpuid_ebx
- cpuid_ecx
- cpuid_edx
- createprocess
- ctime
- cwd
- dbgbreak commands
- defaultpath
- #define
- define
- definemacro
- deviceconfigure
- devicescan
- disconnect
- displayflag
- do while
- dos
- dport
- drscan
- edit
- editor
- emulatorstate
- encrypt
- error
- eval
- evalprogramsymbol
- execution point ($)
- exit
- exp
- fc
- fclose
- feof
- fgetc
- fgets
- first_jtag_device
- flist
- flush
- fopen
- for
- forward
- fprintf
- fputc
- fputs
- fread
- fseek
- ftell
- fwrite
- getc
- getchar
- getnearestprogramsymbol
- getprogramsymboladdress
- gets
- globalsourcepath
- go
- halt
- help
- homepath
- idcode
- if
- include
- invd
- irscan
- isdebugsymbol
- isem64t
- isprogramsymbol
- isrunning
- issleeping
- issmm
- jtagchain
- jtagconfigure
- jtagdeviceadd
- jtagdeviceclear
- jtagdevices
- jtagscan
- jtagtest
- keys
- last
- last_jtag_device
- left
- license
- linear
- list, nolist
- load
- loadbreakpoints
- loadlayout
- loadproject
- loadtarget
- loadwatches
- log, nolog
- log10
- loge
- logmessage
- macropath
- Memory Access
- messagebox
- mid
- msgclose
- msgdata
- msgdelete
- msgdr
- msgdump
- msgir
- msgopen
- msgreturndatasize
- msgscan
- msr
- num_activeprocessors
- num_all_devices
- num_devices
- num_jtag_chains
- num_jtag_devices
- num_processors
- pause
- physical
- port
- pow
- print cycles
- printf
- proc
- processorcontrol
- processorfamily
- processormode
- processors
- processortype
- projectpath
- putchar
- puts
- rand
- readsetting
- reconnect
- Register Access
- reload
- reloadproject
- remove
- reset
- restart
- return
- right
- runcontroltype
- safemode
- save
- savebreakpoints
- savelayout
- savewatches
- selectdirectory
- selectfile
- shell
- show
- sin
- sizeof
- sleep
- softbreak, softremove, softdisable, softenable
- sprintf
- sqrt
- srand
- step
- stop
- strcat
- strchr
- strcmp
- strcpy
- _strdate
- string [ ] (index into string)
- strlen
- _strlwr
- strncat
- strncmp
- strncpy
- strpos
- strstr
- _strtime
- strtod
- strtol
- strtoul
- _strupr
- swbreak
- switch
- swremove
- tabs
- tan
- tapdatashift
- tapstateset
- targpower
- targstatus
- taskattach
- taskbreak, taskremove, taskdisable, taskenable
- taskend
- taskgetpid
- taskstart
- tck
- time
- #undef
- unload
- unloadproject
- upload
- unlock
- use
- verify
- verifydeviceconfiguration
- verifyjtagconfiguration
- version
- viewpoint
- vpalias
- wait
- wbinvd
- while
- windowrefresh
- wport
- writesetting
- yield
- yieldflag
Symbolic References
References to program addresses and variables
Syntax:
label
procedure
variable
variable[array-expr]
composite-variable.member
composite-variable->member
compound-variable
variable-ref=expr
*ptr-variable
&variable
Where:
label |
program label |
procedure |
procedure name |
variable |
variable name |
composite-variable |
structure or union name |
member |
structure or union member name |
compound-variable |
a combination of other variable types |
ptr-variable |
pointer variable name |
[array-expr] |
specifies a number or expression identifying an element in an array |
variable-ref |
specifies a variable, an array variable, a composite variable or a compound-variable |
expr |
specifies a number or expression |
Discussion
A program symbol table contains the names of all objects in the program, including the type and (for some objects) the length of each object. A symbolic reference identifies an object by name. When you use a symbolic reference in a command or expression, the emulator returns the value corresponding to the object. The value returned depends on the object type. This section reviews the kinds of symbolic references and the value represented. It also discusses special operators used with symbolic references, the address of operator (&) and the indirection operator (*), the direct-selection operator (.) and the indirect selection operator (-> ).
Symbol Table
The load command reads information about the program symbols from the object file named in the command. This information is stored internally in SourcePointโs symbol table. Symbol information is available in the Symbols window. Symbols can be used in place of addresses in the Memory, Code and Breakpoints windows. In addition, symbolic references can be used from within the Command window.
Names
All symbolic references involve the names of objects. Symbol names are case-sensitive. The legal characters in a name are defined by the language used in generating the object file. If a name conflicts with a reserved keyword, an emulator control variable, a debug variable, or a processor register name, then preface the name with the reserved keyword override operator (\). ย If a name exists more than once in a program, see Qualified Symbol Names.
Labels and Procedures
When you specify a label name or procedure name, the address associated with that object is returned. The address of operator (&) is ignored when used with a label or procedure name.
Variables
When you specify a variable name, the value associated with that object is returned.
Command input:
usi ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // usi is an unsigned short int
Result:
0001H
Command input:
f ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // f is a float
Result:
1.234500
Command input:
f=14.67
f
Result:
14.670000
Array Variables
An array consists of elements of a given type. To read or write an individual element, specify the index of the element. The address of operator (&) can be used to return the address of an array element.
Command input:
ai ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // ai is an array of integers
Result:
ai[0]: 0x00000000
ai[1]: 0x00000001
ai[2]: 0x00000002
ai[3]: 0x00000003
ai[4]: 0x00000004
ai[5]: 0x00000005
Command input:
ai[4] = 0
ai[4]
Result:
0x00000000
Composite Variables
A composite variable contains a collection of different objects called members. In "C" these include structures and unions. The direct-selection operator (.) is used to access individual members of a composite variable. If a pointer to a composite variable is specified, then the indirect-selection operator (->) is used to access members. The address of operator (&) can be used to return the address of a member of a composite variable.
Command input:
ints ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // ints is a structure with 3 members: a, b and c
Result:
a: 0
b: 0
c: 0
Command input:
ints.b=5 ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // change one member
ints
Result:
a: 0
b: 5
c: 0
Compound Variables
The program can contain compound forms such as arrays of arrays, arrays of structures, structures of arrays, and structures of structures. The rules for references to these compound forms are a combination of the previously discussed rules for variables.
Command input:
IntsArray ย ย ย ย ย ย ย ย ย ย ย ย ย // IntsArray is an array of structures
Result:
IntsArray[0]:
a: -1
b: -2
c: -3
ย
IntsArray[1]:
a: 1
b: 2
c: 3
Command input:
IntsArray[1].b = -5 ย ย ย ย // change one member of one element
IntsArray[1]
Result:
a: 1
b: -5
c: 3
Pointer Variables
Pointer variables contain addresses that reference program variables. When a program variable is defined as a pointer to another program variable that has a specific data type, use the indirection operator (*) to obtain the value of the variable.
Command input:
ints ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // ints is a structure with members a, b, and c
Result:
a: 0
b: 5
c: 0
Command input:
&ints ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // display address of ints
Result:
00000C78
Command input:
pInts ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // pInts points to int
Result:
00000C78
Command input:
*pInts ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย // display ints through the pointer pInts
Result:
a: 0
b: 5
c: 0
Command input:
pInts->b = 0 ย ย ย ย ย ย ย ย ย ย ย // change a member of ints through pInts
Result:
a: 0
b: 0
c: 0
Changing the Value of a Variable
Variables can be assigned new values from within the Command window or the Symbols window. To change the value of a variable, the variable must be active (be in the current or global scope). You cannot change the address corresponding to a procedure or label. The value assigned is converted to the variable type.
ย