Specifications
modified icon. To add the resource back into the build, right-click the resource and click Add to Nios II
Build.
Note: Do not use the Eclipse Exclude from build command. With Nios II software projects, you must
use the Remove from Nios II Build and Add to Nios II Build commands instead.
Absolute Source Paths and Linked Resources
By default, the source files for an Eclipse project are stored under the project directory. If your project
must incorporate source files outside the project directory, you can add them as linked resources.
An Eclipse linked resource can be either a file or a folder. With a linked folder, all source files in the folder
and its subfolders are included in the build.
When you add a linked resource (file or folder) to your project, the SBT for Eclipse adds the file or folder
to your makefile with an absolute path name. You might use a linked resource to refer to common source
files in a fixed location. In this situation, you can move the project to a different directory without
disturbing the common source file references.
A linked resource appears with a modified icon (green dot) in the Project Explorer, to distinguish it from
source files and folders that are part of the project. You can use the Eclipse debugger to step into a linked
source file, exactly as if it were part of the project.
You can reconfigure your project to refer to any linked resource either as an individual file, or through its
parent folder. Right-click the linked resource and click Update Linked Resource.
You can use the Remove from Nios II Build and Add to Nios II Build commands with linked resources.
When a linked resource is excluded from the build, its icon is modified with a white dot.
You can use Eclipse to create a path variable, defining the location of a linked resource. A path variable
makes it easy to modify the location of one or more files in your project.
For information about working with path variables and creating linked resources, refer to the Eclipse help
system.
User Source Management
You can remove a makefile from source management control through the Nios II Application Properties
or Nios II Library Properties dialog box.
Simply turn off Enable source management to convert the makefile to user source management. When
Enable source management is off, you must update your makefile manually to add or remove source files
to or from the project. The SBT for Eclipse makes no changes to the list of source files, but continues to
manage all other project parameters and settings in the makefile.
Modifying a Makefile with User Source Management
Editing a makefile manually is an advanced technique. Altera recommends that you avoid manual editing.
The SBT provides extensive capabilities for manipulating makefiles while ensuring makefile correctness.
In a makefile with user-managed sources, you can refer to source files with an absolute path. You might
use an absolute path to refer to common source files in a fixed location. In this situation, you can move
the project to a different directory without disturbing the common source file references.
Projects with user-managed sources do not support the following features:
• Linked resources
• The Add to Nios II Build command
• The Remove from Nios II Build command
NII5V2
2015.05.14
Absolute Source Paths and Linked Resources
2-13
Getting Started with the Graphical User Interface
Altera Corporation
Send Feedback