User guide

Nios II IDE Help System
Editing the Project Properties
A project's Properties dialog box controls how the program interacts with the system hardware
and how the Nios II IDE builds the application. Settings available vary for each project type.
Due to the way the Nios II IDE separates and associates Nios II C/C++ application projects
and Nios II system library projects, settings in a Nios II system library project can significantly
impact the Nios II C/C++ application project.
To view and modify Nios II C/C++ application project properties:
Right-click on the project in the Nios II C/C++ Projects view and click Properties.The
Nios II IDE automatically sets most Nios II C/C++ application properties correctly for you.
To view and modify system library properties associated with a Nios II C/C++ application
project:
Right-click a Nios II C/C++ application project, and then click System Library
Properties.
Alternatively, you can right-click the Nios II system library project directly, and then click
System Library Properties. System library properties specify how your program
interacts with the underlying hardware.
To reduce code footprint by editing system library properties:
This example reduces the code size of your executable program by adjusting the system
library properties. A significant reduction in code size is possible beyond the reduction
shown here, and the system library properties control more than code footprint. This
section simply demonstrates one way that editing system library properties can impact
your system.
First, rebuild the project and determine the original code size. Perform the following steps:
1. If a debug session is still running, click
Terminate in the Debug view to
disconnect from the target.
2. Click the
Nios II C/C++ perspective button on the perspective's tab near the
upper-right corner of the window. The Nios II C/C++ perspective appears.
3. Click the tutorial project in the Nios II C/C++ Projects view, and then click
Clean.... on the Project menu. The Clean dialog box appears.
4. Select Clean projects selected below.
5. Scroll down to confirm tutorial is turned on.
6. Turn off Start a build immediately.
7. Click OK.
8. Right-click the tutorial project in the Nios II C/C++ Projects view, and click Build
Project.
When the build completes, you can see the size of the resulting executable code, displayed
in the Console view:
26