7.9.8.59. GEL_PortConnect()ΒΆ

For simulator only, connects a data file to a memory (port) address.

Syntax

GEL_PortConnect(portAddress, page, length, accessType, "fileName" );

Parameters

portAddressstarting address of a range in memory. This Parameters can be an absolute address, any C expression, the name of a C function, or an assembly language label. If you want to specify a hex address, be sure to prefix the address number with 0x; otherwise, Code Composer Studio treats the number as a decimal address.

pageidentifies the type of memory: 0 (Program memory), 1 (Data memory) or 2 (I/O space)

For processors that do not have more than one type of memory, use 0 for this Parameters.

lengthdefines the length of the range. This Parameters can be any C expression.

accessTypespecifies the type of access allowed. The access type can be any combination of the following values:

Access Type

#define GTI_ATTR_PORT_READ

#define GTI_ATTR_PORT_WRITE

#define GTI_ATTR_PORT_NOREWIND

#define GTI_ATTR_PORT_UPDATE

#define GTI_ATTR_PORT_EXTERN

Value

0x01

0x02

0x04

0x08

0x10

fileNamenames the data file. The fileName must be enclosed in quotation marks.

Description

The simulator allows you to access a data file through a memory address. This function connects a data file to a memory (port) address. You can then read data from the file or write data to the file.

If the file is not in the current directory, provide a full path name within the string. A double backslash escape sequence is required to ensure that you get a backslash into the fileName Parameters.

Synchronous

Synchronous from GEL: Yes

Completely synchronous: Yes

Example

GEL_PortConnect( 0x1000, 0, 0x100, , "c:\mydir\myfile.dat");

Related Topics

GEL_PortDisconnect()

Connecting a File to a Memory Address