| Contents | Index |
a=IDE_Obj.address(symbol,scope)
This function supports the following IDEs:
Eclipse IDE
The a = IDE_Obj.address(symbol,scope) method returns the memory address of the first matching symbol in the symbol table of the most recently loaded program.
Because the address method returns the address and page values as a structure, your programs can use the values directly. For example, the IDE_Obj.read and IDE_Obj.write can use a as an input.
If the address method does not find the symbol in the symbol table, it generates a warning and returns a null value.
a |
Use a as a variable to capture the return values from the address method. |
IDE_Obj |
IDE_Obj is a handle for an instance of the IDE. Before using a method, use the constructor function for your IDE to create IDE_Obj. |
symbol |
symbol is the name of the symbol for which you are getting the memory address and page values. Symbol names are case sensitive. Use the proper case when you enter symbol. For address to return an address, the symbol must be a valid entry in the symbol table. If the address method does not find the symbol, it generates a warning and leaves a empty. |
scope |
Optionally, you set the scope of the address method. Enter 'local' or 'global'. Use 'local' when the current scope of the program is the desired function scope. If you omit the scope argument, the address method uses 'local' by default. |
If the address method does not find the symbol, it generates a warning and does not return a value for a.
The address method only returns address information for the first matching symbol in the symbol table.
The return value, a, is a numeric array with the symbol's address offset, a(1), and page, a(2).
With TI C6000™ processors, the memory page value is 0.
With Eclipse IDE, the address method only returns the symbol address. It does not return a value for page.
The return value, a, is the numeric value of the symbol address.
With MULTI®, address requires a linker command file (lcf) in your project.
The return value, a, is a numeric array with the symbol's address offset, a(1), and page, a(2).
With VisualDSP++®, address requires a linker command file (lcf) in your project.
The return value a is a numeric array with the symbol's start address, a(1), and memory type, a(2).
After you load a program to your processor, 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 the IDE.
ddatv = IDE_Obj.read(IDE_Obj.address('ddat'),'double',4)
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 software as a double-precision value as specified by the string 'double'.
To change values in the symbol table, use address with write:
IDE_Obj.write(IDE_Obj.address('ddat'),double([pi 12.3 exp(-1)...
sin(pi/4)]))
After executing this write operation, ddat contains double-precision values for π, 12.3, e-1, and sin(π/4). Use read to verify the contents of ddat:
ddatv = IDE_Obj.read(IDE_Obj.address('ddat'),'double',4)
MATLAB software returns
ddatv =
3.1416 12.3 0.3679 0.7071

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |