User guide
Configuring Projects
Configuring Project Dependencies
Projects in the Nios II IDE can be dependent on other Nios II IDE projects. Nios II C/C++
application projects inherently depend on a single Nios II system library project. Nios II
C/C++ application projects and Nios II user-makefile C/C++ application projects can also
depend on Nios II C/C++ library projects. Nios II C/C++ library projects can depend on other
Nios II C/C++ library projects. During the build process
for a project, the Nios II IDE first
builds all dependent projects.
The Nios II IDE automatically establishes a dependency between the Nios II C/C++ application
project and the Nios II system library project at the time you create the Nios II C/C++
application project. You do not and should not create project dependencies between Nios II
C/C++ application projects and Nios II system library projects manually. The Associated
System Library page of the Properties dialog box for your Nios II C/C++ application project
contains details about this special dependency. Once the dependency exists, you can change it
to reference a different Nios II system library project.
Nios II library projects are the most common project dependencies. Making an application
project dependent on a Nios II library project allows you to do the following:
Ensure your Nios II C/C++ library builds and is up to date when you compile your
application project.
Call functions in the Nios II C/C++ library from your application project.
Include header files located in a Nios II C/C++ library.
Debug and step into source code located in the Nios II C/C++ library.
Note: After adding a project dependency, you must also edit the application makefile to
refer to the project depended upon.
To change dependence on a Nios II system library project:
You must edit the application makefile to change the project build behavior. Then, carry
out the following steps:
1. Right-click your Nios II C/C++ application project in the Nios II C/C++ Projects
view, and then click Properties. The Properties dialog box appears.
2. Click Associated System Library in the left-hand pane.
3. Click Browse.... A list of Nios II system library projects appears.
4. Select a Nios II system library project.
5. Click OK to close the list of Nios II system library projects.
6. Click OK to close the Properties dialog box.
To configure dependence on a Nios II C/C++ library project:
You must edit the application makefile to change the project build behavior. Then, carry
out the following steps:
1. Right-click your project in the Nios II C/C++ Projects view, and then click
Properties. The Properties dialog box appears.
51