MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
Return various information listings from Code Composer Studio
Syntax
Description
list(ff,varname)
lists the local variables associated with the function accessed by function object ff
.
infolist = list(cc,type
) reads information about your Code Composer Studio session and returns it in infolist. Different types of information and return formats are possible depending on the input arguments you supply to the list
function call. The type
argument specifies which information listing to return. To determine the information that list returns, use one of the following as the type
parameter string:
project
--tell list
to return information about the current project in CCS
variable
--tell list
to return information about one or more embedded variable
globalvar
--tell list
to return information about one or more global embedded variables
function
--tell list
to return details about one or more functions in your project
type
--tell list
to return information about one or more defined data types, including struct, enum, and union. C datatype typedef is excluded from the list of datatypes.
Note, the list function returns dynamic Code Composer information that can be altered by the user. Returned information listings represent snapshots of the current Code Composer studio configuration only. Be aware that earlier copies of infolist might contain stale information.
infolist = list(cc,'
project
'
) returns a vector of structures containing project information.
infolist Structure Element |
Description |
infolist(1).name |
Project file name (with path). |
infolist(1).type |
Project type--'project ','projlib ', or 'projext ', see new |
infolist(1).targettype |
String Description of Target CPU |
infolist(1).srcfiles |
Vector of structures that describes project source files. Each structure contains the name and path for each source file--infolist(1).srcfiles.name |
infolist(1).buildcfg |
Vector of structures that describe build configurations, each with the following entries: |
infolist(2).... |
... |
infolist(n).... |
... |
infolist = list(cc,'variable
') returns a structure of structures that contains information on all local variables within scope. The list also includes information on all global variables. Note, however, that if a local variable has the same symbol name as a global variable,list returns the information about the local variable.
infolist = list(cc,'variable
',varname
) returns information about the specified variable varname.
infolist = list(cc,'variable
',varnamelist
) returns information about variables in a list specified by varnamelist
. The returned information in each structure follows the format:
list
uses the variable name as the fieldname to refer to the structure information for the variable.
infolist = list(cc,'globalvar
') returns a structure that contains information on all global variables.
infolist = list(cc,'globalvar
',varname
) returns a structure that contains information on the specified global variable.
infolist = list(cc,'globalvar
',varnamelist
) returns a structure that contains information on global variables in the list. The returned information follows the same format as the syntax infolist = list(cc,'variable',...).
infolist = list(cc,'function
') returns a structure that contains information on all functions in the embedded program.
infolist = list(cc,'function
',functionname
) returns a structure that contains information on the specified function functionname
.
infolist = list(cc,'function
',functionnamelist
) returns a structure that contains information on the specified functions in functionnamelist
. The returned information follows the format:
To refer to the function structure information, list
uses the function name as the fieldname.
infolist = list(cc,'type
') returns a structure that contains information on all defined data types in the embedded program. This method includes 'struct', 'enum' and 'union' datatypes and excludes typedefs. The name of a defined type is its C struct tag, enum tag or union tag. If the C tag is not defined, it is referred to by the Code Composer (tm) compiler as '$faken' where n is an assigned number.
infolist = list(cc,'type
',typename
) returns a structure that contains information on the specified defined datatype.
infolist = list(cc,'type
',typenamelist
) returns a structure that contains information on the specified defined datatypes in the list. The returned information follows the format:
For the fieldname, list
uses the type name to refer to the type structure information.
Important--when a variable name, type name, or function name is not a valid MATLAB structure fieldname, list
replaces or modifies the name so it becomes valid.
Note
In fieldnames that contain the invalid dollar character `$ ', list replaces the `$ ' with `DOLLAR .'
|
Examples
This first example shows list
used with a variable, providing information about the variable varname
. Notice that the invalid fieldname '_with_underscore
' gets changed to 'Q_with_underscore
.' To make the invalid name valid, the character `Q
' is inserted before the name.
varname1 = '_with_underscore'; % invalid fieldname list(cc,'variable',varname1); ans = Q_with_underscore : [varinfo] ans. Q_with_underscore ans= name: '_with_underscore' isglobal: 0 location: [1x62 char] size: 1 uclass: 'numeric' type: 'int' bitsize: 16
To demonstrate using list
with a defined C type, variable typename1
includes the type
argument. Since valid fieldnames cannot contain the $
character, list changes the $
to DOLLAR
.
typename1 = '$fake3'; % name of defined C type with no tag list(cc,'type',typename1); ans = DOLLARfake0 : [typeinfo] ans.DOLLARfake0= type: 'struct $fake0' size: 1 uclass: 'structure' sizeof: 1 members: [1x1 struct]
When you request information about a project in CCS, you see a listing like the following that includes structures containing details about your project.
projectinfo=list(cc,'project') projectinfo = name: 'D:\Work\c6711dskafxr_c6000_rtw\c6711dskafxr.pjt' type: 'project' targettype: 'TMS320C67XX' srcfiles: [69x1 struct] buildcfg: [3x1 struct]
See Also
![]() | iswritable | load | ![]() |