MATLAB Link for Code Composer Studio Development Tools    
address

Return the address and page for an entry in the symbol table in CCS IDE

Syntax

Description

a = address(cc,'symbolstring') returns the address and page values for the symbol identified by 'symbolstring' in CCS IDE. address returns the symbol from the most recently loaded program in CCS IDE. In some instances this might not be the program loaded on the target to which cc is linked. By returning the address and page values as a structure, your programs can use the values directly. If you provide an output argument, the output a contains the 1-by-2 vector of [address page]. symbolstring must represent a valid entry in the symbol table. To ensure that address returns information for the correct symbol, use the proper case when you enter symbolstring because symbol names are case-sensitive; 'symbolstring' is not the same as 'Symbolstring'.

If address does not find a symbol table entry that matches symbolstring, the first cell of a is returned empty. Notice that this function returns only the first matching symbol in the symbol table. The output argument is a cell array where each row in a presents the symbol name and address in the table. Each returned symbol address comprises a two element vector with the symbol page as the second element. For example, this table shows a few possible elements of a, and their interpretation.

a Array Element
Contents of the Specified Element
a{1}
String reflecting the symbol name. If address found a symbol that matches symbolstring, this is the same as symbolstring. Otherwise this is empty.
a{2}(1)
Address or value of symbol entry.
a{2}(2)
Memory page value. For TI C6xxx processors, the page is 0.

Examples

After you load a program to your target, address lets you read and write to specific entries in the symbol table for the program. For example, the following function reads the value of symbol 'ddat' from the symbol table in CCS IDE.

ddat is an entry in the current symbol table. address searches for the string ddat and returns a value when it finds a match. read returns ddat to MATLAB as a double-precision value as specified by the string 'double'.

To change values in the symbol table, use address with write:

After executing this write operation, ddat contains double-precision values for , 12.3, e-1, and sin(/4). Use read to check the contents of ddat.

MATLAB returns

See Also
load, read, symbol, write


  addregister animate