open

Open channel to target processor or load file into CCS IDE

Syntax

open(rx,'channel1','mode1','channel2','mode2',...)
open(rx,channel,mode)
open(cc,filename,filetype,timeout)
open(cc,filename,filetype)
open(cc,filename)

Description

open(rx,'channel1','mode1','channel2','mode2',...) opens new RTDX™ channels associated with the link rx. Each new channel uses the string name channel1, channel2, and so on. For each channel, open configures the channel according to the associated mode string. Channel1 uses mode1; channel2 uses mode2, and so forth. Mode strings are either:

open(rx,channel,mode) opens a new channel to the processor associated with the link rx. The new channel uses the channel string and is configured for reading or writing according to the mode string.

open(cc,filename,filetype,timeout) loads filename into CCS IDE. filename can be the full path to the file or, if the file is in the current CCS IDE working directory, you can use a relative path, such as the name of the file.

Use cd to determine or change the CCS IDE working directory. You use the filetype option to override the default file extension. Four filetype strings work in this function syntax.

filetype StringExtensionDescription

program

.out

Executable programs for the target processor

project

.c, .a*, .s*, .o*, .lib, .cmd,.mak

CCS IDE project files

text

any

All text files

workspace

.wks

CCS IDE workspace files

To let you determine how long MATLAB software waits for open to load the file into CCS IDE, timeout sets the upper limit, in seconds, for the period MATLAB software waits for the load. If MATLAB software waits more than timeout seconds, load returns immediately with a time-out error. Returning a time-out error does not suspend the operation; it stops MATLAB software from waiting for confirmation for the operation completion.

open(cc,filename,filetype) loads filename into CCS IDE. filename can be the full path to the file or, if the file is in the current CCS IDE working directory, you can use a relative path, such as the name of the file. Use the cd function to determine or change your CCS IDE working directory. You use the filetype option to override the default file extension. Refer to the previous syntax for more information about filetype. When you omit the timeout option in this syntax, MATLAB software uses the global time-out set in cc.

open(cc,filename) loads filename into CCS IDE. filename can be the full path to the file or, if the file is in the current CCS IDE working directory, you can use a relative path, such as the name of the file. Use the cd function to determine or change the CCS IDE working directory. You use the filetype option to override the default file extension. Refer to the previous syntax for more information about filetype. When you omit the filetype and timeout options in this syntax, MATLAB software uses the global time-out set in cc, and derives the file type from the extension in filename. Refer to the previous syntax descriptions for more information on the input options.

Examples

For RTDX use, open forms part of the function pair you use to open and enable a communications channel between MATLAB software and your processor.

cc = ticcs;
rx = cc.rtdx;
open(rx,'ichannel','w');
enable(rx,'ichannel');

When you are working with CCS IDE, open adopts a different operational form based on your input arguments for filename and the optional arguments filetype and timeout. In the CCS IDE variant, open loads the specified file into CCS IDE. For example, to load the tutorial program used in Getting Started with Automation Interface, use the following syntax

cc = ticcs;
cc.load(tutorial_6xevm.out);

See Also

cd, dir, load

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS