2.12 Import or Export Information File

Information for functions or variables defined outside the active project, and which are never referenced from the active project, is ordinary not displayed in the Function List panel/Variable List panel.

In this case, it is possible to force this information to be displayed by importing an information file that saves the information about a function/variable you need.

The following types of information files are available.

Table 2.9

Types of Information Files

Information FIle Name

Contents

Function list file(*.mtfl)

Stores the information about the following items on the Function List panel.

[Function Name], [Class Name][CC-RX], [Namespace][CC-RX], [File Name], [File Path], [PM Information][RH850]Note, [Access Specifier][CC-RX], [Attribute], [Return Type], [Arguments Count], [Arguments], [Code Size[Bytes]]

Variable list file(*.mtvl)

Stores the information about the following items on the Variable List panel.

[Variable Name], [Class Name][CC-RX], [Namespace][CC-RX], [File Name], [Function Name], [File Path], [PM Information][RH850]Note, [Access Specifier][CC-RX], [Attribute], [Type], [Members], [Size[Bytes]]

Note

This item appears only when the selected microcontroller version supports multi-core.

 

The procedure for doing this is as follows:

(1)

Generate (Export) information file

(a)

Export an information file manually

This operation will generate an information file with only the functions/variables needed to be imported.

To do this, first make the project in which the target functions/variables are defined the active project, then display the necessary information of the target functions/variables in the Function List panel/Variable List panel.

Next, select all the rows displaying the target functions/variables in this panel (multiple rows can be selected by holding down the [Shift]/[Ctrl] key while selecting), then from the [File] menu, select [Save Function List Data As...]/[Save Variable List Data As...]. The following Save As dialog box opens.

Figure 2.20

Export Information File Manually (Example of Function List File)

 

In the [Save in] area of the above dialog box, select a folder of your choice in which to save the generated information file, then select "Function List File (*.mtfl)" or "Variable List File (*.mtvl)" from the drop-down list in the [Files of type] area.

Next, enter a file name of your choice for the information file in the [File name] area. Note, however, that the file extension must be "mtfl" for a function list file, and "mtvl" for a variable list file.

Click the [Save] button to generate the information file in the specified folder, with the specified file name.

Remark

If you also need information about functions/variables defined outside the active project specified here, then generate a separate information file using the same procedure.

(b)

Export information files automatically

This operation will automatically generate information files with all the functions/variables displayed in the Function List panel/Variable List panel each time a build/rebuild is executed.

To do this, specify [Yes] with the [Export the functions and variables] property in the [Import / Export] category on the [Settings] tab of the Property panel, and then specify a file name of your choice for the information files in the [Export file name for functions]/[Export file name for variables] property. Note, however, that the file extension must be "mtfl" for a function list file, and "mtvl" for a variable list file. If you specify a relative path, specify the project folder as the base.

Figure 2.21

[Import / Export] Category

 

The above setting completes the automatic export of the information file.

Execute a build/rebuild to generate the information file automatically in the specified folder, with the specified file name.

Caution

Only the current active project is subject to this export.

Remark

The following placeholders are supported in the [Export file name for functions]/[Export file name for variables] property.
- %ProjectName%: Replaces itself with the project name.
- %ActiveProjectName%: Replaces itself with the active project name.

(2)

Import the information file

Import the information file you generated (exported).

To do this, set the [Import files] property in the [Import / Export] category on the [Settings] tab of the Property panel. When the [Import files] property is selected, a [...] button appears. When this button is clicked the following Path Edit dialog box opens.

Figure 2.22

[Import files] Property in [Import / Export] Category

Figure 2.23

Specification of Import Files (Path Edit Dialog Box)

 

In the Path Edit dialog box, in the [Path(One path per one line)] area, specify the names of the information files generated in (1) (including the path), one path per line (up to 259 characters per line/up to 64 lines). If you specify a relative path, specify the project folder as the base.

You can also use the [Browse...] button to specify information files. After you have entered the names of all the files to import, click the [OK] button. The specified paths appear as sub-properties of the [Import files] property.

Figure 2.24

[Import files] Property (After Adding Import Files)

 

The above setting completes the import of the information file.

Remarks 1.

The following placeholders are supported in the Path Edit dialog box.
- %ProjectName%: Replaces itself with the project name.
- %MicomToolPath%: Replaces itself with the absolute path of the CS+ install folder.

Remarks 2.

The information files that have been exported by CubeSuite (CubeSuite function list file (*.csfl)/CubeSuite variable list file (*.csvl)) can also be imported.

Remarks 3.

If a function/variable with the same name exists in a import file and an active project, the determination is made according to the following rules.

-

When C source files are used

-

If the file names are different, and "static" (only lower case) is included in the attribute in the import file, then it is interpreted as a static function/static variable, and loaded as different function information/variable information.

-

If the file names are the same and the function names are different, and "static" (only lower case) is included in the attribute in the import file, then it is interpreted as a static variable in a function, and loaded as different variable information.

-

Functions/variables other than the above are interpreted as a global function/global variable or a static function/static variable with the same name in a file, and merged as identical function information/variable information.

-

When C++ source files [CC-RX]

-

[Class Name], [Namespace], [File Name], and [Arguments] are compared. If any one of these does not match, then it is loaded as different function information.

-

[Class Name], [Namespace], [Function Name], [File Name], and [Arguments] are compared. If any one of these does not match, then it is loaded as different variable information.

-

Functions/variables other than the above are merged as identical function information/variable information.

 

The rules for determining merging as identical function information/variable information are as follows:

Items

Rules

Function

Variable

[Class Name][CC-RX]

[Namespace][CC-RX]

[Function Name]

[File Pass]

[PM Information][RH850]Note

[Arguments Count]

[Arguments]

[Return Type]

[Access Specifier][CC-RX]

[Attribute]

[Class Name][CC-RX]

[Namespace][CC-RX]

[File Name]

[Function Name]

[File Path]

[PM Information][RH850]Note

[Access Specifier][CC-RX]

[Attribute]

[Type]

[Members]

The precedence is as follows:

"Active project value" > "Import file value"

Note, however, that if there is function information/variable information from multiple import files to merge, then the function information/variable information of the last file to be imported is loaded.

If a value does not exist in either the active project or import file, then it is left blank ("-").

[Code Size[Bytes]]

[Size[Bytes]]

The precedence is as follows:

"Import file value" > "Active project value"

Note, however, that if there is function information/variable information from multiple import files to merge, then the function information/variable information of the last file to be imported is loaded.

If a value does not exist in either the active project or import file, then it is left blank ("-").

Note

This item appears only when the selected microcontroller version supports multi-core.

(3)

Cancel the file import

To cancel the file import, delete the import files on the Path Edit dialog box.