12
Suppose we have created a simple project in NIOS, and we wish to import an external file-system into the project. To do this right click on the project folder icon in the Project Explorer tab in the left. In the corresponding menu select Import:

Import External Files

Embed Size (px)

Citation preview

Suppose we have created a simple project in NIOS, and we wish to import an external file-system

into the project. To do this right click on the project folder icon in the Project Explorer tab in the left.

In the corresponding menu select Import:

This will open the Import window. Within this window choose General -> FileSystem

In this example we will import the FileSystemLibSrc folder structure (this is available along with the

files for Assignment 2 in blackboard), which for this example is located under U:

Thus we browse to U: as follows and choose U: (always choose the upper level folder where the file

system you wish to import is stored)

Choosing U: lists all the files under U: in the right hand side of the import window as follows. Ignore

these files, but expand folder name in the left hand side of the Import window

From the list of the sub-folders appearing in the left hand sider of the Import window choose the

one you wish to import (in the following example FileSystemLibSrc is chosen). Click Finish

This will copy the whole sub-folder structure you wish to import under your project folder as follows.

The imported folders may contain user defined header files. If this is the case, we must tell the

system where all these additional header files are located. The steps for this will be shown below.

To see where the header files are located we can expand the imported folder structure as shown

below:

Check that FileSystemLibSrc has header files in the following subfolders:

FileSystemLibSrc -> conf

FileSystemLibSrc -> inc

FileSystemLibSrc -> inc -> interfaces

Next we shall include these paths in the set of “include paths” of the project.

Right-click on the Project folder icon on the Project Explorer tab in the left side pane of Nios, and

then in the pop-up menu select Properties

In left side pane of the Properties window navigate to Nios II Application Properties -> Nios II

Application Paths. This will open the Nios II Application paths perspective as shown below. Click Add

next to Application include directories as shown below:

This will open the file browser. Browse to the include paths and add them. In the following we are

adding FileSystemLibSrc -> conf

After you click ok, the following window pops up. It Is a good idea to click Yes (otherwise, if you

move your project folder somewhere else, the build might fail).

Next we add FileSystemLibSrc -> inc:

Finally, we add FileSystemLibSrc -> inc -> interfaces:

After the include-paths are added successfully, the paths should show in the list of Application

include directories in Nios II Application Paths perspective as follows.

Now we are ready to start using the imported folders in our project.

Important: If you decide to create your own header files, you must add the paths to your headers

to the list of project include paths as shown above. Otherwise, the project will not build.